comparison src/sndfile/plugin.c @ 2553:b119d6f2e6c8

Cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 08 May 2008 22:05:21 +0300
parents 7d7f7d9ae98e
children 8d09a4d017ea
comparison
equal deleted inserted replaced
2552:7d7f7d9ae98e 2553:b119d6f2e6c8
224 break; 224 break;
225 case SF_FORMAT_CAF: 225 case SF_FORMAT_CAF:
226 format = "Core Audio File"; 226 format = "Core Audio File";
227 break; 227 break;
228 default: 228 default:
229 format = "unknown sndfile"; 229 format = "Unknown sndfile";
230 } 230 }
231
231 switch (tmp_sfinfo.format & SF_FORMAT_SUBMASK) 232 switch (tmp_sfinfo.format & SF_FORMAT_SUBMASK)
232 { 233 {
233 case SF_FORMAT_PCM_S8: 234 case SF_FORMAT_PCM_S8:
234 subformat = "signed 8 bit"; 235 subformat = "signed 8 bit";
235 break; 236 break;
317 codec = g_strdup_printf("%s (%s)", format, subformat); 318 codec = g_strdup_printf("%s (%s)", format, subformat);
318 else 319 else
319 codec = g_strdup_printf("%s", format); 320 codec = g_strdup_printf("%s", format);
320 aud_tuple_associate_string(ti, FIELD_CODEC, NULL, codec); 321 aud_tuple_associate_string(ti, FIELD_CODEC, NULL, codec);
321 g_free(codec); 322 g_free(codec);
322 323
323 aud_tuple_associate_string(ti, FIELD_QUALITY, NULL, lossy ? "lossy" : "lossless"); 324 aud_tuple_associate_string(ti, FIELD_QUALITY, NULL, lossy ? "lossy" : "lossless");
324 } 325 }
325 326
326 static gchar * 327 static gchar *
327 get_title(gchar *filename) 328 get_title(gchar *filename)
350 SF_INFO tmp_sfinfo; 351 SF_INFO tmp_sfinfo;
351 352
352 /* Have to open the file to see if libsndfile can handle it. */ 353 /* Have to open the file to see if libsndfile can handle it. */
353 tmp_sndfile = open_sndfile_from_uri(filename, vfsfile, &tmp_sfinfo); 354 tmp_sndfile = open_sndfile_from_uri(filename, vfsfile, &tmp_sfinfo);
354 355
355 if (!tmp_sndfile) { 356 if (!tmp_sndfile)
356 return FALSE; 357 return FALSE;
357 }
358 358
359 /* It can so close file and return TRUE. */ 359 /* It can so close file and return TRUE. */
360 close_sndfile (tmp_sndfile, vfsfile); 360 close_sndfile (tmp_sndfile, vfsfile);
361 tmp_sndfile = NULL; 361 tmp_sndfile = NULL;
362 362
500 } 500 }
501 501
502 static void 502 static void
503 file_mseek (InputPlayback *playback, gulong millisecond) 503 file_mseek (InputPlayback *playback, gulong millisecond)
504 { 504 {
505 if (! sfinfo.seekable) 505 if (!sfinfo.seekable)
506 return; 506 return;
507 507
508 seek_time = (glong)millisecond; 508 seek_time = (glong)millisecond;
509 509
510 while (seek_time != -1) 510 while (seek_time != -1)