Re: Four Channel Output from Mono File (EMI 2|6) - newbie
Re: Four Channel Output from Mono File (EMI 2|6) - newbie
- Subject: Re: Four Channel Output from Mono File (EMI 2|6) - newbie
- From: Galen Faidley <email@hidden>
- Date: Wed, 12 Feb 2003 23:21:08 -0600
Jamie,
I'm afraid that I can not answer any of your questions about
using core audio since I'm new at it myself. However, I am also
implementing a spatial audio system. Maybe, if you give me some more
details about what you want to do I can help.
I currently have a very basic implementation using amplitude
panning across four speakers. It was implemented with portaudio
(
http://www.portaudio.com) since it has to be cross platform. I have
it working on Irix but am having issues getting it to work on OS X (a
combination of evolving portaudio implementation and problems with my
sonica theater I think).
I found a good paper that explains a simple way of doing this:
http://lib.hut.fi/Diss/2001/isbn9512255324/article1.pdf
It is not that complex. Basically some vector math or you
can just borrow the formulas form the paper. I actually derived an
identical solution before finding the paper. It is not the best
solution available but it is a good start and might suit your needs.
To improve the sound it should be possible to incorporate head
related transfer functions (HRTSs) and cross talk cancellation.
However, I just started reading about that so I have no clue how to
do it yet.
Regards
Galen
At 10:23 PM +0000 2/9/03, Jamie Cameron Allen wrote:
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.
_______________________________________________
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.