GNOME Bugzilla – Bug 739446
audiosink, audiosrc: fix silence for unsigned pcm formats
Last modified: 2015-01-21 11:33:14 UTC
silence allocation patch - current Implementation is wrong -> there are audio devices where 0 doesn't mean silence...
Created attachment 289723 [details] [review] gstreamer silence fix
For raw U8 samples, silence is 0x80. For S8 it is 0x00. That's independent of the actual audio device and just a property of those sample formats. What hardware are you running on and with which caps, and what's the actual problem?
Created attachment 290101 [details] [review] fills in correct silence when ring buffer is acquired AND allows to use 8Bit samples with ALSA devices sorry for the first version - there were to much hardware specific patches
Review of attachment 290101 [details] [review]: Please attach the patch(es) in "git format-patch" format :) ::: ext/alsa/gstalsa.c @@ +150,3 @@ finfo = gst_audio_format_get_info (format); + if ((GST_AUDIO_FORMAT_INFO_ENDIANNESS (finfo) != endianness) && (GST_AUDIO_FORMAT_INFO_ENDIANNESS (finfo) != 0)) Why? Also please split the alsa specific part into a separate patch :) ::: gst-libs/gst/audio/gstaudiosink.c @@ +416,2 @@ buf->size = spec->segtotal * spec->segsize; +#if 0 This part makes sense, but please just remove the old code instead of commenting it out
Thomas, can you please update the patch?
Created attachment 295071 [details] [review] allow to use 8Bit samples with ALSA devices
Created attachment 295073 [details] [review] fills in correct silence when ring buffer is acquired
commit e63ad51dabc0404da2a4dd06e4bc1efddc1dbaf8 Author: Sebastian Dröge <sebastian@centricular.com> Date: Wed Jan 21 09:37:30 2015 +0100 audiosrc: Fill in the correct silence For unsigned raw formats this is not all zeroes, and for non-raw formats we just continue to assume all zeroes for now. https://bugzilla.gnome.org/show_bug.cgi?id=739446 commit f0f854d501847ce205b85eea0d0cb544875189f2 Author: Thomas Roos <thomas.roos@industronic.de> Date: Wed Jan 21 08:47:26 2015 +0100 audiosink: Fill in the correct silence For unsigned raw formats this is not all zeroes, and for non-raw formats we just continue to assume all zeroes for now. https://bugzilla.gnome.org/show_bug.cgi?id=739446
commit 485ad66a118c062e3c9ba24bb83d717d38a1f598 Author: Thomas Roos <thomas.roos@industronic.de> Date: Wed Jan 21 08:33:57 2015 +0100 alsa: Allow to use 8 bit samples with ALSA 8 bit samples have no (0) as endianness, not the native endianness. https://bugzilla.gnome.org/show_bug.cgi?id=739446