Ogre Video and Audio Plugins
master
|
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) |
bool | isLooping () |
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) |
bool | is3Ddisabled () |
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) |
float | getMaxVolume () |
void | setMinVolume (float minGain) |
float | getMinVolume () |
void | setConeAngles (float insideAngle=360.f, float outsideAngle=360.f) |
float | getConeInsideAngle () |
float | getConeOutsideAngle () |
void | setOuterConeVolume (float gain=0.f) |
float | getOuterConeVolume () |
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 *listener) |
void | _setSharedProperties (sharedAudioBuffer *buffer) |
void | _getSharedProperties (BufferListPtr &buffers, float &length, ALenum &format) |
![]() | |
MovableObject () | |
MovableObject (const String &name) | |
virtual | ~MovableObject () |
MovableObjectFactory * | _getCreator (void) const |
LightList * | _getLightList () |
SceneManager * | _getManager (void) const |
virtual const Affine3 & | _getParentNodeFullTransform (void) const |
virtual void | _notifyCreator (MovableObjectFactory *fact) |
virtual void | _notifyCurrentCamera (Camera *cam) |
virtual void | _notifyManager (SceneManager *man) |
virtual void | _releaseManualHardwareResources () |
virtual void | _restoreManualHardwareResources () |
void | addQueryFlags (uint32 flags) |
void | addVisibilityFlags (uint32 flags) |
void | detachFromParent (void) |
Real | getBoundingRadiusScaled () const |
bool | getCastShadows (void) const |
const AxisAlignedBox & | getDarkCapBounds (const Light &light, Real dirLightExtrusionDist) const override |
EdgeData * | getEdgeList (void) |
const AxisAlignedBox & | getLightCapBounds (void) const override |
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 |
virtual uint32 | getQueryFlags (void) const |
bool | getReceivesShadows () |
Real | getRenderingDistance (void) const |
Real | getRenderingMinPixelSize () const |
uint8 | getRenderQueueGroup (void) const |
const ShadowRenderableList & | getShadowVolumeRenderableList (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 |
virtual 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 | 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) |
![]() | |
virtual | ~ShadowCaster () |
virtual ShadowRenderableListIterator | getShadowVolumeRenderableIterator (ShadowTechnique shadowTechnique, const Light *light, HardwareIndexBufferSharedPtr *indexBuffer, size_t *indexBufferUsedSize, bool extrudeVertices, Real extrusionDistance, unsigned long flags=0) |
bool | hasEdgeList () |
![]() | |
AnimableObject () | |
virtual | ~AnimableObject () |
virtual AnimableValuePtr | createAnimableValue (const String &valueName) |
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, bool isTagPoint=false) |
virtual void | _notifyMoved (void) |
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 * | mScnMgr |
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 | mLocalTransformDirty |
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 |
Additional Inherited Members | |
![]() | |
typedef std::vector< ShadowRenderable * > | ShadowRenderableList |
typedef VectorIterator< ShadowRenderableList > | ShadowRenderableListIterator |
![]() | |
static uint32 | getDefaultQueryFlags () |
static uint32 | getDefaultVisibilityFlags () |
static void | setDefaultQueryFlags (uint32 flags) |
static void | setDefaultVisibilityFlags (uint32 flags) |
![]() | |
static void | clearShadowRenderableList (ShadowRenderableList &shadowRenderables) |
static void | extrudeVertices (const HardwareVertexBufferSharedPtr &vertexBuffer, size_t originalVertexCount, const Vector4 &lightPos, Real extrudeDist) |
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 created this sound (if the sound was created through the plugin method createMovableobject()). |
|
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 |
format | 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
Reimplemented from Ogre::MovableObject.
|
protectedvirtual |
Notifys object its been moved
Reimplemented from Ogre::MovableObject.
|
inlineprotectedvirtual |
Open implementation.
Reimplemented in OgreOggSound::OgreOggStaticWavSound, and OgreOggSound::OgreOggStaticSound.
|
protectedpure virtual |
Open implementation.
Implemented in OgreOggSound::OgreOggStreamWavSound, OgreOggSound::OgreOggStreamSound, OgreOggSound::OgreOggStreamBufferSound, OgreOggSound::OgreOggStaticWavSound, and OgreOggSound::OgreOggStaticSound.
|
protectedpure virtual |
Pause implementation.
Implemented in OgreOggSound::OgreOggStreamWavSound, OgreOggSound::OgreOggStreamSound, OgreOggSound::OgreOggStreamBufferSound, OgreOggSound::OgreOggStaticWavSound, and OgreOggSound::OgreOggStaticSound.
|
protectedpure virtual |
Play implementation.
Implemented in OgreOggSound::OgreOggStreamWavSound, OgreOggSound::OgreOggStreamSound, OgreOggSound::OgreOggStreamBufferSound, OgreOggSound::OgreOggStaticWavSound, and OgreOggSound::OgreOggStaticSound.
|
protectedpure virtual |
Prefills buffers with audio data.
Implemented in OgreOggSound::OgreOggStreamWavSound, OgreOggSound::OgreOggStreamSound, OgreOggSound::OgreOggStreamBufferSound, OgreOggSound::OgreOggStaticWavSound, and OgreOggSound::OgreOggStaticSound.
|
protectedpure virtual |
Calculates buffer size and format.
Implemented in OgreOggSound::OgreOggStreamWavSound, OgreOggSound::OgreOggStreamSound, OgreOggSound::OgreOggStreamBufferSound, OgreOggSound::OgreOggStaticWavSound, and OgreOggSound::OgreOggStaticSound.
|
protected |
Sets the previous play position of the sound
|
protectedpure virtual |
Release implemenation
Implemented in OgreOggSound::OgreOggStreamWavSound, OgreOggSound::OgreOggStreamSound, OgreOggSound::OgreOggStreamBufferSound, OgreOggSound::OgreOggStaticWavSound, and OgreOggSound::OgreOggStaticSound.
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::OgreOggStreamWavSound, OgreOggSound::OgreOggStreamSound, OgreOggSound::OgreOggStreamBufferSound, OgreOggSound::OgreOggStaticWavSound, and OgreOggSound::OgreOggStaticSound.
|
protectedpure virtual |
Updates audio buffers
Implemented in OgreOggSound::OgreOggStreamWavSound, OgreOggSound::OgreOggStreamSound, OgreOggSound::OgreOggStreamBufferSound, OgreOggSound::OgreOggStaticWavSound, and OgreOggSound::OgreOggStaticSound.
|
protected |
Updates a fade
|
protectedvirtual |
bool OgreOggSound::OgreOggISound::addCuePoint | ( | float | seconds | ) |
Adds a time position in a sound as a cue point
seconds | Cue point in seconds |
|
inline |
Clears entire list of cue points
void OgreOggSound::OgreOggISound::disable3D | ( | bool | disable | ) |
Allows switchable spatialisation for this sound.
|
inline |
Gets the length of the audio file in seconds
|
virtual |
|
virtual |
float OgreOggSound::OgreOggISound::getConeInsideAngle | ( | ) |
Gets sounds cone inside angle
float OgreOggSound::OgreOggISound::getConeOutsideAngle | ( | ) |
Gets sounds cone outside angle
float OgreOggSound::OgreOggISound::getCuePoint | ( | unsigned short | index | ) |
Gets a previously set cue point by index
index | Position in cue point list to get |
|
inline |
Gets the sounds direction
|
inlinevirtual |
Gets the sounds file name
Reimplemented in OgreOggSound::OgreOggStaticWavSound, and OgreOggSound::OgreOggStaticSound.
|
inline |
Gets the start point of a loopable section of audio in seconds.
const float OgreOggSound::OgreOggISound::getMaxDistance | ( | ) | const |
Gets sounds maximum distance
float OgreOggSound::OgreOggISound::getMaxVolume | ( | ) |
Gets sounds maximum attenuation volume
float OgreOggSound::OgreOggISound::getMinVolume | ( | ) |
Gets sounds minimum attenuation volume
|
virtual |
|
inline |
Gets the sounds name
|
inline |
Returns number of cue points
float OgreOggSound::OgreOggISound::getOuterConeVolume | ( | ) |
Gets sounds outer cone volume
const float OgreOggSound::OgreOggISound::getPitch | ( | ) | const |
Gets sounds pitch
|
virtual |
Gets the position of the playback cursor in seconds
Reimplemented in OgreOggSound::OgreOggStreamWavSound, OgreOggSound::OgreOggStreamSound, and OgreOggSound::OgreOggStreamBufferSound.
|
inline |
Gets sounds position
|
inline |
Gets the sounds priority
const float OgreOggSound::OgreOggISound::getReferenceDistance | ( | ) | const |
Gets sounds reference distance
const float OgreOggSound::OgreOggISound::getRolloffFactor | ( | ) | const |
Gets sounds rolloff factor
|
inline |
Gets the SceneManager pointer registered at creation.
|
inline |
Gets the sounds source
|
inline |
Gets the current state the sound is in
float OgreOggSound::OgreOggISound::getVolume | ( | ) | const |
Gets sounds volume
bool OgreOggSound::OgreOggISound::is3Ddisabled | ( | ) |
Queries switchable spatialisation for this sound.
|
inline |
Returns fade status.
|
inline |
Gets looping status.
|
pure virtual |
Returns whether this sound is mono
Implemented in OgreOggSound::OgreOggStreamWavSound, OgreOggSound::OgreOggStreamSound, OgreOggSound::OgreOggStreamBufferSound, OgreOggSound::OgreOggStaticWavSound, and OgreOggSound::OgreOggStaticSound.
|
inline |
Returns pause status.
|
inline |
Returns play status.
|
inline |
Returns position status.
|
inline |
Returns stop status.
|
inline |
Returns whether this sound is temporary
|
inline |
Sets looping status.
loop | Boolean: true == loop |
|
inline |
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 (in degrees) |
outsideAngle | Angle over which the volume is at minimum (in degrees) |
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 | ( | const Ogre::Vector3 & | dir | ) |
Sets sounds direction.
dir | 3D vector direction |
void OgreOggSound::OgreOggISound::setDirection | ( | float | dirx, |
float | diry, | ||
float | dirz | ||
) |
Sets sounds direction.
dirx | x coord |
diry | y coord |
dirz | z coord |
|
inline |
Sets whether source is given up when stopped.
giveup | If true, releases source immediately (default: false) |
|
inline |
Sets a listener object to be notified of events.
listener | Listener object pointer. |
|
inlinevirtual |
Sets the start point of a loopable section of audio.
startTime | Position in seconds to offset the loop point. |
Reimplemented in OgreOggSound::OgreOggStreamWavSound, and OgreOggSound::OgreOggStreamSound.
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::OgreOggStreamWavSound, OgreOggSound::OgreOggStreamSound, and OgreOggSound::OgreOggStreamBufferSound.
void OgreOggSound::OgreOggISound::setPosition | ( | const Ogre::Vector3 & | pos | ) |
Sets sounds position.
pos | 3D vector position |
void OgreOggSound::OgreOggISound::setPosition | ( | float | posx, |
float | posy, | ||
float | posz | ||
) |
Sets sounds position.
posx | x position |
posy | y position |
posz | z position |
|
inline |
Sets the sounds priority
priority | Priority (between 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::OgreOggStreamWavSound, OgreOggSound::OgreOggStreamSound, OgreOggSound::OgreOggStreamBufferSound, OgreOggSound::OgreOggStaticWavSound, and OgreOggSound::OgreOggStaticSound.
void OgreOggSound::OgreOggISound::setVelocity | ( | const Ogre::Vector3 & | vel | ) |
Sets sounds velocity.
vel | 3D vector velocity |
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::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 |
|
protected |
Sound properties
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |