Dropouts in audioPlayerRecorder audio streaming loop

2 visualizzazioni (ultimi 30 giorni)
Hi,
I have been trying to run an audioPlayerRecorder object smoothly, i.e., without any under/overruns. No matter what I have tried - different OS, tweaking buffer size etc - I am still getting initial dropouts. I tried adding zeros in the beginning of the signal but the underruns are still creating probelm when I extract the signal later in the script. I am not able to understand what exactly is going on. Please help.
  1 Commento
Mario Schwarz
Mario Schwarz il 5 Set 2020
same issue here. Also with the recommended "setup" command it does not work.

Accedi per commentare.

Risposte (1)

Kiran Felix Robert
Kiran Felix Robert il 5 Feb 2021
Modificato: Kiran Felix Robert il 5 Feb 2021
Hi Stance,
As a first step, you can run the Measure Audio Latency example to verify that your audio I/O system is configured correctly:
For profiling your code:
You can also go through the following link that has several steps to troubleshoot the issue of signal dropping and latency
As far as what we observe, under/overruns sometimes happen the first time we run, but usually we're good every other execution because all the underlying code is now cached in memory.
If none of the above links helps, then we need to inspect if the issue is due to hardware limitation of the device being used or the system being used.
This results when the processing loop in MATLAB is not able to supply samples at the rate the sound card demands due to system hardware limitation.
Although we cannot guarantee a processing speed to achieve the task, we would like to suggest you setting up some profiling of your algorithm or try reducing sample rate which might give better results.
There might be another possible issue that Some devices have a control panel to set the buffer length, it should match what is being used in the code. Hence if latency is not an issue , try increasing buffer length.

Categorie

Scopri di più su Audio I/O and Waveform Generation in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by