|
OgreOggSound
1.26
|
Sound Manager: Manages all sounds for an application. More...
#include <OgreOggSoundManager.h>

Public Member Functions | |
| OgreOggSoundManager () | |
| ~OgreOggSoundManager () | |
| bool | createListener () |
| bool | init (const std::string &deviceName="", unsigned int maxSources=100, unsigned int queueListSize=100, Ogre::SceneManager *sMan=0) |
| const ALCdevice * | getOpenalDevice () |
| const ALCcontext * | getOpenalContext () |
| void | setMasterVolume (ALfloat vol) |
| void | setSceneManager (Ogre::SceneManager *sMan) |
| Ogre::SceneManager * | getSceneManager () |
| unsigned int | getNumSounds () const |
| ALfloat | getMasterVolume () |
| OgreOggISound * | createSound (const std::string &name, const std::string &file, bool stream=false, bool loop=false, bool preBuffer=false, Ogre::SceneManager *scnMgr=0, bool immediate=false) |
| OgreOggISound * | getSound (const std::string &name) |
| const Ogre::StringVector | getSoundList () const |
| bool | hasSound (const std::string &name) |
| void | setGlobalPitch (float pitch) |
| const float | getGlobalPitch () const |
| void | stopAllSounds () |
| void | pauseAllSounds () |
| void | muteAllSounds () |
| void | unmuteAllSounds () |
| void | resumeAllPausedSounds () |
| void | destroyAllSounds () |
| void | destroySound (const std::string &name="") |
| void | destroySound (OgreOggISound *sound) |
| void | _destroyTemporarySoundImpl (OgreOggISound *sound) |
| void | _destroyTemporarySound (OgreOggISound *sound) |
| bool | _requestSoundSource (OgreOggISound *sound=0) |
| bool | _releaseSoundSource (OgreOggISound *sound=0) |
| bool | _releaseSharedBuffer (const Ogre::String &sName, ALuint &buffer) |
| bool | _registerSharedBuffer (const Ogre::String &sName, ALuint &buffer, OgreOggISound *parent=0) |
| void | setDistanceModel (ALenum value) |
| void | setDopplerFactor (float factor=1.f) |
| void | setSpeedOfSound (float speed=363.f) |
| void | fadeMasterVolume (float time, bool fadeIn) |
| const Ogre::StringVector | getDeviceList () const |
| OgreOggListener * | getListener () |
| int | getNumSources () const |
| void | update (float fTime=0.f) |
| void | setResourceGroupName (const Ogre::String &group) |
| Ogre::String | getResourceGroupName () const |
| bool | hasXRamSupport () |
| bool | hasEFXSupport () |
| bool | hasEAXSupport () |
| void | setXRamBuffer (ALsizei numBuffers, ALuint *buffers) |
| void | setXRamBufferMode (ALenum mode) |
| void | setEFXDistanceUnits (float unit=3.3f) |
| bool | createEFXFilter (const std::string &eName, ALint type, ALfloat gain=1.0, ALfloat hfGain=1.0) |
| bool | createEFXEffect (const std::string &eName, ALint type, EAXREVERBPROPERTIES *props=0) |
| bool | setEFXSoundProperties (const std::string &sName, float airAbsorption=0.f, float roomRolloff=0.f, float coneOuterHF=0.f) |
| bool | _setEFXSoundPropertiesImpl (OgreOggISound *sound=0, float airAbsorption=0.f, float roomRolloff=0.f, float coneOuterHF=0.f) |
| bool | setEFXEffectParameter (const std::string &eName, ALint effectType, ALenum attrib, ALfloat param) |
| bool | setEFXEffectParameter (const std::string &eName, ALint type, ALenum attrib, ALfloat *params=0) |
| bool | setEFXEffectParameter (const std::string &eName, ALint type, ALenum attrib, ALint param) |
| bool | setEFXEffectParameter (const std::string &eName, ALint type, ALenum attrib, ALint *params=0) |
| int | getNumberOfSupportedEffectSlots () |
| int | getNumberOfCreatedEffectSlots () |
| bool | createEFXSlot () |
| bool | attachEffectToSound (const std::string &sName, ALuint slot, const Ogre::String &effect="", const Ogre::String &filter="") |
| bool | attachFilterToSound (const std::string &sName, const Ogre::String &filter="") |
| bool | detachEffectFromSound (const std::string &sName, ALuint slotID) |
| bool | detachFilterFromSound (const std::string &sName) |
| bool | _attachEffectToSoundImpl (OgreOggISound *sound=0, ALuint slot=255, const Ogre::String &effect="", const Ogre::String &filter="") |
| bool | _attachFilterToSoundImpl (OgreOggISound *sound=0, const Ogre::String &filter="") |
| bool | _detachEffectFromSoundImpl (OgreOggISound *sound=0, ALuint slotID=255) |
| bool | _detachFilterFromSoundImpl (OgreOggISound *sound=0) |
| bool | isEffectSupported (ALint effectID) |
| OgreOggSoundRecord * | createRecorder () |
| OgreOggSoundRecord * | getRecorder () |
| bool | isRecordingAvailable () const |
Public Member Functions inherited from Ogre::Singleton< OgreOggSoundManager > | |
| Singleton (void) | |
| ~Singleton (void) | |
Static Public Attributes | |
| static const Ogre::String | OGREOGGSOUND_VERSION_STRING |
Private Types | |
| typedef ALboolean(__cdecl * | LPEAXSETBUFFERMODE) (ALsizei n, ALuint *buffers, ALint value) |
| typedef ALenum(__cdecl * | LPEAXGETBUFFERMODE) (ALuint buffer, ALint *value) |
Static Private Member Functions | |
| static Ogre::Real | _calculateDistanceToListener (OgreOggISound *sound, const Ogre::Vector3 &listenerPos) |
Friends | |
| class | OgreOggSoundFactory |
Additional Inherited Members | |
Static Public Member Functions inherited from Ogre::Singleton< OgreOggSoundManager > | |
| static OgreOggSoundManager & | getSingleton (void) |
| static OgreOggSoundManager * | getSingletonPtr (void) |
Sound Manager: Manages all sounds for an application.
|
private |
|
private |
XRAM Support
| OgreOggSound::OgreOggSoundManager::OgreOggSoundManager | ( | ) |
Creates a manager for all sounds within the application.
| OgreOggSound::OgreOggSoundManager::~OgreOggSoundManager | ( | ) |
Destroys this manager.
|
private |
Attaches a created effect to an Auxiliary slot
| slot | slot ID |
| effect | effect ID |
| bool OgreOggSound::OgreOggSoundManager::_attachEffectToSoundImpl | ( | OgreOggISound * | sound = 0, |
| ALuint | slot = 255, |
||
| const Ogre::String & | effect = "", |
||
| const Ogre::String & | filter = "" |
||
| ) |
Attaches an effect to a sound
| sound | sound pointer |
| slot | slot ID |
| effect | name of effect as defined when created |
| filter | name of filter as defined when created |
| bool OgreOggSound::OgreOggSoundManager::_attachFilterToSoundImpl | ( | OgreOggISound * | sound = 0, |
| const Ogre::String & | filter = "" |
||
| ) |
Attaches a filter to a sound
| sound | sound pointer |
| filter | name of filter as defined when created |
|
staticprivate |
Calculates the distance a sound is from the specified listener position.
|
private |
Checks for EFX hardware support
|
private |
Checks and Logs a supported feature list
|
private |
Checks for XRAM hardware support
|
private |
Creates a listener object.
|
private |
Creates a single sound object (implementation).
| scnMgr | pointer to creator |
| name | Unique name of sound |
| file | Audio file path string |
| stream | Flag indicating if the sound sound be streamed. |
| loop | Flag indicating if the file should loop. |
| preBuffer | Flag indicating if a source should be attached at creation. |
|
private |
Creates a pool of OpenAL sources for playback.
|
private |
Destroys all sounds.
|
private |
Destroys a listener object.
|
private |
Destroys a single sound.
| sound | Sound object to destroy. |
| void OgreOggSound::OgreOggSoundManager::_destroyTemporarySound | ( | OgreOggISound * | sound | ) |
Destroys a temporary sound.
| sound | Sound to destroy. |
| void OgreOggSound::OgreOggSoundManager::_destroyTemporarySoundImpl | ( | OgreOggISound * | sound | ) |
Destroys a temporary sound implementation
| sound | Sound to destroy. |
| bool OgreOggSound::OgreOggSoundManager::_detachEffectFromSoundImpl | ( | OgreOggISound * | sound = 0, |
| ALuint | slotID = 255 |
||
| ) |
Detaches all effects from a sound
| sound | sound pointer |
| slotID | slot ID |
| bool OgreOggSound::OgreOggSoundManager::_detachFilterFromSoundImpl | ( | OgreOggISound * | sound = 0 | ) |
Detaches all filters from a sound
| sound | sound pointer |
|
private |
Checks for EAX effect support
|
private |
Enumerates audio devices.
|
private |
Gets a specified EFX Effect
| eName | name of effect as defined when created. |
|
private |
Gets a specified EFX filter
| fName | name of filter as defined when created. |
|
private |
Gets a specified EFX Effect slot
| slotID | index of auxiliary effect slot |
|
private |
Gets a shared audio buffer
| sName | Name of audio file |
|
private |
Implementation of sound loading
| sound | sound pointer. |
| file | name of sound file. |
| prebuffer | Prebuffer flag. |
|
private |
Opens the specified file as a new data stream.
| file | The path to the resource file to open. |
|
private |
Pauses all currently playing sounds.
|
private |
Re-activates any sounds which had their source stolen.
|
private |
Re-activates any sounds which had their source stolen, implementation methods.
| bool OgreOggSound::OgreOggSoundManager::_registerSharedBuffer | ( | const Ogre::String & | sName, |
| ALuint & | buffer, | ||
| OgreOggISound * | parent = 0 |
||
| ) |
Registers a shared audio buffer
| sName | Name of audio file |
| buffer | OpenAL buffer ID holding audio data |
|
private |
Releases all sounds and buffers
| bool OgreOggSound::OgreOggSoundManager::_releaseSharedBuffer | ( | const Ogre::String & | sName, |
| ALuint & | buffer | ||
| ) |
Releases a shared audio buffer
| sName | Name of audio file |
| buffer | buffer id |
|
private |
Destroys a single sound.
| sound | Sound to destroy. |
| bool OgreOggSound::OgreOggSoundManager::_releaseSoundSource | ( | OgreOggISound * | sound = 0 | ) |
Release a sounds source.
| sound | Sound pointer. |
|
private |
Removes references of a sound from all possible internal lists.
| sound | Sound to destroy. |
| bool OgreOggSound::OgreOggSoundManager::_requestSoundSource | ( | OgreOggISound * | sound = 0 | ) |
Requests a free source object.
| sound | Sound pointer. |
|
private |
Resumes all previously playing sounds.
|
private |
Sets EAX reverb properties using a specified present
| pEFXEAXReverb | pointer to converted EFXEAXREVERBPROPERTIES structure object |
| uiEffect | effect ID |
| bool OgreOggSound::OgreOggSoundManager::_setEFXSoundPropertiesImpl | ( | OgreOggISound * | sound = 0, |
| float | airAbsorption = 0.f, |
||
| float | roomRolloff = 0.f, |
||
| float | coneOuterHF = 0.f |
||
| ) |
Sets extended properties on a specified sounds source
| sound | name of sound. |
| airAbsorption | absorption factor for air. |
| roomRolloff | room rolloff factor. |
| coneOuterHF | cone outer gain factor for High frequencies. |
|
private |
Applys global pitch.
|
private |
Stops all currently playing sounds.
| bool OgreOggSound::OgreOggSoundManager::attachEffectToSound | ( | const std::string & | sName, |
| ALuint | slot, | ||
| const Ogre::String & | effect = "", |
||
| const Ogre::String & | filter = "" |
||
| ) |
Attaches an effect to a sound
| sName | name of sound |
| slot | slot ID |
| effect | name of effect as defined when created |
| filter | name of filter as defined when created |
| bool OgreOggSound::OgreOggSoundManager::attachFilterToSound | ( | const std::string & | sName, |
| const Ogre::String & | filter = "" |
||
| ) |
Attaches a filter to a sound
| sName | name of sound |
| filter | name of filter as defined when created |
| bool OgreOggSound::OgreOggSoundManager::createEFXEffect | ( | const std::string & | eName, |
| ALint | type, | ||
| EAXREVERBPROPERTIES * | props = 0 |
||
| ) |
Creates a specified EFX effect
| eName | name for effect. |
| type | see OpenAL docs for available effects. |
| props | legacy structure describing a preset reverb effect. |
| bool OgreOggSound::OgreOggSoundManager::createEFXFilter | ( | const std::string & | eName, |
| ALint | type, | ||
| ALfloat | gain = 1.0, |
||
| ALfloat | hfGain = 1.0 |
||
| ) |
Creates a specified EFX filter
| eName | name for filter. |
| type | see OpenAL docs for available filters. |
| gain | see OpenAL docs for available filters. |
| hfgain | see OpenAL docs for available filters. |
| bool OgreOggSound::OgreOggSoundManager::createEFXSlot | ( | ) |
Creates a specified EFX filter
| eName | name for filter. type see OpenAL docs for available filter types. |
| bool OgreOggSound::OgreOggSoundManager::createListener | ( | ) |
Creates a listener object for the system
| OgreOggSoundRecord* OgreOggSound::OgreOggSoundManager::createRecorder | ( | ) |
| OgreOggISound* OgreOggSound::OgreOggSoundManager::createSound | ( | const std::string & | name, |
| const std::string & | file, | ||
| bool | stream = false, |
||
| bool | loop = false, |
||
| bool | preBuffer = false, |
||
| Ogre::SceneManager * | scnMgr = 0, |
||
| bool | immediate = false |
||
| ) |
Creates a single sound object.
| name | Unique name of sound |
| file | Audio file path string |
| stream | Flag indicating if the sound sound be streamed. |
| loop | Flag indicating if the file should loop. |
| preBuffer | Flag indicating if a source should be attached at creation. |
| scnMgr | Pointer to SceneManager this sound belongs - 0 defaults to first SceneManager defined. |
| immediately | Optional flag to indicate creation should occur immediately and not be passed to background thread for queueing. Can be used to overcome the random creation time which might not be acceptable (MULTI-THREADED ONLY) |
| void OgreOggSound::OgreOggSoundManager::destroyAllSounds | ( | ) |
Destroys all sounds within manager.
| void OgreOggSound::OgreOggSoundManager::destroySound | ( | const std::string & | name = "" | ) |
Destroys a single sound.
| name | Sound name to destroy. |
| void OgreOggSound::OgreOggSoundManager::destroySound | ( | OgreOggISound * | sound | ) |
Destroys a single sound.
| name | Sound name to destroy. |
| bool OgreOggSound::OgreOggSoundManager::detachEffectFromSound | ( | const std::string & | sName, |
| ALuint | slotID | ||
| ) |
Detaches all effects from a sound
| sName | name of sound |
| slotID | slot ID |
| bool OgreOggSound::OgreOggSoundManager::detachFilterFromSound | ( | const std::string & | sName | ) |
Detaches all filters from a sound
| sName | name of sound |
| void OgreOggSound::OgreOggSoundManager::fadeMasterVolume | ( | float | time, |
| bool | fadeIn | ||
| ) |
Fades master volume in/out
| const Ogre::StringVector OgreOggSound::OgreOggSoundManager::getDeviceList | ( | ) | const |
Gets a list of device strings
| const float OgreOggSound::OgreOggSoundManager::getGlobalPitch | ( | ) | const |
Gets the current global pitch.
| OgreOggListener* OgreOggSound::OgreOggSoundManager::getListener | ( | ) |
Returns pointer to listener.
| ALfloat OgreOggSound::OgreOggSoundManager::getMasterVolume | ( | ) |
Gets the current global volume for all sounds
| int OgreOggSound::OgreOggSoundManager::getNumberOfCreatedEffectSlots | ( | ) |
Gets the number of currently created Auxiliary Effect slots
| int OgreOggSound::OgreOggSoundManager::getNumberOfSupportedEffectSlots | ( | ) |
Gets the maximum number of Auxiliary Effect slots per source
| unsigned int OgreOggSound::OgreOggSoundManager::getNumSounds | ( | ) | const |
Gets number of currently created sounds
References name.
| int OgreOggSound::OgreOggSoundManager::getNumSources | ( | ) | const |
Returns number of sources created.
| const ALCcontext* OgreOggSound::OgreOggSoundManager::getOpenalContext | ( | ) |
Gets the openal context ptr
| const ALCdevice* OgreOggSound::OgreOggSoundManager::getOpenalDevice | ( | ) |
Gets the openal device ptr
| OgreOggSoundRecord* OgreOggSound::OgreOggSoundManager::getRecorder | ( | ) |
Gets recording device
| Ogre::String OgreOggSound::OgreOggSoundManager::getResourceGroupName | ( | ) | const |
Returns user defined search group name
| Ogre::SceneManager* OgreOggSound::OgreOggSoundManager::getSceneManager | ( | ) |
Gets the default SceneManager for creation of sound objects
| OgreOggISound* OgreOggSound::OgreOggSoundManager::getSound | ( | const std::string & | name | ) |
Gets a named sound.
| name | Sound name. |
| const Ogre::StringVector OgreOggSound::OgreOggSoundManager::getSoundList | ( | ) | const |
Gets list of created sounds.
| bool OgreOggSound::OgreOggSoundManager::hasEAXSupport | ( | ) |
Returns EAX support status.
References type.
| bool OgreOggSound::OgreOggSoundManager::hasEFXSupport | ( | ) |
Returns EFX support status.
| bool OgreOggSound::OgreOggSoundManager::hasSound | ( | const std::string & | name | ) |
Returns whether named sound exists.
| name | Sound name. |
| bool OgreOggSound::OgreOggSoundManager::hasXRamSupport | ( | ) |
Returns XRAM support status.
| bool OgreOggSound::OgreOggSoundManager::init | ( | const std::string & | deviceName = "", |
| unsigned int | maxSources = 100, |
||
| unsigned int | queueListSize = 100, |
||
| Ogre::SceneManager * | sMan = 0 |
||
| ) |
Initialises the audio device.
| deviceName | Audio device string to open, will use default device if not found. |
| maxSources | maximum number of sources to allocate (optional) |
| queueListSize | Desired size of queue list (optional | Multi-threaded ONLY) |
| bool OgreOggSound::OgreOggSoundManager::isEffectSupported | ( | ALint | effectID | ) |
Returns whether a specified effect is supported
| effectID | OpenAL effect/filter id. (AL_EFFECT... | AL_FILTER...) |
| bool OgreOggSound::OgreOggSoundManager::isRecordingAvailable | ( | ) | const |
Returns whether a capture device is available
| void OgreOggSound::OgreOggSoundManager::muteAllSounds | ( | ) |
Mutes all sounds.
| void OgreOggSound::OgreOggSoundManager::pauseAllSounds | ( | ) |
Pauses all currently playing sounds.
| void OgreOggSound::OgreOggSoundManager::resumeAllPausedSounds | ( | ) |
Resumes all previously playing sounds.
| void OgreOggSound::OgreOggSoundManager::setDistanceModel | ( | ALenum | value | ) |
Sets distance model.
| value | ALenum value of distance model. |
| void OgreOggSound::OgreOggSoundManager::setDopplerFactor | ( | float | factor = 1.f | ) |
Sets doppler factor.
| factor | Factor scale (>0). |
| void OgreOggSound::OgreOggSoundManager::setEFXDistanceUnits | ( | float | unit = 3.3f | ) |
Sets the distance units of measurement for EFX effects.
| unit | units(meters). |
| bool OgreOggSound::OgreOggSoundManager::setEFXEffectParameter | ( | const std::string & | eName, |
| ALint | effectType, | ||
| ALenum | attrib, | ||
| ALfloat | param | ||
| ) |
Sets a specified paremeter on an effect
| eName | name of effect. |
| effectType | see OpenAL docs for available effects. |
| attrib | parameter value to alter. |
| param | float value to set. |
| bool OgreOggSound::OgreOggSoundManager::setEFXEffectParameter | ( | const std::string & | eName, |
| ALint | type, | ||
| ALenum | attrib, | ||
| ALfloat * | params = 0 |
||
| ) |
Sets a specified paremeter on an effect
| eName | name of effect. |
| type | see OpenAL docs for available effects. |
| attrib | parameter value to alter. |
| params | vector pointer of float values to set. |
| bool OgreOggSound::OgreOggSoundManager::setEFXEffectParameter | ( | const std::string & | eName, |
| ALint | type, | ||
| ALenum | attrib, | ||
| ALint | param | ||
| ) |
Sets a specified paremeter on an effect
| eName | name of effect. |
| type | see OpenAL docs for available effects. |
| attrib | parameter value to alter. |
| param | integer value to set. |
| bool OgreOggSound::OgreOggSoundManager::setEFXEffectParameter | ( | const std::string & | eName, |
| ALint | type, | ||
| ALenum | attrib, | ||
| ALint * | params = 0 |
||
| ) |
Sets a specified paremeter on an effect
| eName | name of effect. |
| type | see OpenAL docs for available effects. |
| attrib | parameter value to alter. |
| params | vector pointer of integer values to set. |
| bool OgreOggSound::OgreOggSoundManager::setEFXSoundProperties | ( | const std::string & | sName, |
| float | airAbsorption = 0.f, |
||
| float | roomRolloff = 0.f, |
||
| float | coneOuterHF = 0.f |
||
| ) |
Sets extended properties on a specified sounds source
| sName | name of sound. |
| airAbsorption | absorption factor for air. |
| roomRolloff | room rolloff factor. |
| coneOuterHF | cone outer gain factor for High frequencies. |
| void OgreOggSound::OgreOggSoundManager::setGlobalPitch | ( | float | pitch | ) |
Sets the pitch of all sounds.
| pitch | new pitch for all sounds (positive value) |
| void OgreOggSound::OgreOggSoundManager::setMasterVolume | ( | ALfloat | vol | ) |
Sets the global volume for all sounds
| vol | global attenuation for all sounds. |
| void OgreOggSound::OgreOggSoundManager::setResourceGroupName | ( | const Ogre::String & | group | ) |
Sets a resource group name to search for all sounds first.
| group | Name of OGRE ResourceGroup. |
| void OgreOggSound::OgreOggSoundManager::setSceneManager | ( | Ogre::SceneManager * | sMan | ) |
Sets the default SceneManager for creation of sound objects
| void OgreOggSound::OgreOggSoundManager::setSpeedOfSound | ( | float | speed = 363.f | ) |
Sets speed of sound.
| speed | Speed (m/s). |
| void OgreOggSound::OgreOggSoundManager::setXRamBuffer | ( | ALsizei | numBuffers, |
| ALuint * | buffers | ||
| ) |
Sets XRam buffers.
| void OgreOggSound::OgreOggSoundManager::setXRamBufferMode | ( | ALenum | mode | ) |
Sets XRam buffers storage mode.
| void OgreOggSound::OgreOggSoundManager::stopAllSounds | ( | ) |
Stops all currently playing sounds.
| void OgreOggSound::OgreOggSoundManager::unmuteAllSounds | ( | ) |
Un mutes all sounds.
References value.
| void OgreOggSound::OgreOggSoundManager::update | ( | float | fTime = 0.f | ) |
Updates system.
| fTime | Elapsed frametime. |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
OpenAL device objects
|
private |
|
private |
|
private |
|
private |
EAX Support
|
private |
|
private |
|
private |
|
private |
EFX Support
|
private |
|
private |
|
private |
Fading vars
|
private |
|
private |
|
private |
|
private |
|
private |
Listener pointer
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Sound lists
|
private |
Creates a recordable object
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
static |