- Home /
How can i choose what channel to play my audio by myself?
I have some audio sources in my game, and I set them as 3D Sounds. Then I set my AudioSpeakerMode to Quad. Can I choose which channel to play my audio sources by myself? For example, if i want to play my audio in my front left channel only, how can i do that? Can someone give me a hand, please?
Answer by Wolin · Jul 04, 2012 at 08:52 AM
Since it is a 3D sound, a channel will depend on a location of your AudioSource and your AudioListener in the 3D space. The AudioListener is by default attached to your Camera object. So if you want to play a sound only in your front left channel you have to move your AudioSource to be on the left side in front of your camera. Or just make another gameobject with the AudioListener component attached (there can be only one in a scene).
Thanks for you answer, Wolin. But what if a 2D sound ? I want to decide which channel to play not depends on the position of the AudioSource or AudioListener. Is there any method to control it? Cause my purpose is that i want some specific audio to play only in specific two channels, and some in other two channels no matter where they are.
@IDChang if it is a 2D sound you can do it with 'AudioSource.pan'. Check this link, it is what you need. http://docs.unity3d.com/Documentation/ScriptReference/AudioSource-pan.html
O$$anonymous$$! I got it. I really appreciate your help, thanks again!
Your answer
Follow this Question
Related Questions
Can't get multiple microphone channels 3 Answers
Playing sounds to specific output channels 1 Answer
Does the number of simultaneous playing audio sources matter? 0 Answers
Creating audio channels for the customer 2 Answers
Output Audio to a 4 channel amp 0 Answers