Forums › Programming › sound engine: CocosDenshion et al › Positional sound with SimpleAudioEngine
This topic contains 3 replies, has 3 voices, and was last updated by neigaard 2 years, 1 month ago.
I am trying to implement positional sound with SimpleAudioEngine and I have it working well for gain, but it seems as if adjusting pan does nothing to the sound? For an experiment I do this:
CDSoundSource *expSound = [[SimpleAudioEngine sharedEngine] soundSourceForFile:@"Exp_Small.mp3"];
expSound.pan = 1.0f;
I expected to have no sound in my left speaker, but I do have sound there and really I can not hear any difference wether pan is 0.0 or 1.0. I have tested both on simulator and on real device, same result.
What is wrong here?
You can only adjust the pan of mono sounds so my guess is you are using a stereo sound. If you want to do positional audio I’d recommend using an engine that is designed for it like ObjectAL http://kstenerud.github.com/ObjectAL-for-iPhone/
This might help
Yes I was thinking that this might be the problem, just converted the sounds to mono caf and it works great, thank you for the tip!
You must be logged in to reply to this topic.
Social Widgets powered by AB-WebLog.com.