The Multi Channel Audio is written in a matrics, with 4 column representing 4 audio channels.
The Audio Device has more than 4 channels.
In Matlab, both dsp.AudioPlayer and To Audio Device Block in Simulink can be used, but only two channels are activated.
How can all 4 channel audio files be played in MATLAB?
The codes by using dsp.AudioPlayer are as follows:
H = dsp.AudioPlayer;%creating the To Audio Device
H.DeviceName='扬声器 (RME Hammerfall DSP MADI)';% this is the multi channel audio device.
load test4Channel.mat %this is the audio matrix with sampling rate 44100, time length 45s, 4 columns.
step(H,Data((i-1)*44100+1:i*44100,:));%try to play 4 channel audio, but only 2 channels worked.