odl's Audio functionality can be used independently from odl's Graphics functionality. Audio must be started and stopped similarly to Graphics.
odl Audio supports the following audio types out of the box:
Waveform Audio File Format (.wav)
OGG Vorbis (.ogg)
MPEG-1 Audio Layer III (.mp3)
However, odl's Audio API is capable of supporting many more audio formats, so this will likely be expanded upon in time. Please feel free to create an issue page on odl's repository if you would like to request support for a certain extension.
Initializing odl's Audio class is done with Audio.Start(), and stopping it is done with Audio.Stop().
To start the Audio engine, you must call Audio.Start(). You can pass an optional boolean argument UseBassFX which defaults to true, and this determines whether or not to attempt to load bass_fx. If bass_fx is not initialized by calling Audio.Start(true) and bass_fx is not present in the working directory, you will not be able to change the pitch of your audio.
The most basic way to play a file, is by calling Audio.Play(string Filename).
You can also pass an optional Volume property (default 100, meaning 100%) and a Pitch property (default 0, ranging from -30 to 30).
Besides Audio.Play, there are three more methods that have functionality more tailored to game development:
Audio.BGMPlay: Plays the given sound and loops it. If a BGM was already playing, it will fade the old BGM out and fade the new BGM in in a timespan of 0.5 seconds.
Audio.MEPlay: Plays the given sound over the BGM. If a BGM is playing, it is faded out and paused. The ME will then play, after which the BGM is faded back in and continued.
Audio.SEPlay: Plays the given sound once without interrupting anything or being interrupted. Identical to Audio.Play.
The Audio.Play() method also takes a Sound object. This will be explained in the next section.