It's been a while since I last posted, and I've had a little bit of time to work on Rubygame 2.3, so this seems like a good time for a status update!
Here's what is done so far:
- The Music class and all methods. It replaces the old Mixer::Music class, which will co-exist with Music until Rubygame 3.0.
- The Sound class and all methods. It replaces the old Mixer::Sample class, which will also stick around until 3.0. Sound is a lot simpler to use than Sample, because you don't have to manage allocating or assigning audio channels, you can just focus on the stuff you want the Sound to do (play, stop, change volume, etc.). It also allows you to make "shallow" copies to pass around, without having to load multiple copies of the audio data into memory.
- Audio will open automatically with the default settings when you first use the Music or Sound class, if it isn't open already.
- Rubygame.open_audio and close_audio. (Equivalent functionality to Mixer.open_audio and close_audio.)
- Rubygame.open_audio takes an optional hash of symbol => value pairs for specifying the sample rate, stereo or mono sound, and the size of the sound buffer. (I've decided not to include the ability to specify audio format until someone specifically asks for it, with a legitimate need.)
- Documentation and tests for all of the above.
What's left to do:
- Add deprecation warnings to the old methods and classes. (As I said last time, the warnings will only appear if you ruby ruby with warnings enabled.)
- Add the names system, where each Music or Sound can have a name (by default, the filename it was loaded from), and you can retrieve it later with e.g.
- I might do the names system for Surface too, and deprecate MediaBag.
- I probably won't add Music.set_music_command (for using external music commands) in 2.3. It can be added later, if someone specifically asks for it.
Once that's taken care of, I'll make a branch of the 2.2 release and add the new stuff to that (easier than branching trunk and removing all the 3.0 stuff I've added over the past months). And then, release!