How to play Multiple channels from a audio Device having 8 maximum output using dsp.Audioplayer..
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Audio and Video Data finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!