How to to design and test UI with audioDeviceWriter and dsp.AudioFileReader in AppDesigner for multichannel audio playback

4 visualizzazioni (ultimi 30 giorni)
I'm developing a user interface in AppDesigner that uses dsp.AudioFileReader and audioDeviceWriter to read and play 16-channel audio files. I don't have immediate access to the final 16-channel hardware interface and loudspeaker setup that will be used (it will use RME Madiface XT I guess with ASIO driver), but I do have example 16-channel wav files to work with.
I have the UI working well with mono files over a simple 2-channel home setup using a WASAPI driver. As soon as I've tried playing back the 16-channel files, I get the error message:
Error using audioDeviceWriter/setup
PortAudio Error: Invalid number of channels
(I've been using the setup call to initialise the audioDeviceWriter object, as per the example https://uk.mathworks.com/help/audio/ref/audiodevicewriter-system-object.html)
Is it possible to use these MATLAB objects with the 16-channel files in a limited way over a stereo device (for example, with only playing back 2 of the 16 channels), to enable development and debugging to continue, before undertaking final testing and debugging on the full 16-channel system?
What settings should I anticipate being needed to get the UI working with the 16-channel hardware that are not needed for playback of mono or stereo files - for example, device-specific settings, channel mapping etc?
  2 Commenti
Mario Malic
Mario Malic il 5 Ott 2023
deviceWriter = audioDeviceWriter('SampleRate',fileInfo.SampleRate);
info(deviceWriter)
info will tell you how many channels does the audioDeviceWriter support.
Each channel corresponds to a column of matrix you are trying to write.
Michael
Michael il 5 Ott 2023
Thanks. That is helpful in incorporating a check in the code to see if the selected device can support the number of channels in the file.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Code Generation and Deployment in Help Center e File Exchange

Prodotti


Release

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by