hey, audio question. let's say I have an audio DAC. say my laptop is playing samples, at 48 kHz. let's say I also have an audio ADC. say an USB dongle, recording at 48 kHz. their clock isn't synchronized or the same. one is faster than another. say ADC trails. how does this work?
-
Show this thread
-
Replying to @whitequark
Input from ADC, output to DAC? In that case you need to monitor output buffer depth and dynamically resample. Same as any time you play audio that needs to be synchronized to another clock (e.g. video refresh or remote streaming sender).
2 replies 0 retweets 2 likes -
Replying to @RichFelker
yep. do you know of any library that can do resampling without a massive dependency tree, or maybe there's some simple algorithm i could just implement myself
2 replies 0 retweets 1 like -
Replying to @whitequark
I'll ask around. I thought ffmpeg had something for it but not sure.
1 reply 0 retweets 0 likes -
-
Replying to @whitequark
Huge yes but not a sprawling tree. And you might could just nab the relevant code. But I'll look for lighter stuff.
1 reply 0 retweets 0 likes -
Replying to @RichFelker @whitequark
If you do it yourself you just need a resampler that can be dynamically reconfigured without discontinuities and a control loop to react to clock skew.
1 reply 0 retweets 0 likes -
-
Replying to @RichFelker
hmm, looks like libresample might do what I want? http://www.mega-nerd.com/SRC/api_full.html …
1 reply 0 retweets 2 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
