How to play Multiple channels from a audio Device having 8 maximum output using dsp.Audioplayer..

1 回表示 (過去 30 日間)
I have a soundcard with 8 max output channels.
>>info=dspAudioDeviceInfo
info =
15x1 struct array with fields:
name
maxInputs
maxOutputs
>> info(12,1)
ans =
name: 'Haut-parleurs (4- USB Multi-Channel Audio Device) (Windows DirectSound)'
maxInputs: 0
maxOutputs: 8
The code I`m using to play is as following
hafr = dsp.AudioFileReader('sig8.wav');
hap = dsp.AudioPlayer('SampleRate',44100);
hap.DeviceName='Haut-parleurs (4- USB Multi-Channel Audio Device)';
while ~isDone(hafr)
audio = step(hafr);
step(hap,audio);
end
pause(hap.QueueDuration); % Wait until audio plays to the end
release(hafr); % close input file, release resources
release(hap); % close audio output device, release resources
The output comes from only two channels and all the 8 channels sound is there in those two channels...

回答 (0 件)

カテゴリ

Help Center および File ExchangeAudio and Video Data についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by