this is a first test using Gstreamer to route hardware USB SOUND CARD audio - to and from - and through - the native alsa loopback/snd-aloop virtual audio cables(2 of them) on a pi 4
SETUP
a raspberry pi is using a usb soundcard, behringer uca222
SONOBUS is using ALSA audio driver only, and selects the alsa loopback cable "0,0" for its INPUT and the alsa loopback cable "1,1" for its audio OUTPUT
NOTE: SonoBus already has functions to do what these loopback cables and Gstreamer scripts are doing... however, the test was run to see if it would be possible to provide the routing and audio filtering through the loopback cables & Gstreamer, and route them accordingly... test to see how the audio sounds after going through the loopbacks, and , how much delay/latency will the loopbacks/gstreamer scripts cause...
Gstreamer ELEMENT functions that are also tested...
AUDIOMIXER ELEMENT and TEE ELEMENT
here is the PI4 Gstreamer script that was used, with multiple functions:
*************************************************************************
gst-launch-1.0 -v alsasrc device=hw:4 ! audio/x-raw, rate=48000 ! tee name=t t. ! queue ! audioconvert ! audiowsincband mode=band-pass lower-frequency=580 upper-frequency=820 length=384 window=3 low-latency=true ! audioconvert ! audiomixer name=mix emit-signals=true latency=10000 mix. ! queue ! alsasink device=hw:4 sync=false async=false buffer-time=15000 t. ! queue ! audioconvert ! audiowsincband mode=band-pass lower-frequency=580 upper-frequency=820 length=384 window=3 low-latency=true ! audioconvert ! queue ! alsasink device=hw:0,1 sync=false async=false buffer-time=30000 alsasrc device=hw:1,0 ! audioconvert ! audioresample ! mix.
1. the script includes an audio bandpass filter to filter out the harmonics of a twin-t cw morse code keyed oscillator(keyed by fldigi's serial port RTS pin feature)
2. the script includes a TEE so that not only will the filtered TWIN-T CW audio go to the usb sound card for low latency/near zero delay monitoring...it will also send that same filtered audio to the input of SONOBUS too, through the 1st virtual audio cable
3. the script includes an audiomixer element so that more than one audio device can send its audio to the pi's USB SOUND CARD headphone/line output/ audio output [alsa - only allows one program/software APP at a time to use one hardware audio device...the gstreamer audiomixer element allows more than one program/script/device/etc... to send audio to the hardware USB soundcard output]
SONOBUS
https://sonobus.net/
GSTREAMER
https://gstreamer.freedesktop.org/dow...
Watch video 2 virtual audio cables(alsa-loopback/snd-aloop) on a Raspberry Pi to route audio & interject filters online without registration, duration hours minute second in high quality. This video was added by user QRQcw 30 July 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 427 once and liked it 2 people.