Splitting audio pipeline with tee and different formats

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Splitting audio pipeline with tee and different formats

Jonas Kvinge


I'm trying to use a tee to split the audio pipeline so that S16LE can be sent to a spectrum analyzer, without changing the audio format that is sent to alsasink.

However, whenever I set "format" to "S16LE" for the fakesink, it also affects alsasink. So both queues are affected and set to S16_LE. If I remove the format and set only "audio/x-raw" or link the elements without the caps, it's unaffected and outputs S24_3LE.

The file is: FLAC audio bitstream data, 24 bit, stereo, 192 kHz, 55598080 samples

I can output S24_3LE correctly with the following command:
gst-launch-1.0 uridecodebin uri=file:///home/jonas/temp/Southern_Cross.flac ! tee name=t t. ! queue ! audioconvert ! audio/x-raw,format=S24LE ! alsasink device=hw:0,0 t. ! queue ! audioconvert ! audio/x-raw,format=S16LE ! fakesink

Doing the same thing in code however either limits to 16 bit, or does not play at all.

See attached code


gstreamer-devel mailing list
[hidden email]

gstpipelinetest.cpp (10K) Download Attachment