jack (3.1.1+cvs20050801-29) 31_real_bitrate_progress.patch

Summary

 jack_main_loop.py |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

    
download this patch

Patch contents

Put the real bitrate in the progress file.  In case of VBR, jack used to
put the bitrate of CBR into the jack.progress file.  (Actually, why does
track[RATE] not always contain the real rate?)  Or maybe we should put the
chosen quality rating in the progress file incase of OGG?

diff -urN c/jack_main_loop.py jack-3.1.1+cvs20050801/jack_main_loop.py
--- c/jack_main_loop.py	2006-02-07 00:57:23.000000000 +0000
+++ jack-3.1.1+cvs20050801/jack_main_loop.py	2006-02-07 01:17:15.000000000 +0000
@@ -344,13 +344,14 @@
                     else:
                         global_done = global_done + exited_proc['track'][LEN]
                         if cf['_vbr']:
-                            jack_status.enc_stat_upd(num, "[coding @" + '%s' % jack_functions.pprint_speed(speed) + "x done, %03.0fkbit]" % ((jack_utils.filesize(track[NAME] + ext) * 0.008) / (track[LEN] / 75.0)))
+                            rate = int((jack_utils.filesize(track[NAME] + ext) * 0.008) / (track[LEN] / 75.0))
                         else:
-                            jack_status.enc_stat_upd(num, "[coding @" + '%s' % jack_functions.pprint_speed(speed) + "x done, mp3 OK]")
+                            rate = track[RATE]
+                        jack_status.enc_stat_upd(num, "[coding @" + '%s' % jack_functions.pprint_speed(speed) + "x done, %dkbit" % rate)
+                        jack_functions.progress(num, "enc", `rate`, jack_status.enc_status[num])
                         if not cf['_otf'] and not cf['_keep_wavs']:
                             os.remove(track[NAME] + ".wav")
                             space = space + jack_functions.tracksize(track)[WAV]
-                        jack_functions.progress(num, "enc", `track[RATE]`, jack_status.enc_status[num])
 
                 else:
                     error("child process of unknown type (" + exited_proc['type'] + ") exited")