Reducing delay in to audio device block?

We are working on a system which gives audio feedback to a person driving in a driving simulator. Basically our system is detecting the lateral displacement of the car with regards to the center of the lane and gives beeps at a frequency dependent on the magnitude of the displacement.
We have a simulink model which receives data from the driving simulator via UDP. The simulink model calculates the displacement of the car. Then with the displacement the model calculates a desired frequency, which in turn is used to multiply a sample from a From Multimedia File Block.
All of this is working as desired and the output as seen in a scope is almost instantly reacting to the actions in the driving simulator. However, when we actually connect this output to a To Audio Device block, a delay is introduced. The audio coming out of the speakers is delayed by sometimes as much as 3 seconds, but we need it to be almost instantly.
Is there a way to reduce this delay or a way to work around using this To Audio device block?
llars
edit:
It seems that the entire model is slowing down when the sound is playing. Other displays, that I placed to check errors don't seem to be updating as fast as before implementation of the To Audio Device block.

Answers (0)

Categories

Find more on Audio I/O and Waveform Generation in Help Center and File Exchange

Products

Asked:

on 30 Apr 2015

Edited:

on 30 Apr 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!