comparison src/madplug/plugin.c @ 2207:0b67fb27db58

get benefit of FIELD_BITRATE
author Eugene Zagidullin <e.asphyx@gmail.com>
date Tue, 04 Dec 2007 03:34:08 +0300
parents 7c7e6f5c494e
children 9a869d4bb0d3
comparison
equal deleted inserted replaced
2206:7c7e6f5c494e 2207:0b67fb27db58
770 // length 770 // length
771 length = mad_timer_count(myinfo.duration, MAD_UNITS_MILLISECONDS); 771 length = mad_timer_count(myinfo.duration, MAD_UNITS_MILLISECONDS);
772 aud_tuple_associate_int(tuple, FIELD_LENGTH, NULL, length); 772 aud_tuple_associate_int(tuple, FIELD_LENGTH, NULL, length);
773 } 773 }
774 774
775 if (myinfo.vbr) { 775 aud_tuple_associate_string(tuple, FIELD_QUALITY, NULL, "lossy");
776 string = g_strdup_printf("lossy, bitrate: VBR (avg. %d kbps)", myinfo.bitrate / 1000); 776 aud_tuple_associate_int(tuple, FIELD_BITRATE, NULL, myinfo.bitrate / 1000);
777 } else {
778 string = g_strdup_printf("lossy, bitrate: %d kbps", myinfo.bitrate / 1000);
779 }
780 aud_tuple_associate_string(tuple, FIELD_QUALITY, NULL, string);
781 g_free(string); 777 g_free(string);
782 778
783 string = g_strdup_printf("MPEG-1 Audio Layer %d", myinfo.mpeg_layer); 779 string = g_strdup_printf("MPEG-1 Audio Layer %d", myinfo.mpeg_layer);
784 aud_tuple_associate_string(tuple, FIELD_CODEC, NULL, string); 780 aud_tuple_associate_string(tuple, FIELD_CODEC, NULL, string);
785 g_free(string); 781 g_free(string);