Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio channels are sometimes reversed depending on debug and release builds #444

Closed
harudagondi opened this issue Sep 21, 2022 · 3 comments · Fixed by #455
Closed

Audio channels are sometimes reversed depending on debug and release builds #444

harudagondi opened this issue Sep 21, 2022 · 3 comments · Fixed by #455

Comments

@harudagondi
Copy link
Contributor

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:

@rparrett
Copy link

rparrett commented Sep 28, 2022

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.

@harudagondi
Copy link
Contributor Author

harudagondi commented Sep 28, 2022

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 harudagondi changed the title Spatial audio reverses direction when in debug mode compared to release Audio channels are sometimes reversed depending on debug and release builds Sep 29, 2022
@harudagondi
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants