GNOME Bugzilla – Bug 442535
[wavenc] Doesn't handle width!=depth files with audio/x-raw-int properly
Last modified: 2007-06-03 11:21:45 UTC
+++ This bug was initially created as a clone of Bug #440997 +++ Hi, in current CVS wavparse and wavenc don't handle audio/x-raw-int files with width!=depth correctly. Our own representation of such samples has the lowest $depth bits set while wav expects the highest $depth bits to be set. So every sample should be shifted by "width-depth" to the left before writing/after reading. http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/Samples.html contains a sample file. For wavenc just try to open a file with width!=depth in audacity :) Bye
Created attachment 89163 [details] [review] wavenc.diff in theory this should do it... but unfortunately doesn't work at all. The resulting files with depth!=width have interesting distortions. Does anybody have an idea what could be wrong?
2007-06-03 Sebastian Dröge <slomo@circular-chaos.org> * gst/wavenc/gstwavenc.c: (gst_wavenc_create_header_buf), (gst_wavenc_sink_setcaps), (gst_wavenc_format_samples), (gst_wavenc_chain), (gst_wavenc_change_state): * gst/wavenc/gstwavenc.h: Properly write wav files with width!=depth by having the depth most significant bytes set and all others zero. Fixes #442535.