After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 442535 - [wavenc] Doesn't handle width!=depth files with audio/x-raw-int properly
[wavenc] Doesn't handle width!=depth files with audio/x-raw-int properly
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal blocker
: 0.10.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-05-31 08:51 UTC by Sebastian Dröge (slomo)
Modified: 2007-06-03 11:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wavenc.diff (3.91 KB, patch)
2007-06-01 07:21 UTC, Sebastian Dröge (slomo)
none Details | Review

Description Sebastian Dröge (slomo) 2007-05-31 08:51:59 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
Comment 1 Sebastian Dröge (slomo) 2007-06-01 07:21:05 UTC
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?
Comment 2 Sebastian Dröge (slomo) 2007-06-03 11:21:45 UTC
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.