[gst-devel] How to send audio data into one speaker only

Jan Martinek honza at dp.fce.vutbr.cz
Sat Oct 31 11:34:17 CET 2009


Hello,

I am trying to write a program which sends data into left speaker while 
the right one remains silent. The obvious way would be to set up a 
stereo pipeline and send the bytes in this order

left data, zero, left data, zero, left data, zero, etc.

but ... is there a better way? Can I join my data with silence using 
interleave? Silence can be generated by "audiotestsrc wave=4", so ...

For testing, I try to play sine wave from one channel only:

gst-launch interleave name=i ! audioconvert ! gconfaudiosink \
audiotestsrc ! capsfilter \
caps=audio/x-raw-int,rate=44100,channels=1,depth=16,signed=true \
! queue ! i.sink0 \
audiotestsrc wave=4 ! capsfilter \
caps=audio/x-raw-int,rate=44100,channels=1,depth=16,signed=true \
! queue ! i.sink1

But I get this error message:
WARNING: erroneous pipeline: could not link queue0 to i

Thank you for help in advance,
Jan Martinek




More information about the gstreamer-devel mailing list