-
Notifications
You must be signed in to change notification settings - Fork 468
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
How to play a WAV file? #458
Comments
Moved to stackoverflow with a little more detail: http://stackoverflow.com/questions/33057198/how-to-play-a-wav-file-with-rust-sdl2 |
There's no interface for playing back a WAV file, or any buffer with an audio format determined at runtime. The issue is that
I may introduce a PR to allow dynamically specifying an audio format for playback, but for the meanwhile, you can convert the WAV to a target audio format using |
hrm ok, thanks for the pointers. |
I found
AudioSpecWAV
, but none of the audio initialisation methods seem to take it as a type, and it doesn't implementAudioCallback
. I tried implementing this myself with my own callback looking something like:... but I don't know how to work around the following error I get:
the trait
core::marker::Syncis not implemented for the type
*mut u8``The text was updated successfully, but these errors were encountered: