The purpose of this module is to provide audio functions for things like playback, capture, and volume on both Windows (via the mmsystem calls)and Linux (through ALSA).
It is only aimed at the basics, and will be filled in as I want a particular feature. I don't generally need super configurability and see it as a minus, since I don't generally care either, so I'm going to be going for defaults that just work. If you need more though, you can hack the source or maybe just use it for the operating system bindings.
For example, I'm starting this because I want to write a volume control program for my linux box, so that's what is going first. That will consist of a listening callback for volume changes and being able to get/set the volume.
Thrown on audio failures. Subclass this to provide OS-specific exceptions
Makes an audio thread for you that you can make various sounds on and it will mix them with good enough latency for simple games.
Puts a note on at the beginning of the passed slice, advancing it by the amount of the message size. Returns the message slice.
Pitch bend. FIXME doesn't work right
Gives PCM input access (such as a microphone).
Interfaces with the default sound card. You should only have a single instance of this and it should be stack allocated, so its destructor cleans up after it.
Gives PCM output access (such as the speakers).
Gives MIDI output access.
HOW IT WORKS: You make a callback which feeds data to the device. Make an AudioOutput struct then feed your callback to it. Then play.
Then call loop? Or that could be in play?
Methods: setCallback play pause
TODO: * play audio high level with options to wait until completion or return immediately * midi mid-level stuff * audio callback stuff (it tells us when to fill the buffer)
* Windows support for waveOut and waveIn. Maybe mixer too, but that's lowest priority.
* I'll also write .mid and .wav functions at least eventually. Maybe in separate modules but probably here since they aren't that complex.
I will probably NOT do OSS anymore, since my computer doesn't even work with it now. Ditto for Macintosh, as I don't have one and don't really care about them.