Home | History | Annotate | Download | only in examples

Lines Matching defs:track

26 static void dump_trackinfo(LIBMTP_track_t *track)
28 printf("Track ID: %u\n", track->item_id);
29 if (track->title != NULL)
30 printf(" Title: %s\n", track->title);
31 if (track->artist != NULL)
32 printf(" Artist: %s\n", track->artist);
33 if (track->genre != NULL)
34 printf(" Genre: %s\n", track->genre);
35 if (track->composer != NULL)
36 printf(" Composer: %s\n", track->composer);
37 if (track->album != NULL)
38 printf(" Album: %s\n", track->album);
39 if (track->date != NULL)
40 printf(" Date: %s\n", track->date);
41 if (track->filename != NULL)
42 printf(" Origfilename: %s\n", track->filename);
43 printf(" Track number: %d\n", track->tracknumber);
44 printf(" Duration: %d milliseconds\n", track->duration);
46 printf(" File size %I64u bytes\n", track->filesize);
48 printf(" File size %llu bytes\n", (long long unsigned int) track->filesize);
50 printf(" Filetype: %s\n", LIBMTP_Get_Filetype_Description(track->filetype));
51 if (track->samplerate != 0) {
52 printf(" Sample rate: %u Hz\n", track->samplerate);
54 if (track->nochannels != 0) {
55 printf(" Number of channels: %u\n", track->nochannels);
57 if (track->wavecodec != 0) {
58 printf(" WAVE fourCC code: 0x%08X\n", track->wavecodec);
60 if (track->bitrate != 0) {
61 printf(" Bitrate: %u bits/s\n", track->bitrate);
63 if (track->bitratetype != 0) {
64 if (track->bitratetype == 1) {
66 } else if (track->bitratetype == 2) {
68 } else if (track->bitratetype == 3) {
74 if (track->rating != 0) {
75 printf(" User rating: %u (out of 100)\n", track->rating);
77 if (track->usecount != 0) {
78 printf(" Use count: %u times\n", track->usecount);
87 /* Get track listing. */
103 LIBMTP_track_t *track;
105 track = LIBMTP_Get_Trackmetadata(device, file->item_id);
106 dump_trackinfo(track);
107 LIBMTP_destroy_track_t(track);