I'm working on a MonoGame project where, when a weapon is fired, a bullet's sound effect is supposed to play, with the audio panned depending on the starting position of the bullet.
The docs say that the pan value ranges from -1.0f to 1.0f, but audio is only playing out of the left speaker, right speaker, or equally balanced. pan = 0.1f is being treated the same as pan = 1.0f. This behaved as expected when using the SharpDX library, but not after we moved to OpenGL.
This is the function we wrote to play the audio.
public static void PlaySound(string name, float vol = 0.5f, float pan = 0.0f, bool jitter = false)
bool ok = SFX.TryGetValue(name, out SoundEffect audio);
float pitch = jitter ? ((float)Utils.Random.NextDouble() / 4.0f) : 0.0f;
audio.Play(vol, pitch, pan);
This is an x-post from https://stackoverflow.com/questions/53271206/monogame-audio-panning-restricted-to-100-left-100-right-or-50-50. Any help would be appreciated!