andelf / rust-sdl2_mixer

Rust bindings for sdl2_mixer
Apache License 2.0
13 stars 17 forks source link

Added Sdl2MixerContext and tweaked various other things. #40

Closed MarkDDR closed 8 years ago

MarkDDR commented 8 years ago

Sdl2MixerContext is created with init, and has drop implemented. This means that it will automatically drop at the end, after Music would drop, solving Issue #32. Additionally, I also changed init to check returned flags and produce an error if not every single flag is initialized. InitFlags.to_string() is for producing the error message.

I also updated examples/demo.rs to work with these new changes.

Finally, I added some documentation and tweaked some functions slightly. For example, setvolume no longer returns anything, and I added unset functions for the various channel effects, like unset_panning()

I also ran rustfmt on the project, which is why there is so many formatting changes.

MarkDDR commented 8 years ago

btw I may have bumped the version up too much, so feel free to lower it a bit

andelf commented 8 years ago

published as 0.11.0 . :)