SFXSystem Class Reference#include <sfxSystem.h>
Detailed DescriptionThis class provides access to the sound system.There are a few script preferences that are used by the sound providers. $pref::SFX::frequency - This is the playback frequency for the primary sound buffer used for mixing. Although most providers will reformat on the fly, for best quality and performance match your sound files to this setting. $pref::SFX::bitrate - This is the playback bitrate for the primary sound buffer used for mixing. Although most providers will reformat on the fly, for best quality and performance match your sound files to this setting.
Member Enumeration Documentation
Constructor & Destructor Documentation
The non-virtual destructor. You shouldn't ever need to overload this class.
Member Function Documentation
Called to reprioritize and reassign buffers as sources change state, volumes are adjusted, and the listener moves around.
This called to reprioritize and reassign voices to sources.
Called from SFXProfile to create a device specific sound buffer used in conjunction with a voice in playback.
Returns the one an only instance of the SFXSystem unless it hasn't been initialized or its been disabled in your build. For convienence you can use the SFX-> macro as well.
This is called from initialization to prepare the sound system singleton. This also includes registering common resource types and initializing available sound providers.
This is called after Sim::shutdown() in shutdownLibraries() to free the sound system singlton. After this the SFX singleton is null and any call to it will crash.
This is only public so that it can be called by the game update loop. It updates the current device and all sources.
This initializes a new device.
Returns the current device information or NULL if no device is present. The information string is in the following format: Provider Name Name Hardware Buffers
This destroys the current device. All sources loose their playback buffers, but otherwise continue to function.
Returns true if a device is allocated.
Used to create new sound sources from a sound profile. The returned source is in a stopped state and ready for playback. Use the SFX_DELETE macro to free the source when your done.
Creates a source which when it finishes playing will auto delete itself. Be aware that the returned SFXSource pointer should only be used for error checking or immediate setting changes. It may be deleted as soon as the next system tick.
Returns the one and only listener object.
Stops all the sounds in a particular channel or across all channels if the channel is -1.
Returns the volume for the specified sound channel.
Sets the volume on the specified sound channel, changing the volume on all sources in that channel.
Returns the system master volume level.
Sets the master volume level, changing the volume of all sources.
Friends And Related Function Documentation
Member Data Documentation
The one and only instance of the SFXSystem.
The current output sound device initialized and ready to play back.
This contains all the sources currently created in the system. This includes all the play once sources below as well.
This is used to keep track of play once sources that must be released when they stop playing.
The position and orientation of the listener.
The last time the system got an update.
The channel volume which controls the volume of all sources assigned to that channel.
The overall volume for all sounds in the system.
Stats reported back to the console for tracking performance.
|