Four Channel Output from Mono File (EMI 2|6) - newbie
Four Channel Output from Mono File (EMI 2|6) - newbie
- Subject: Four Channel Output from Mono File (EMI 2|6) - newbie
- From: "Jamie Cameron Allen" <email@hidden>
- Date: Sun, 09 Feb 2003 22:23:22 +0000
I am trying to implement a spatial audio system using the CA Java API. The idea is to individually control a play-out signal into four output channels of an EMI 2|6 interface (USB), starting with a Mono source file.
I have started with the OutputTester Apple example and have tried to change the output properties of the device in order to change the conversion which gets performed in the AudioProvider. That is, because the example is set up to convert to the desired receiving format of the output device, using:
getOutputProperty(0,AHConstants.kAudioDevicePropertyStreamFormat, streamFormat)
in order to achieve the desired output.
I have mostly tried a multitude of setOutputProperties (kAudioDevicePropertyPreferredChannelsForStereo, etc.), but I only get invalid property information when I create a CAString to hold a non-default value.
Another strategy is that I have been trying to use streamFormat.setChannelsPerFrame(4), and streamFormat.setBitsPerChannel(16), etc., to try and get SOMETHING playing out of channels 3 & 4 (although I realise this doesn't make much sense in terms of interleaving information as of yet). All this gives is CAException in the AudioConverter class somewhere.
I guess, then, my questions are as follows:
-Should I be looking at AudioUnits to do this kind of thing? I've only been trying to get it working with the HAL interfaces as the AudioUnits examples don't compile (10.2.3, December Dev Tools!).
-Has anyone any experience with trying to generate multichannel output from mono files?
-At what point in the play-out chain should I copy the data for output to 4 channels?
-Will it be necessary to generate a new 4-way interleaved intermediate buffer of some kind before using AudioDevice.play? Is there anyway of just holding copies of these data and outputting them in sync (without mixing them), without having to interleave for play-out?
Any help that could be given would be greatly appreciated - Java related or otherwise... I had assumed this would be quite a bit easier to implement (i.e.: get channel numbers, load file into buffer, copy buffer, play all buffers to channels), and am now a bit stuck!
Many thanks,
Jamie Allen
University of Glasgow
Centre for Music Technology
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.