changeset 1370:616d34396eef

vorbis: Use nominal bitrate instead of updating every time the bitrate changes. That behaviour is just braindead.
author William Pitcock <nenolod@atheme-project.org>
date Wed, 25 Jul 2007 16:34:07 -0500
parents f611c44cc67b
children ea2ecaeff8ce
files src/vorbis/vorbis.c
diffstat 1 files changed, 1 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/src/vorbis/vorbis.c	Wed Jul 25 16:06:23 2007 -0500
+++ b/src/vorbis/vorbis.c	Wed Jul 25 16:34:07 2007 -0500
@@ -482,7 +482,7 @@
 
     title = vorbis_generate_title(&vf, filename);
     use_rg = vorbis_update_replaygain(&rg_scale);
-    br = ov_bitrate(&vf, -1);
+    br = vi->bitrate_nominal / 1000;
 
     g_mutex_unlock(vf_mutex);
 
@@ -532,8 +532,6 @@
             else
                 time = ov_time_total(&vf, -1) * 1000;
 
-	    br = ov_bitrate(&vf, current_section);
-
             g_mutex_unlock(vf_mutex);
 
             vorbis_ip.set_info(title, time, br, samplerate, channels);
@@ -541,21 +539,6 @@
 
             last_section = current_section;
         }
-
-        if (!(vi->bitrate_upper == vi->bitrate_lower && vi->bitrate_upper == vi->bitrate_nominal)
-            && (playback->output->output_time() > timercount + 1000
-                || playback->output->output_time() < timercount)) {
-            /*
-             * simple hack to avoid updating too
-             * often
-             */
-            g_mutex_lock(vf_mutex);
-            br = ov_bitrate_instant(&vf);
-            g_mutex_unlock(vf_mutex);
-            if (br > 0)
-                vorbis_ip.set_info(title, time, br, samplerate, channels);
-            timercount = playback->output->output_time();
-        }
     }
     if (!playback->error)
         playback->output->close_audio();