How to play Multiple channels from a audio Device having 8 maximum output using dsp.Audioplayer..
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Audio and Video Data dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!