GNOME Bugzilla – Bug 751144
audioringbuffer: Fix alaw/mulaw channel positions
Last modified: 2015-06-22 16:29:26 UTC
Created attachment 305524 [details] mulaw clip for reproducing the issue. When we played 2 channel mulaw wav clips with pulsesink as below command line: gst-launch-1.0 filesrc location=Mulaw_22.05khz_353kbps_2_8bit.wav ! wavparse ! pulsesink There is only 1 channel output can be heard. (please see attached file for the mulaw clip) Checked pulsesink plugin, it will invoke gst_pulse_gst_to_channel_map() to map the gst channel position to pulse channel position. However, when playing mulaw clips,, the position array's value in audioinfo sturcture is all 0 (not initialized to default value), so that when mapping to pulse channel postion, it will both be considered as FRONT_LEFT channel. hence, only left channel can be heard. Checked the pulsesink plugin, it will call gst_audio_ring_buffer_parse_caps() in which it will set audioinfo from caps, but in this function only audio/x-raw clips set the audio_info and initialized position array. Attached a patch for this issue. when in gst_audio_ring_buffer_parse_caps(), need initialize audioinfo channel position array when mime type is audio/x-alaw and audio/x-mulaw
Created attachment 305525 [details] [review] patch for fix this alaw/mulaw channel position issue the patch will initialized the channel position array for audio/x-alaw and audio/x-mulaw clips.
commit 829b7298e9d783d612032273775c7048bf83fec6 Author: Lyon Wang <lyon.wang@freescale.com> Date: Thu Jun 18 17:38:09 2015 +0800 audioringbuffer: Fix alaw/mulaw channel positions For alaw/mulaw we should also try to initialize the channel positions in the ringbuffer's audio info. This allow pulsesink to directly use the channel positions instead of using the default zero-initialized ones, which doesn't work well. https://bugzilla.gnome.org/show_bug.cgi?id=751144