Dropouts in audioPlayerRecorder audio streaming loop
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
Mario Schwarz
el 5 de Sept. de 2020
same issue here. Also with the recommended "setup" command it does not work.
Respuestas (1)
Kiran Felix Robert
el 5 de Feb. de 2021
Editada: Kiran Felix Robert
el 5 de Feb. de 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.
0 comentarios
Ver también
Categorías
Más información sobre Audio I/O and Waveform Generation en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!