Asynchrounous Audio Sample Rate Conversion with gstreamer

Maik Scholz Scholz.Maik at t-online.de
Wed May 25 16:58:42 UTC 2016


Hi,

My pipeline simplified:
SRC1: sine with 32kHz*+50Hz*=>
 NETWORK=>
  udpsrc(expected sample rate is 32kHz)=>
   queue=>
    audiorate=>
     audioconvert=>
      audioresample=>|
                           
|audiomixer=>queue=>autoaudiosink(sync=true,slave-method=resample)=>Audio-Out
      audioresample=>|
     audioconvert=>
    audiorate=>
   queue=>
  udpsrc(expected sample rate is 48kHz)=>
 NETWORK=>
SRC2: sine with 48kHz*-50Hz*=>

>You can hook in your own drift compensation method if you set the
>audiobasesink's "slave-method" property to "custom". We use that in a
>project to finetune the audio clock's speed via a PLL by an integer
>number of ppm. It would be the same with an ASRC. 

Sorry, I have some concerns about this proposal.
How should this compensate the clock drifts between (Audio-Out) and
two different inputs (SRC1 and SRC2)?

My expectation is, that I need something in the SRC pipeline parts.
This compensates each SRC clock to the main pipeline clock.
The ASRC in the basesink/autoaudiosink is responsible to synchronize the 
main pipeline clock to the sink clock. 

In the gstreamer audiomixer manual:
>Unlike the adder element audiomixer properly synchronises all input
streams.
What does this mean in this context? Is there a ASRC inside the audiomixer?

An idea for would be adding a custom element in front of each
"audioresample" element.
This "ASRC-SampleRate-Checker", could observe the SRCx buffer timestamps and
calculate the real input sample rate. 
By knowing this, the element could adapt/change the rate in the output caps
in a way, 
that the following audioresample is compensating the source clock
difference.
Could this work (inaudible)?

If there is any other solution for this, I am happy for all proposals.

Maik











--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Asynchrounous-Audio-Sample-Rate-Conversion-with-gstreamer-tp4677252p4677771.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list