rodio icon indicating copy to clipboard operation
rodio copied to clipboard

Audio channels are sometimes reversed depending on debug and release builds

Open harudagondi opened this issue 3 years ago • 3 comments

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

harudagondi avatar Sep 21 '22 13:09 harudagondi

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.

RL.zip

When I play this with the music_wav example, I always hear a tone on the left first, no matter the debug/release setting.

rparrett avatar Sep 28 '22 18:09 rparrett

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.

harudagondi avatar Sep 28 '22 22:09 harudagondi

It seems that this plays differently for other people. bevyengine/bevy#6122 and this comment have it reversed (correct in debug, wrong in release).

harudagondi avatar Sep 29 '22 01:09 harudagondi