diff options
Diffstat (limited to 'debian/patches/77_upd_progress_flac.patch')
-rw-r--r-- | debian/patches/77_upd_progress_flac.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/debian/patches/77_upd_progress_flac.patch b/debian/patches/77_upd_progress_flac.patch new file mode 100644 index 0000000..293a33a --- /dev/null +++ b/debian/patches/77_upd_progress_flac.patch @@ -0,0 +1,32 @@ +Support FLAC files in --update-progress. Debian #351459 + +Depends on 72_upd_progress_renamed.patch and 75_fix_datatrack_rename.patch, +and on 33_flac_mutagen.patch + + +diff -urN jack-3.1.1+cvs20050801~/jack_prepare.py jack-3.1.1+cvs20050801/jack_prepare.py +--- jack-3.1.1+cvs20050801~/jack_prepare.py 2006-04-04 23:29:16.000000000 +0200 ++++ jack-3.1.1+cvs20050801/jack_prepare.py 2006-04-04 23:30:32.000000000 +0200 +@@ -38,6 +38,7 @@ + + from jack_globals import * + from jack_init import ogg ++from jack_init import flac + + global tracknum + datatracks = [] +@@ -360,6 +361,13 @@ + elif ext == ".ogg" and ogg: + x = ogg.vorbis.VorbisFile(filename + ext) + temp_rate = int(x.raw_total(0) * 8 / x.time_total(0) / 1000 + 0.5) ++ elif ext.upper() == ".FLAC" and flac: ++ f = flac.FLAC(filename + ext) ++ size = os.path.getsize(filename + ext) ++ if f.info and size: ++ temp_rate = int(size * 8 * f.info.sample_rate / f.info.total_samples / 1000) ++ else: ++ temp_rate = 0 + else: + error("don't know how to handle %s files." % ext) + status[num]['enc'] = `temp_rate` + cf['_progr_sep'] + "[simulated]" + |