|Topic was automatically imported from the old Question2Answer platform.
|Allen Kennedy Jr.
I have a simple scene (Node2D) with an AudioStreamPlayer2D, with an audio file (ogg) that has a sound than pans from left channel to right channel.
In the _ready() function of the Node2D, I call play on the AudioStreamPlayer2D.
In the godot editor, if I check the “playing” field in the node inspector of the AudioStream I can hear the sound. it plays properly through both channels.
But, when I test play the scene, I only get sound on the left channel.
Is there some feature I need to enable or change to get stereo output on played scenes?
I re-exported the sound with Audacity as a WAV file. Same results. Stereo sound in the editor, but left channel only when testing the scene
Allen Kennedy Jr. | 2020-06-02 00:59
AudioStreamPlayer2D ,the audio output changes according to the
AudioStreamPlayer2D node’s position according to the camera’s position.
for example, if you put the
AudioStreamPlayer2D in the player’s scene tree, and during the game- the player’s position is to the left of the camera’s position- you will get stronger sound on the left channel than the right. And so is the opposite.
Are you sure you don’t want to use
This way you will get the same sound from both sides no matter what.
(or you could just change the camera’s position according to where your
AudioStreamPlayer2D is in the scene)
I hope you will find this helpful
That was the answer!
AudioStreamPlayer instead of
What tricked me was the naming convention… most everything in Godot is by default 3D unless specified as 2D such as
Area which is 3d, while
Area2Dis for 2D use and
Camera which again is 3D, while
Camera2D is for 2D use. So naturally I thought
AudioStreamPlayer was for 3D
Godot sets up a precedent with a naming convention and then changes it when it comes to the AudioStreamPlayer… where there are separate 2D, 3D, and 1D versions.
Allen Kennedy Jr. | 2020-06-02 16:03
I agree, it’s very confusing. I’m glad this was the answer that you were looking for!
drorya | 2020-06-02 17:25