|
OgreOggSound
1.26
|
A single sound object. More...
#include <OgreOggISound.h>

Classes | |
| class | SoundListener |
| Listener callback. More... | |
Public Member Functions | |
| void | play (bool immediate=false) |
| void | pause (bool immediate=false) |
| void | stop (bool immediate=false) |
| void | loop (bool loop) |
| virtual void | setLoopOffset (float startTime) |
| float | getLoopOffset () |
| virtual void | setSource (ALuint &src)=0 |
| void | startFade (bool dir, float fadeTime, FadeControl actionOnCompletion=OgreOggSound::FC_NONE) |
| bool | isTemporary () const |
| virtual bool | isMono ()=0 |
| void | markTemporary () |
| void | disable3D (bool disable) |
| virtual void | setPlayPosition (float seconds) |
| virtual float | getPlayPosition () const |
| SoundState | getState () const |
| bool | isPlaying () const |
| bool | isPaused () const |
| bool | isStopped () const |
| bool | isRelativeToListener () const |
| void | setGiveUpSourceOnStop (bool giveup=false) |
| void | setPosition (float posx, float posy, float posz) |
| void | setPosition (const Ogre::Vector3 &pos) |
| void | setDirection (float dirx, float diry, float dirz) |
| void | setDirection (const Ogre::Vector3 &dir) |
| void | setVelocity (float velx, float vely, float velz) |
| void | setVelocity (const Ogre::Vector3 &vel) |
| void | setVolume (float gain) |
| float | getVolume () const |
| void | setMaxVolume (float maxGain) |
| void | setMinVolume (float minGain) |
| void | setConeAngles (float insideAngle=360.f, float outsideAngle=360.f) |
| void | setOuterConeVolume (float gain=0.f) |
| void | setMaxDistance (float maxDistance) |
| const float | getMaxDistance () const |
| void | setRolloffFactor (float rolloffFactor) |
| const float | getRolloffFactor () const |
| void | setReferenceDistance (float referenceDistance) |
| const float | getReferenceDistance () const |
| void | setPitch (float pitch) |
| const float | getPitch () const |
| void | setRelativeToListener (bool relative) |
| const Ogre::Vector3 & | getPosition () const |
| const Ogre::Vector3 & | getDirection () const |
| bool | isFading () const |
| virtual void | update (float fTime) |
| ALuint | getSource () const |
| const Ogre::String & | getName (void) const |
| virtual const Ogre::String & | getFileName (void) const |
| Ogre::uint8 | getPriority () const |
| void | setPriority (Ogre::uint8 priority) |
| bool | addCuePoint (float seconds) |
| void | removeCuePoint (unsigned short index) |
| void | clearCuePoints () |
| void | setCuePoint (unsigned short index) |
| float | getCuePoint (unsigned short index) |
| unsigned int | getNumCuePoints () |
| float | getAudioLength () const |
| virtual const Ogre::String & | getMovableType (void) const |
| virtual const Ogre::AxisAlignedBox & | getBoundingBox (void) const |
| virtual float | getBoundingRadius (void) const |
| Ogre::SceneManager * | getSceneManager () const |
| void | setListener (SoundListener *l) |
| void | _setSharedProperties (sharedAudioBuffer *buffer) |
| void | _getSharedProperties (BufferListPtr &buffers, float &length, ALenum &format) |
Public Member Functions inherited from Ogre::MovableObject | |
| MovableObject () | |
| MovableObject (const String &name) | |
| virtual | ~MovableObject () |
| MovableObjectFactory * | _getCreator (void) const |
| LightList * | _getLightList () |
| SceneManager * | _getManager (void) const |
| virtual const Matrix4 & | _getParentNodeFullTransform (void) const |
| virtual void | _notifyAttached (Node *parent, bool isTagPoint=false) |
| virtual void | _notifyCreator (MovableObjectFactory *fact) |
| virtual void | _notifyCurrentCamera (Camera *cam) |
| virtual void | _notifyManager (SceneManager *man) |
| virtual void | _notifyMoved (void) |
| virtual void | _releaseManualHardwareResources () |
| virtual void | _restoreManualHardwareResources () |
| void | addQueryFlags (uint32 flags) |
| void | addVisibilityFlags (uint32 flags) |
| virtual AnimableValuePtr | createAnimableValue (const String &valueName) |
| void | detachFromParent (void) |
| const StringVector & | getAnimableValueNames (void) const |
| bool | getCastShadows (void) const |
| const AxisAlignedBox & | getDarkCapBounds (const Light &light, Real dirLightExtrusionDist) const |
| EdgeData * | getEdgeList (void) |
| const AxisAlignedBox & | getLightCapBounds (void) const |
| uint32 | getLightMask () const |
| Listener * | getListener (void) const |
| const String & | getName (void) const |
| Node * | getParentNode (void) const |
| SceneNode * | getParentSceneNode (void) const |
| Real | getPointExtrusionDistance (const Light *l) const |
| uint32 | getQueryFlags (void) const |
| bool | getReceivesShadows () |
| Real | getRenderingDistance (void) const |
| Real | getRenderingMinPixelSize () const |
| uint8 | getRenderQueueGroup (void) const |
| ShadowRenderableListIterator | getShadowVolumeRenderableIterator (ShadowTechnique shadowTechnique, const Light *light, HardwareIndexBufferSharedPtr *indexBuffer, size_t *indexBufferUsedSize, bool extrudeVertices, Real extrusionDist, unsigned long flags=0) |
| virtual uint32 | getTypeFlags (void) const |
| const Any & | getUserAny (void) const |
| UserObjectBindings & | getUserObjectBindings () |
| const UserObjectBindings & | getUserObjectBindings () const |
| uint32 | getVisibilityFlags (void) const |
| bool | getVisible (void) const |
| virtual const AxisAlignedBox & | getWorldBoundingBox (bool derive=false) const |
| virtual const Sphere & | getWorldBoundingSphere (bool derive=false) const |
| bool | hasEdgeList (void) |
| bool | isAttached (void) const |
| bool | isDebugDisplayEnabled (void) const |
| virtual bool | isInScene (void) const |
| bool | isParentTagPoint () const |
| virtual bool | isVisible (void) const |
| const LightList & | queryLights (void) const |
| void | removeQueryFlags (uint32 flags) |
| void | removeVisibilityFlags (uint32 flags) |
| void | setCastShadows (bool enabled) |
| void | setDebugDisplayEnabled (bool enabled) |
| void | setLightMask (uint32 lightMask) |
| void | setListener (Listener *listener) |
| void | setQueryFlags (uint32 flags) |
| void | setRenderingDistance (Real dist) |
| void | setRenderingMinPixelSize (Real pixelSize) |
| virtual void | setRenderQueueGroup (uint8 queueID) |
| virtual void | setRenderQueueGroupAndPriority (uint8 queueID, ushort priority) |
| void | setUserAny (const Any &anything) |
| void | setVisibilityFlags (uint32 flags) |
| void | setVisible (bool visible) |
Public Member Functions inherited from Ogre::ShadowCaster | |
| virtual | ~ShadowCaster () |
Public Member Functions inherited from Ogre::AnimableObject | |
| AnimableObject () | |
| virtual | ~AnimableObject () |
| const StringVector & | getAnimableValueNames (void) const |
Protected Member Functions | |
| OgreOggISound (const Ogre::String &name, Ogre::SceneManager *scnMgr) | |
| virtual | ~OgreOggISound () |
| virtual void | _openImpl (Ogre::DataStreamPtr &fileStream)=0 |
| virtual void | _openImpl (const Ogre::String &fName, sharedAudioBuffer *buffer=0) |
| virtual void | _playImpl ()=0 |
| virtual void | _pauseImpl ()=0 |
| virtual void | _stopImpl ()=0 |
| virtual void | _release ()=0 |
| virtual void | _updateRenderQueue (Ogre::RenderQueue *queue) |
| virtual void | _notifyAttached (Ogre::Node *node) |
| virtual void | _updateRenderQueue (Ogre::RenderQueue *queue, Ogre::Camera *camera, const Ogre::Camera *lodCamera) |
| virtual void | visitRenderables (Ogre::Renderable::Visitor *visitor, bool debugRenderables) |
| void | _initSource () |
| void | _markPlayPosition () |
| void | _recoverPlayPosition () |
| void | _updateFade (float fTime=0.f) |
| virtual void | _updateAudioBuffers ()=0 |
| virtual void | _prebuffer ()=0 |
| virtual bool | _queryBufferInfo ()=0 |
Protected Attributes | |
| float | mFadeTimer |
| float | mFadeTime |
| float | mFadeInitVol |
| float | mFadeEndVol |
| bool | mFade |
| FadeControl | mFadeEndAction |
| Ogre::DataStreamPtr | mAudioStream |
| ov_callbacks | mOggCallbacks |
| SoundListener * | mSoundListener |
| size_t | mBufferSize |
| ALuint | mSource |
| Ogre::SceneManager * | mScnMan |
| Ogre::uint8 | mPriority |
| Ogre::Vector3 | mPosition |
| Ogre::Vector3 | mDirection |
| Ogre::Vector3 | mVelocity |
| float | mGain |
| float | mMaxGain |
| float | mMinGain |
| float | mMaxDistance |
| float | mRolloffFactor |
| float | mReferenceDistance |
| float | mPitch |
| float | mOuterConeGain |
| float | mInnerConeAngle |
| float | mOuterConeAngle |
| float | mPlayTime |
| Ogre::String | mName |
| SoundState | mState |
| bool | mLoop |
| bool | mDisable3D |
| bool | mGiveUpSource |
| bool | mStream |
| bool | mSourceRelative |
| bool | mPlayPosChanged |
| bool | mSeekable |
| bool | mTemporary |
| bool | mInitialised |
| Ogre::uint8 | mAwaitingDestruction |
| BufferListPtr | mBuffers |
| ALenum | mFormat |
| unsigned long | mAudioOffset |
| unsigned long | mAudioEnd |
| float | mLoopOffset |
| float | mLoopStart |
| ALfloat | mPlayPos |
| std::deque< float > | mCuePoints |
Friends | |
| class | OgreOggSoundManager |
A single sound object.
provides functions for setting audio properties on a 3D sound as well as stop/pause/play operations.
|
protected |
Superclass describing a single sound object.
| name | Name of sound within manager |
| scnMgr | SceneManager which create this sound |
|
protectedvirtual |
Superclass destructor.
| void OgreOggSound::OgreOggISound::_getSharedProperties | ( | BufferListPtr & | buffers, |
| float & | length, | ||
| ALenum & | format | ||
| ) |
Gets properties of a shared resource.
| buffers | Reference to an array of OpenAL buffers |
| length | Reference to an object to store audio length |
| buffer | Reference to an object to store loopOffset in bytes |
| buffer | Reference to an object to store buffer format |
|
protected |
Inits source object
|
protected |
Stores the current play position of the sound
|
protectedvirtual |
Notifys object its been attached to a node
|
protectedpure virtual |
Open implementation.
Implemented in OgreOggSound::OgreOggStreamSound, OgreOggSound::OgreOggStreamWavSound, OgreOggSound::OgreOggStaticSound, and OgreOggSound::OgreOggStaticWavSound.
|
protectedvirtual |
Open implementation.
Reimplemented in OgreOggSound::OgreOggStaticSound, and OgreOggSound::OgreOggStaticWavSound.
References _notifyAttached(), _notifyMoved(), _updateRenderQueue(), OGRE_VERSION_MAJOR, and visitRenderables().
|
protectedpure virtual |
Pause implementation.
Implemented in OgreOggSound::OgreOggStreamSound, OgreOggSound::OgreOggStreamWavSound, OgreOggSound::OgreOggStaticSound, and OgreOggSound::OgreOggStaticWavSound.
|
protectedpure virtual |
Play implementation.
Implemented in OgreOggSound::OgreOggStreamSound, OgreOggSound::OgreOggStreamWavSound, OgreOggSound::OgreOggStaticSound, and OgreOggSound::OgreOggStaticWavSound.
|
protectedpure virtual |
Prefills buffers with audio data.
Implemented in OgreOggSound::OgreOggStreamSound, OgreOggSound::OgreOggStreamWavSound, OgreOggSound::OgreOggStaticSound, and OgreOggSound::OgreOggStaticWavSound.
|
protectedpure virtual |
Calculates buffer size and format.
Implemented in OgreOggSound::OgreOggStreamSound, OgreOggSound::OgreOggStreamWavSound, OgreOggSound::OgreOggStaticSound, and OgreOggSound::OgreOggStaticWavSound.
|
protected |
Sets the previous play position of the sound
|
protectedpure virtual |
Release implemenation
Implemented in OgreOggSound::OgreOggStreamSound, OgreOggSound::OgreOggStreamWavSound, OgreOggSound::OgreOggStaticSound, and OgreOggSound::OgreOggStaticWavSound.
| void OgreOggSound::OgreOggISound::_setSharedProperties | ( | sharedAudioBuffer * | buffer | ) |
Sets properties of a shared resource.
| buffer | Pointer to the shared buffer to copy the properties from. |
|
protectedpure virtual |
Stop implementation.
Implemented in OgreOggSound::OgreOggStreamSound, OgreOggSound::OgreOggStreamWavSound, OgreOggSound::OgreOggStaticSound, and OgreOggSound::OgreOggStaticWavSound.
|
protectedpure virtual |
Updates audio buffers
Implemented in OgreOggSound::OgreOggStreamSound, OgreOggSound::OgreOggStreamWavSound, OgreOggSound::OgreOggStaticSound, and OgreOggSound::OgreOggStaticWavSound.
|
protected |
Updates a fade
|
protectedvirtual |
|
protectedvirtual |
do nothing but need for derived from MovableObject
| bool OgreOggSound::OgreOggISound::addCuePoint | ( | float | seconds | ) |
Adds a time position in a sound as a cue point
| seconds | Cue point in seconds |
| void OgreOggSound::OgreOggISound::clearCuePoints | ( | ) |
Clears entire list of cue points
| void OgreOggSound::OgreOggISound::disable3D | ( | bool | disable | ) |
Allows switchable spatialisation for this sound.
| float OgreOggSound::OgreOggISound::getAudioLength | ( | ) | const |
Gets the length of the audio file in seconds
References getBoundingBox(), getBoundingRadius(), and getMovableType().
|
virtual |
|
virtual |
| float OgreOggSound::OgreOggISound::getCuePoint | ( | unsigned short | index | ) |
Gets a previously set cue point by index
| index | position in cue point list to get |
| const Ogre::Vector3& OgreOggSound::OgreOggISound::getDirection | ( | ) | const |
Gets the sounds direction
|
virtual |
Gets the sounds file name
Reimplemented in OgreOggSound::OgreOggStaticSound, and OgreOggSound::OgreOggStaticWavSound.
References Ogre::BLANKSTRING.
| float OgreOggSound::OgreOggISound::getLoopOffset | ( | ) |
Gets the start point of a loopable section of audio in seconds.
References OgreOggSound::FC_NONE.
| const float OgreOggSound::OgreOggISound::getMaxDistance | ( | ) | const |
Gets sounds maximum distance
|
virtual |
| const Ogre::String& OgreOggSound::OgreOggISound::getName | ( | void | ) | const |
Gets the sounds name
| unsigned int OgreOggSound::OgreOggISound::getNumCuePoints | ( | ) |
Returns number of cue points
| const float OgreOggSound::OgreOggISound::getPitch | ( | ) | const |
Gets sounds pitch
|
virtual |
Gets the position of the playback cursor in seconds
Reimplemented in OgreOggSound::OgreOggStreamSound, and OgreOggSound::OgreOggStreamWavSound.
| const Ogre::Vector3& OgreOggSound::OgreOggISound::getPosition | ( | ) | const |
Gets sounds position
| Ogre::uint8 OgreOggSound::OgreOggISound::getPriority | ( | ) | const |
Gets the sounds priority
| const float OgreOggSound::OgreOggISound::getReferenceDistance | ( | ) | const |
Gets sounds reference distance
| const float OgreOggSound::OgreOggISound::getRolloffFactor | ( | ) | const |
Gets sounds rolloff factor
| Ogre::SceneManager* OgreOggSound::OgreOggISound::getSceneManager | ( | ) | const |
Gets the SceneManager pointer registered at creation.
| ALuint OgreOggSound::OgreOggISound::getSource | ( | ) | const |
Gets the sounds source
| SoundState OgreOggSound::OgreOggISound::getState | ( | ) | const |
Gets the current state the sound is in
| float OgreOggSound::OgreOggISound::getVolume | ( | ) | const |
Gets sounds volume
| bool OgreOggSound::OgreOggISound::isFading | ( | ) | const |
Returns fade status.
|
pure virtual |
Returns whether this sound is mono
Implemented in OgreOggSound::OgreOggStreamSound, OgreOggSound::OgreOggStreamWavSound, OgreOggSound::OgreOggStaticSound, and OgreOggSound::OgreOggStaticWavSound.
| bool OgreOggSound::OgreOggISound::isPaused | ( | ) | const |
Returns pause status.
References OgreOggSound::SS_PAUSED.
| bool OgreOggSound::OgreOggISound::isPlaying | ( | ) | const |
Returns play status.
References OgreOggSound::SS_PLAYING.
| bool OgreOggSound::OgreOggISound::isRelativeToListener | ( | ) | const |
Returns position status.
| bool OgreOggSound::OgreOggISound::isStopped | ( | ) | const |
Returns stop status.
References OgreOggSound::SS_STOPPED.
| bool OgreOggSound::OgreOggISound::isTemporary | ( | ) | const |
Returns whether this sound is temporary
| void OgreOggSound::OgreOggISound::loop | ( | bool | loop | ) |
| void OgreOggSound::OgreOggISound::markTemporary | ( | ) |
Marks sound as temporary
| void OgreOggSound::OgreOggISound::pause | ( | bool | immediate = false | ) |
Pauses sound.
| void OgreOggSound::OgreOggISound::play | ( | bool | immediate = false | ) |
Plays sound.
| void OgreOggSound::OgreOggISound::removeCuePoint | ( | unsigned short | index | ) |
Removes a cue point
| void OgreOggSound::OgreOggISound::setConeAngles | ( | float | insideAngle = 360.f, |
| float | outsideAngle = 360.f |
||
| ) |
Sets sounds cone angles
| insideAngle | angle over which the volume is at maximum |
| outsideAngle | angle over which the volume is at minimum |
| void OgreOggSound::OgreOggISound::setCuePoint | ( | unsigned short | index | ) |
Shifts the play position to a previously set cue point position.
| index | position in cue point list to apply |
| void OgreOggSound::OgreOggISound::setDirection | ( | float | dirx, |
| float | diry, | ||
| float | dirz | ||
| ) |
Sets sounds direction.
| dirx | x coord |
| diry | y coord |
| dirz | z coord |
| void OgreOggSound::OgreOggISound::setDirection | ( | const Ogre::Vector3 & | dir | ) |
Sets sounds direction.
| dir | 3D vector direction |
| void OgreOggSound::OgreOggISound::setGiveUpSourceOnStop | ( | bool | giveup = false | ) |
Sets whether source is given up when stopped.
| giveup | true = release source immediately |
References setPosition().
| void OgreOggSound::OgreOggISound::setListener | ( | SoundListener * | l | ) |
Sets a listener object to be notified of events.
| l | Listener object pointer. |
References name, and OGRE_VERSION_MAJOR.
|
virtual |
Sets the start point of a loopable section of audio.
| startTime | Position in seconds to offset the loop point. |
Reimplemented in OgreOggSound::OgreOggStreamSound, and OgreOggSound::OgreOggStreamWavSound.
| void OgreOggSound::OgreOggISound::setMaxDistance | ( | float | maxDistance | ) |
Sets sounds maximum distance
| maxDistance | Distance. |
| void OgreOggSound::OgreOggISound::setMaxVolume | ( | float | maxGain | ) |
Sets sounds maximum attenuation volume
| maxGain | Volume scalar (0..1) |
| void OgreOggSound::OgreOggISound::setMinVolume | ( | float | minGain | ) |
Sets sounds minimum attenuation volume
| minGain | Volume scalar (0..1) |
| void OgreOggSound::OgreOggISound::setOuterConeVolume | ( | float | gain = 0.f | ) |
Sets sounds outer cone volume
| gain | Volume scalar (0..1) |
| void OgreOggSound::OgreOggISound::setPitch | ( | float | pitch | ) |
Sets sounds pitch
| pitch | Pitch (>0). |
|
virtual |
Sets the position of the playback cursor in seconds
| seconds | Play position in seconds |
Reimplemented in OgreOggSound::OgreOggStreamSound, and OgreOggSound::OgreOggStreamWavSound.
| void OgreOggSound::OgreOggISound::setPosition | ( | float | posx, |
| float | posy, | ||
| float | posz | ||
| ) |
Sets sounds position.
| posx | x position |
| posy | y position |
| posz | z position |
| void OgreOggSound::OgreOggISound::setPosition | ( | const Ogre::Vector3 & | pos | ) |
Sets sounds position.
| pos | 3D vector position |
| void OgreOggSound::OgreOggISound::setPriority | ( | Ogre::uint8 | priority | ) |
Sets the sounds priority
| priority | (0..255) |
| void OgreOggSound::OgreOggISound::setReferenceDistance | ( | float | referenceDistance | ) |
Sets sounds reference distance
| referenceDistance | distance (>0). |
| void OgreOggSound::OgreOggISound::setRelativeToListener | ( | bool | relative | ) |
Sets whether the positional information is relative to the listener
| relative | Boolean yes/no. |
| void OgreOggSound::OgreOggISound::setRolloffFactor | ( | float | rolloffFactor | ) |
Sets sounds rolloff factor
| rolloffFactor | Factor (>0). |
|
pure virtual |
Sets the source object for playback.
Implemented in OgreOggSound::OgreOggStaticSound, OgreOggSound::OgreOggStaticWavSound, OgreOggSound::OgreOggStreamSound, and OgreOggSound::OgreOggStreamWavSound.
| void OgreOggSound::OgreOggISound::setVelocity | ( | float | velx, |
| float | vely, | ||
| float | velz | ||
| ) |
Sets sounds velocity.
| velx | x velocity |
| vely | y velocity |
| velz | z velocity |
| void OgreOggSound::OgreOggISound::setVelocity | ( | const Ogre::Vector3 & | vel | ) |
Sets sounds velocity.
| vel | 3D vector velocity |
| void OgreOggSound::OgreOggISound::setVolume | ( | float | gain | ) |
Sets sounds volume
| gain | volume scalar. |
| void OgreOggSound::OgreOggISound::startFade | ( | bool | dir, |
| float | fadeTime, | ||
| FadeControl | actionOnCompletion = OgreOggSound::FC_NONE |
||
| ) |
Starts a fade in/out of the sound volume
| dir | Direction to fade. (true=in | false=out) |
| fadeTime | Time over which to fade (>0) |
| actionOnCompletion | Optional action to perform when fading has finished (default: NONE) |
| void OgreOggSound::OgreOggISound::stop | ( | bool | immediate = false | ) |
Stops sound.
|
virtual |
Updates sund
| fTime | Elapsed frametime. |
|
protectedvirtual |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Variables used to fade sound
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Sound properties
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |