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.
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.