Audio channels are sometimes reversed depending on debug and release builds
To reproduce:
Run cargo run --example spatial. Notice the sound starting from the right.
Run cargo run --example spatial --release. Notice the sound starting from the left.
Related to this comment:
- https://github.com/bevyengine/bevy/pull/6028#issuecomment-1253328622
I can reproduce this with rodio 0.16.0.
macOS 12.6 MacBook Pro (M1 Max) Bluetooth headphones, built-in speakers
Although it seems unlikely that this is related to spatial audio specifically, and I'd imagine the issue is upstream in CPAL and only coincidentally related to the release/debug setting.
Here's a test wav that should play tones in the right and then left channels.
When I play this with the music_wav example, I always hear a tone on the left first, no matter the debug/release setting.
Using @rparrett's audio file, I tested it with kira and oddio (both using cpal) and can confirm that this is an issue on rodio's end, not on cpal. Both kira and oddio produce the correct output.
It seems that this plays differently for other people. bevyengine/bevy#6122 and this comment have it reversed (correct in debug, wrong in release).