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 317338 - [osssink] can't handle mono
[osssink] can't handle mono
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.9.x
Other All
: Normal normal
: 0.9.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-09-27 13:22 UTC by Jeroen Vreeken
Modified: 2005-09-27 15:15 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jeroen Vreeken 2005-09-27 13:22:36 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.
Comment 1 Ronald Bultje 2005-09-27 13:36:17 UTC
The audioconvert element helps fixing this:

gst-launch filesrc location=test.wav ! wavparse ! audioconvert ! osssink
Comment 2 Tim-Philipp Müller 2005-09-27 14:07:27 UTC
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


Comment 3 Jeroen Vreeken 2005-09-27 14:27:41 UTC
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 :)
Comment 4 Tim-Philipp Müller 2005-09-27 15:15:31 UTC
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