The SoLoud MONOTONE replayer can play MONOTONE v1 songs (only format available at the time of this writing). You can pick the number of "hardware" voices used - typically the songs are composed for a single voice (PC beeper).
The waveform used is square wave. Other waveforms can be used by modifying the soloud_monotone.cpp.
You can clear all data from the Monotone object using clear:
This is primarily used internally.
You tell monotone to load a file with the load function:
result load(const char *aFilename);
If loading fails, the function returns an error code.
Monotone swingin1; swingin1.load("swingin1.mon");
The loadFile() can be used to load audio from a SoLoud::
Alternate way of loading the file is to read from a memory buffer.
result loadMem(unsigned char *aMem, int aLength, bool aCopy, bool aTakeOwnership);
The aTakeOwnership parameter can be used to tell SoLoud to free the pointer once it's done with it. The aCopy parameter is here for compatibility with the other loadMem functions.
The setParams() function can be used to adjust the way SoLoud plays the MONOTONE file.
result setParams(int aHardwareChannels, int aWaveform);
Most songs are composed for a single hardware channel. SoLoud supports up to 12 hardware channels (more can be easily added by editing soloud_monotone.cpp)
For waveform, along with the default SQUARE, the SAW, SIN and SAWSIN waveforms are supported. The SAWSIN is simply saw(t)*sin(t).
Adjusting the looping of a monotone sound does not currently have any effect. All music is set to loop by default.
As with any other audio source, you can attach filters to monotone audio sources.
You can stop all instances of a monotone sound source with stop(). This is equivalent of calling soloud.stopAudioSource() with the sound source.
Set the inaudible behavior of the sound. By default, if a sound is inaudible, it's paused, and will resume when it becomes audible again. With this function you can tell SoLoud to either kill the sound if it becomes inaudible, or to keep ticking the sound even if it's inaudible.
// Keep on talking even if I'm not around gSpeech.setInaudibleBehavior(true, false);
Set the default volume of the instances created from this audio source.
Inherited 3d audio interfaces
Like all other audio sources, monotone inherits the 3d audio interfaces. Please refer to the 3d audio chapter for details on:
Copyright©2013-2015 Jari Komppa