YSE sound engine  1.0
cross platform sound engine
 All Classes Namespaces Functions Pages
YSE::CHANNEL::interfaceObject Class Reference

Public Member Functions

interfaceObjectcreate (const char *name, channel &parent)
 
interfaceObjectsetVolume (Flt value)
 
Flt getVolume ()
 
interfaceObjectmoveTo (interfaceObject &parent)
 
interfaceObjectattachReverb ()
 
interfaceObjectsetVirtual (Bool value)
 
bool getVirtual ()
 
bool isValid ()
 
const char * getName ()
 
 interfaceObject ()
 

Detailed Description

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:

  • FX : Intended for short audio effects
  • Music : Intended for playlists and other music
  • Ambient: Intended for environmental sounds
  • Voice : Intended for dialogs
  • Gui : Intended for interface sounds

Of course you can use these channels for anything you like.

Definition at line 50 of file channelInterface.hpp.

Member Function Documentation

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.

Parameters
nameThe name of the channel. This can be used in logfiles.
parentThe 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.

Parameters
parentThe 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.


The documentation for this class was generated from the following file: