Changing input sizes error when writing data with dsp.AudioFileWriter
11 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
MathWorks Support Team
il 11 Ago 2020
Risposto: MathWorks Support Team
il 11 Ago 2020
I am using "dsp.AudioFileWriter" to write audio files. When I divide the file into multiple pieces, the last piece will have a different size compared with the previous ones, therefore MATLAB throws the following error message:
Error using dsp.AudioFileWriter/parenReference
Changing the size on input 1 is not allowed without first calling the release() method.
Is there a workaround for this?
Risposta accettata
MathWorks Support Team
il 11 Ago 2020
At the current time dsp.AudioFileWriter does not support variable sized inputs and the error is due to the fact that the last frame size is different than the original frame size the object was locked with. Zero-padding is the best way to avoid this error.
You may also consider the following as possible workarounds:
1. Bufffer the audio file data using dsp.AsyncBuffer
2. Write the data to the file in using dsp.AudioFileWriter or audiowrite
An enhancement request has been submitted to the development team to consider supporting this functionality in a future release.
0 Commenti
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!