17cupsofcoffee / tetra

🎮 A simple 2D game framework written in Rust
MIT License
909 stars 63 forks source link

Updated rodio from 0.11 to 0.13 #255

Closed VictorKoenders closed 3 years ago

VictorKoenders commented 3 years ago

Updated rodio.

A breaking change seems to be that devices and audio streams are now two different things. OutputStream now has try_default() and OutputStreamHandle now has play_raw.

The OutputStream must be kept in memory even though we're only interacting with the OutputStreamHandle as per the documentation:

If this (the OutputStream) is dropped playback will end & attached OutputStreamHandles will no longer work.

Changelog: https://github.com/RustAudio/rodio/blob/master/CHANGELOG.md Commits: https://github.com/RustAudio/rodio/compare/7bf8ba5cb629d419a2bd003f8e8e387b1db1f717..c397a4d8d18402badefddea89b53ed42226adb5e

17cupsofcoffee commented 3 years ago

I've been a bit hesitant to upgrade Rodio, because there's a few regressions listed on their issue tracker that don't seem to have been resolved (one with 'nightmare noises' in the title, which doesn't inspire confidence...). Additionally, I'm very eager to move away from Rodio long term - oddio seems much better designed, and would potentially allow me to hook into SDL2's (very stable, iirc) audio backend for IO.

Is there anything specific from Rodio 0.12/0.13 that you're missing? If so, I'll probably do the upgrade as a stopgap :)

VictorKoenders commented 3 years ago

Is there anything specific from Rodio 0.12/0.13 that you're missing?

No, I noticed vek was outdated and went to see how much effort it was to update that, and I ended up making a PR for every outdated dependency. If you want to keep rodio at 0.11 that's perfectly fine

17cupsofcoffee commented 3 years ago

:+1: I'll keep the Dependabot PR (#258) open so I don't forget about it, either way.

Also, this PR made me notice that the path is wrong in the audio example, so not a waste of time 😄