Sets up and opens the host's audio device. This method may need keyboard input in order to perform its task, so the AudioOutput object should be created before the Keyboard object.
Loads an audio sample from disk. The format will be as appropriate for the host platform, for example - the DOS version loads .wav files. You are returned a pointer which is used to reference the sample. You should not try to evaluate the pointer, as the structure of a sample will differ by implementation.
Creates a synthesized audio sample. The waveform pointer should point to 8 bit signed waveform data. length gives the length in bytes of the waveform data. frequency is in samples/second.
You should call this to free any memory allocated when a sample is loaded from disk. Pass the pointer returned from loadSample(). You should, obviously, not attempt to use the sample after it has been freed.
Like freeSample(), but this frees memory allocated to a synth sample.
Open an audio channel. Each channel can be used to play one sample at a time. volume is a value from 0..255 which give the relative volume of samples played on that channel. position goes from 0 (far left) to 255 (far right).
The return value is a pointer which is used to reference the channel.
Close a channel openned with openChannel().
Returns true if a sample is currently playing on the given channel.
Stop any sample which is currently playing on the given channel.
Play a given waveform on a given channel. The waveform may be either a sample or a synth sample. It will be played using the settings given to openChannel().
Modifies the given synth sample. The length and frequency are unchanged, but the waveform data is set to the values pointed to by the data parameter.
Update should be called regularly (once per frame), and keeps the audio data going to the sound card.