GNOME Bugzilla – Bug 317338
[osssink] can't handle mono
Last modified: 2005-09-27 15:15:31 UTC
Please describe the problem: The osssink element doesn't properly play a mono audio stream. The stream jitters (music, silence, music, silence, etc) Steps to reproduce: 'gst-launch filesrc location=test.wav ! wavparse ! osssink' (test.wav is a 44.1KHz, mono, 16bit wav file.) 'play test.wav' works fine Actual results: jitter, pipeline executes fine besides this Expected results: proper continuous playback Does this happen every time? Yes Other information: My guess: My audio device isn't capable of handling mono, the 'play' program somehow detects this and adapts but osssink isn't The audio device is a onboard SiS SI7012 with a Realtek ALC200,200P rev0 chip.
The audioconvert element helps fixing this: gst-launch filesrc location=test.wav ! wavparse ! audioconvert ! osssink
Still, I think there is a bug here: % gst-launch-0.9 -v sinesrc ! osssink PAUSE pipeline ... /pipeline0/sinesrc0.src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)1 /pipeline0/osssink0.sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)1 PREROLLED pipeline ... RUNNING pipeline ... Gives: beep, beep, beep, beep, beep (interruptions as long as the beeps) % gst-launch-0.9 -v sinesrc ! audioconvert ! osssink results in exactly the same (caps-wise and sound-wise). Cheers -Tim
I have the same result as Tim. The audioconvert element is outputting exactly the same caps on its two pads (ie its doing nothing). I think the problem is the osssink happily accepting a 1 channel stream when it shouldn't. It should have failed the negotiation without the audioconvert. Jeroen (Thanks for handling this so quickly :)
Should be fixed now (works for me at least). 2005-09-27 Tim-Philipp Muller <tim at centricular dot net> * sys/oss/gstosssink.c: (gst_oss_sink_prepare): Fix playback of mono streams (bytes_per_sample should be set from the sample width and the number of channels negotiated, and not just be set to 4) (#317338) Cheers -Tim