Is it possible to read the ASIO device buffer size

2 ビュー (過去 30 日間)
Thomas Stewart
Thomas Stewart 2017 年 2 月 6 日
コメント済み: Martin Günther 2018 年 3 月 6 日
Hi, I am wondering if it is possible to read the ASIO device buffer size, similar to getting info on the number of channels of a device etc. I have both an audioDeviceWriter and an audioDeviceReader where users can select the buffersize. It works great in Mac OS and Windows.
I would like to create a check, mainly for potential user error, in the case where a user does not set the ASIO interface buffer size correctly. I would like to read the ASIO device buffer size so I can check it against the user input BufferSize/SamplesPerFrame in my audio writer/reader. Ideally, I would read the ASIO device buffersize and set that value in the GUI if an ASIO device is detected.
I have been unable to find this and assume it is not possible.

回答 (1 件)

Harsh
Harsh 2017 年 2 月 15 日
Hello,
If you are using MATLAB R2016a and above, you may be interested in the 'SamplesPerFrame' property of the 'audioDeviceReader' System object. From the doc "SamplesPerFrame is also the size of your device buffer". You can find more info on this here:
  2 件のコメント
Thomas Stewart
Thomas Stewart 2017 年 2 月 15 日
Hi, I am aware of SamplesPerFrame. I mention it in the original question. I was inquiring if it is possible to read the buffer settings from the ASIO device. For example in the attached image, the default property SamplesPerFrame for audioDeviceReader is 1024. However the ASIO device buffer size is 2048. I would like to be able to test a user input for the BufferSize & SamplesPerFrame against the ASIO device buffersize and warn users if there is a mismatch.
Martin Günther
Martin Günther 2018 年 3 月 6 日
I can't understand why the STAFF does not answer this question! I have the same problem using the audioPlayerRecorder System object.

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

カテゴリ

Help Center および File ExchangeAudio I/O and Waveform Generation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by