I just realized that I had to adjust the block size in Async::AudioDeviceUDP
so that the block time in milliseconds became an integer number. This is
required by the Async::Timer class, which is used to pace the audio output,
since it only work with integer milliseconds. If the adjustment is not made,
the audio output will be a little bit too fast.
So what you will see now is actually blocks that are 1008 samples (4032 bytes
per UDP packet) which is exactly 21 milliseconds at a sample rate of 48000
samples per second.
I'm not 100% sure that this is the best thing to do though. Maybe it's better
that the pace timer is a little bit fast. The reason I say this is because the
pacing really only is needed when the audio comes from an internally generated
source (like playing back sound clips from file) that is not rate limited.
These clips are usually quite short so the accumulated time offset does not get
very big. If the audio is coming from a sound card, it will already be rate
limited. Two rate limiters in a row is often bad news since if their rates
does not match exactly, we may end up having a growing queue of samples inside
of SvxLink. If the output pacer is slightly faster, this will not happen.
Well, we'll see how this pans out. You are now aware of the problem.
73's de SM0SVX / Tobias