You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PCM audio played via Gdx.audio.newAudioDevice does not properly play stereo content with the LWJGL3 backend, but does with the default desktop backend. It's not fully mono but it isn't stereo to the correct extent either.
Reproduction steps/code
public class Test extends ApplicationAdapter {
AudioDevice audioDevice;
float deviceSamples[] = new float[1024];
float x = 0;
@Override
public void create () {
audioDevice = Gdx.audio.newAudioDevice(44100, false);
}
@Override
public void render () {
new Thread() {
@Override
public void run() {
while (true) {
try {
for (int a = 0; a < 1024; a += 2) {
float sample = .2f * (float) Math.sin(x);
x += 0.0005;
deviceSamples[a] = 0; // Left speaker should be silent.
deviceSamples[a + 1] = sample; // Right speaker should make noise.
}
audioDevice.writeSamples(deviceSamples, 0, deviceSamples.length);
int latency = audioDevice.getLatency();
sleep(500 * latency / 44100);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}.start();
}
}
Expectation: Sound only comes out of the right speaker.
Reality: Sound comes mostly out of the right speaker, but also somewhat from the left. It works fine when using the default lwjgl2 backend, but not with the lwjgl3 backend.
Version of LibGDX and/or relevant dependencies
libgdx 1.10.0
Please select the affected platforms
Android
iOS
HTML/GWT
[ X] Windows
Linux
MacOS
The text was updated successfully, but these errors were encountered:
Issue details
PCM audio played via Gdx.audio.newAudioDevice does not properly play stereo content with the LWJGL3 backend, but does with the default desktop backend. It's not fully mono but it isn't stereo to the correct extent either.
Reproduction steps/code
Expectation: Sound only comes out of the right speaker.
Reality: Sound comes mostly out of the right speaker, but also somewhat from the left. It works fine when using the default lwjgl2 backend, but not with the lwjgl3 backend.
Version of LibGDX and/or relevant dependencies
libgdx 1.10.0
Please select the affected platforms
The text was updated successfully, but these errors were encountered: