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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Audio and Video Data에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!