Need continuous sound played from buffer A then B. I fill B while A is playing, then visa versa.

6 ビュー (過去 30 日間)
Hello,
I would like to use MATLAB for a real-time sound output problem. If I could set up a sound to play from buffer A then buffer B continuously, I could work on the contents of the buffer that isn't "live" while the other is playing.
I would like to use MATLAB because I need FFT and other things that MATLAB handles well as part of my calculations for filling the buffer that isn't live.
I haven't had much success with audioplayer because of the rather large (audio-wise) and variable delays between starting different player objects.
Any suggestions how to approach playing sound continuously from two buffers?
Thank you, DS

採用された回答

jibrahim
jibrahim 2022 年 1 月 5 日
編集済み: jibrahim 2022 年 1 月 5 日
Hi David,
For real-time sound applications, you should use audioDeviceWriter:
See the doc page above for a simple example.
To handle buffers at real-time, consider using dsp.AsyncBuffer:
  1 件のコメント
David W Purcell
David W Purcell 2022 年 1 月 6 日
Thank you! I will check it out (and will likely have some questions, but thanks!).
Best wishes, DS

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAudio and Video Data についてさらに検索

タグ

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by