How to send audio data into one speaker only

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to send audio data into one speaker only

Jan Martinek-2
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

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to send audio data into one speaker only

Thiago Sousa Santos-2


On Sat, Oct 31, 2009 at 7:34 AM, Jan Martinek <[hidden email]> wrote:
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 ...

I didn't understand clearly what you're trying/wanting to do, but you might be interested in the audiopanorama element.
 

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

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
Thiago Sousa Santos

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel