PDA

View Full Version : Advance Participants - Specifically USB Soundcards


kcarpenter
08-29-2007, 08:36 AM
Quoted from an email:

Keith and I spoke with Shaun extensively on the topic and we wanted to explain to you some of the technical hurdles introduced by using sound cards as an audio source for WAVE instead of dedicated standalone devices. As you know, the soundcard has t w o configurable options in WAVE, FrameQueueLength and FrameMultiplier.

FrameQueueLength bascially the buffer that is stored before it is sent to the WAVE Media Server. This buffer is in multiples of 10 so FrameQueueLength=8 is 80ms of buffering before it is sent out. FrameMultiplier is how many buffers there are total. So FrameMultiplier=1 is a single buffer.

So what's happening is the buffer stores 80ms of audio before it is sent through the drivers and layers of the OS etc. How long this takes depends on how well the drivers are coded. There will be some delay between each buffer reaching WAVE. If you have multiple buffers you are able to start buffering the next frame while the first one is being sent through.

The trade off is latency. A Multiplier of 2 at a FrameQueueLength of 8 would equal 160ms of buffering before WAVE even begins to process it and roundtrip adding a possible signficant amount of latency. Do you transmit using WAVE as well?

I would try a Multiplier of 3 at with a FrameQueueLength of 5. The audio file you provided us sounds like there is a space inbetween frames being processed so I want to try having 3 frames at a slightly smaller size.

On high-end hardware PCI soundcards, the driver can handle smaller buffers of audio, so it would be more ideal to send more smaller buffers. Once audio breakup occurs, a method you can try is making the audio buffer bigger, but maybe only have two of them. A suggestion of no less then 3 multipler was discussed especially for USB sound devices, where the audio must transverse through multiple subsystems and hardware layers. If you have high CPU utilization, it may be attributed to too small of a FrameMultipler so the CPU is trying to compensate.