How do I output on multiple channels using Audio Device Writer?

15 views (last 30 days)
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?

Answers (1)

Jimmy Lapierre
Jimmy Lapierre on 18 Apr 2025
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.

Categories

Find more on Audio I/O and Waveform Generation in Help Center and File Exchange

Products


Release

R2024a

Community Treasure Hunt

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

Start Hunting!