YSE sound engine
1.0
cross platform sound engine
|
Public Member Functions | |
interfaceObject & | create (const char *name, channel &parent) |
interfaceObject & | setVolume (Flt value) |
Flt | getVolume () |
interfaceObject & | moveTo (interfaceObject &parent) |
interfaceObject & | attachReverb () |
interfaceObject & | setVirtual (Bool value) |
bool | getVirtual () |
bool | isValid () |
const char * | getName () |
interfaceObject () | |
Channels are used to control groups of sounds simultaniously.
(Quite comparable to channel groups on a mixing console.) Every sound has to be linked to a channel at creation time. Channel can also be linked to another channel, thus creating a tree-like structure with subchannels. During DSP callback, all channels will render their audio in a separate thread. For this reason it might be a good idea to distribute your sounds over several channels.
For convenience, several typical channels are already created by the system. There's the MainMix, which is the root of the channel tree. Other channels (all linked to MainMix) are:
Of course you can use these channels for anything you like.
Definition at line 50 of file channelInterface.hpp.
interfaceObject& YSE::CHANNEL::interfaceObject::create | ( | const char * | name, |
channel & | parent | ||
) |
Creates the channel object.
You do have to call this before using a custom channel. Premade channels (FX and such) call this function internally.
name | The name of the channel. This can be used in logfiles. |
parent | The parent channel. All channels must be linked to an existing channel. |
interfaceObject& YSE::CHANNEL::interfaceObject::setVolume | ( | Flt | value | ) |
Changes the volume of a channel.
Range is 0-1.
interfaceObject& YSE::CHANNEL::interfaceObject::moveTo | ( | interfaceObject & | parent | ) |
Move the channel to another branch in the channel tree.
This detaches the channel from its current parent and links it to another channel. All sounds and subchannels move along.
parent | The new parent channel to link this channel to. |
interfaceObject& YSE::CHANNEL::interfaceObject::attachReverb | ( | ) |
Because reverb needs a lot of processing power, there's only one actual reverb object.
By default this is attached to the mainMix, thereby affecting all channels. If you want to use the reverb on only a subset of channels, call this function on the intended channel. The reverb will be moved to this channel.
interfaceObject& YSE::CHANNEL::interfaceObject::setVirtual | ( | Bool | value | ) |
Allow or disallow sounds within this channel to be virtual.
If you don't know what that means, read up on virtualisation in the manual. This function merely turns virtualisation off or on for sounds in this channel.