2

I'm looking to output four channels of audio simultaneously from MATLAB using an external soundcard (Creative Soundblaster X-Fi Surround 5.1 Pro USB) and haven't yet found a working solution.

As far as I understand it, MATLAB's audioplayer object can only output a stereo signal, so I've tried two alternatives: playrec and pa_wavplay. Both appear to do precisely what I need, but seem to recognize the soundcard as a two-channel device only.

Any advice would be terrific. Thanks for reading.

(The MATLAB version is R2007b and the only available toolbox is the Signal Processing Toolbox.)

Rogare
  • 3,234
  • 3
  • 27
  • 50
  • I've now tried PsychToolbox (which seems pretty great as well), but it's still seeing only 2 outputs from this soundcard. Am I wrong in thinking a 5.1 channel device should have 6 channels? – Rogare Feb 06 '13 at 22:07
  • I've got a bit of experience of pa_wavplay and found it dealt with large numbers of inputs/output without any problems. I'd suspect the problem is with your audio interface. It can output 5.1, but it's probably producing those channels by decoding a Dolby stream once in the device. – Speedy Feb 09 '13 at 23:13

1 Answers1

1

I've got a bit of experience of pa_wavplay and found it dealt with large numbers of inputs/output without any problems. I'd suspect the problem is with your audio interface.

While it can output 5.1, it's quite possibly producing those "additional" channels itself by decoding a Dolby Digital stream once in the device. This suggests the interface won't allow you to output 6 six channels of PCM audio as such.

If you're determined to use this device and prepared to get your hands dirty you could always try encoding your audio as ac3 yourself, but I guess you'd have to do this outside Matlab.

Speedy
  • 476
  • 2
  • 13
  • The device has since been replaced by another device which works wonderfully, thank you. (The software I ended up using was actually "PsychToolbox"—pretty straightforward setup and so far, so good.) – Rogare Feb 12 '13 at 19:39