How do I output on multiple channels using Audio Device Writer?
17 次查看(过去 30 天)
显示 更早的评论
Hi,
I am using Audio Device Writer with the following settings:


UMC device has 12 channels as shown:

I am using from workspace block to access the the samples of the signals to be output, which consists of:
column 1: time
column 2: signal 1
column 3: signal 2
Signal dimentions overlay option indicated that the audio device writer is getting two channels as expected
When I attempt to manually map output channels as shown I get the following error:
Number of channels in the output data and the length of the channel map vector must match.
If I select default mapping I do not get an error but neither do I get an output. If I output just on a single channel, I do get an output. However, I require the output on multiple channels.
Could someone help me understand how to map to the channels I want and output using audio device writer please?
0 个评论
回答(1 个)
Jimmy Lapierre
2025-4-18
Channel mapping 1:2 is fine for playing 2 channels. The error appears to be about the number of columns and I do not think the block support a time column, because the sample rate must be constant (44.1kHz for example). Consider using a block like this to remove the time component.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio I/O and Waveform Generation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!