Spinning Topp Logo BlackTopp Studios
inc
Public Member Functions | Static Public Member Functions | List of all members
Mezzanine::Audio::SoundProxy Class Referenceabstract

This is a proxy class for representing a sound being played in 3D space. More...

#include <soundproxy.h>

+ Inheritance diagram for Mezzanine::Audio::SoundProxy:
+ Collaboration diagram for Mezzanine::Audio::SoundProxy:

Public Member Functions

 SoundProxy (const UInt32 ID)
 Class constructor. More...
 
virtual ~SoundProxy ()
 Class destructor.
 
virtual void AddToWorld ()=0
 Performs all the necessary task to ensure this object is connected to it's respective world and ready for use. More...
 
virtual Real GetDopplerStrength () const =0
 Gets the Doppler Strength of the sound. More...
 
virtual Vector3 GetDopplerVelocity () const =0
 Gets the doppler velocity vector. More...
 
virtual Real GetInnerConeAngle () const =0
 Gets the inner cone angle of the sound source. More...
 
virtual Real GetMaxDistance () const =0
 Gets the distance at which sound attenuation will stop. More...
 
virtual Real GetMinDistance () const =0
 Gets the distance at which sound attenuation will start. More...
 
virtual Real GetOuterConeAngle () const =0
 Gets the outer cone angle of the sound source. More...
 
virtual Real GetOuterConeVolume () const =0
 Gets the outer cone volume of the sound source. More...
 
virtual Real GetRolloffFactor () const =0
 Gets the Rolloff factor of the sound source. More...
 
virtual Vector3 GetVelocity () const =0
 Gets the current velocity of this sound proxy. More...
 
virtual Boole IsDirectingSound () const =0
 Gets whether or not this sound proxy is emitting in a specific direction. More...
 
virtual Boole IsInWorld () const =0
 Gets whether or not this object is inside of it's world. More...
 
virtual void RemoveFromWorld ()=0
 Unhooks this proxy from it's respective world. More...
 
virtual void SetDirectSound (Boole Enable)=0
 Sets whether or not sounds generated by this sound proxy will be emitted in a specified direction. More...
 
virtual void SetDopplerStrength (const Real &DopStr)=0
 Sets the doppler strength, which impacts the doppler effect. More...
 
virtual void SetDopplerVelocity (const Vector3 &DopVel)=0
 Sets the doppler velocity vector. More...
 
virtual void SetInnerConeAngle (const Real &InnerAngle)=0
 Sets the inner cone angle of the sound source if you want the sound to be projected as a cone. More...
 
virtual void SetMaxDistance (const Real &MaxDistance)=0
 Sets the distance from the sound source where attenuation will stop. More...
 
virtual void SetMinDistance (const Real &MinDistance)=0
 Sets the distance from the sound source where attenuation will start. More...
 
virtual void SetOuterConeAngle (const Real &OuterAngle)=0
 Sets the outer cone angle of the sound source if you want the sound to be projected as a cone. More...
 
virtual void SetOuterConeVolume (const Real &OuterVolume)=0
 Sets how much the volume is scaled in the outer cone. More...
 
virtual void SetRolloffFactor (const Real &Rolloff)=0
 Sets the Rolloff factor used to attenuate the sound over a distance. More...
 
virtual void SetVelocity (const Vector3 &Vel)=0
 Sets the velocity of this sound proxy. More...
 
- Public Member Functions inherited from Mezzanine::WorldProxy
 WorldProxy ()
 Blank constructor.
 
 WorldProxy (const UInt32 ID)
 Normal/ID constructor. More...
 
virtual ~WorldProxy ()
 Class destructor.
 
void _Bind (WorldObject *NewParent)
 Binds this proxy to a WorldObject. More...
 
virtual WorldManagerGetCreator () const =0
 Gets a pointer to this proxies creator. More...
 
virtual String GetDerivedSerializableName () const
 Gets the most derived serializable name of this WorldProxy. More...
 
virtual Vector3 GetLocation () const =0
 Gets this objects current location. More...
 
virtual Quaternion GetOrientation () const =0
 Gets this objects current orientation. More...
 
virtual WorldObjectGetParentObject () const
 Gets a pointer to the parent object controlling this proxy. More...
 
virtual UInt32 GetProxyID () const
 Gets the unique ID of this proxy. More...
 
virtual Mezzanine::ProxyType GetProxyType () const =0
 Accessor for the type of proxy. More...
 
virtual Vector3 GetScale () const =0
 Gets the scaling currently being applied to this object. More...
 
virtual void Pitch (const Real Angle)=0
 Rotate the object around the X axis. More...
 
virtual void ProtoDeSerialize (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite this object with it. More...
 
virtual void ProtoDeSerializeProperties (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite the properties of this object with it. More...
 
virtual void ProtoSerialize (XML::Node &ParentNode) const
 Convert this class to an XML::Node ready for serialization. More...
 
virtual void ProtoSerializeProperties (XML::Node &SelfRoot) const
 Convert the properties of this class to an XML::Node ready for serialization. More...
 
virtual void Roll (const Real Angle)=0
 Rotate the object around the Z axis. More...
 
virtual void Rotate (const Vector3 &Axis, const Real Angle)=0
 Rotates the object from it's existing rotation. More...
 
virtual void Rotate (const Quaternion &Rotation)=0
 Rotates the object from it's existing rotation. More...
 
virtual void Scale (const Vector3 &Scale)=0
 Scales the object from it's current size. More...
 
virtual void Scale (const Real X, const Real Y, const Real Z)=0
 Scales the object from it's current size. More...
 
virtual void SetLocation (const Vector3 &Loc)=0
 Sets the location of this object in parent space. More...
 
virtual void SetLocation (const Real X, const Real Y, const Real Z)=0
 Sets the location of this object in parent space via Reals. More...
 
virtual void SetOrientation (const Quaternion &Ori)=0
 Sets the orientation of this object in parent space. More...
 
virtual void SetOrientation (const Real X, const Real Y, const Real Z, const Real W)=0
 Sets the orientation of this object in parent space via Reals. More...
 
virtual void SetScale (const Vector3 &Sc)=0
 Sets the scaling to be applied to this object. More...
 
virtual void SetScale (const Real X, const Real Y, const Real Z)=0
 Sets the scaling to be applied to this object via Reals. More...
 
virtual void Translate (const Vector3 &Trans)=0
 Moves this object from it's current location. More...
 
virtual void Translate (const Real X, const Real Y, const Real Z)=0
 Moves this object from it's current location. More...
 
virtual void Yaw (const Real Angle)=0
 Rotate the object around the Y axis. More...
 
- Public Member Functions inherited from Mezzanine::TransformableObject
virtual ~TransformableObject ()
 Class Destructor.
 
virtual Vector3 ConvertGlobalToLocal (const Vector3 &Location) const
 Converts a point in global space to the same point in local space. More...
 
virtual Quaternion ConvertGlobalToLocal (const Quaternion &Orientation) const
 Converts a rotation in global space to the same rotation in local space. More...
 
virtual Vector3 ConvertLocalToGlobal (const Vector3 &Location) const
 Converts a point in local space to the same point in global space. More...
 
virtual Quaternion ConvertLocalToGlobal (const Quaternion &Orientation) const
 Converts a rotation in local space to the same rotation in global space. More...
 
- Public Member Functions inherited from Mezzanine::Audio::iSound
 iSound ()
 Class constructor.
 
virtual ~iSound ()
 Class destructor.
 
virtual Boole AttachEffect (const UInt32 Slot, iEffect *Eff)=0
 Attaches an iEffect to this sound. More...
 
virtual Boole AttachFilter (iFilter *Fil)=0
 Attaches a filter to this sound that will operate on the direct feed, separate from any effects. More...
 
virtual Real GetBaseVolume () const =0
 Gets the current volume of the sound source. More...
 
virtual UInt32 GetCompressedSize () const
 Gets the size of the encoded audio source in use. More...
 
virtual UInt32 GetCurrentCompressedPosition () const
 Gets the sounds current position in the encoded audio source. More...
 
virtual UInt32 GetCurrentPosition () const
 Gets the sounds current position in the decoded audio source. More...
 
virtual Real GetCurrentTime () const
 Gets the current time position in the stream. More...
 
virtual iDecoderGetDecoder () const =0
 Gets the decoder that belongs to this sound. More...
 
virtual iEffectGetEffect (const UInt32 Slot) const =0
 Gets the iEffect attached at the specified slot. More...
 
virtual iFilterGetFilter () const =0
 Gets the filter currently being used by this object. More...
 
virtual UInt32 GetMaxEffectSlots () const =0
 Gets the max number of iEffect instances that can be attached to this sound. More...
 
virtual Real GetMaxVolume () const =0
 Gets the Maximum volume of the sound source. More...
 
virtual Real GetMinVolume () const =0
 Gets the minimum volume of the sound source. More...
 
virtual UInt32 GetNumEffectSlotsAvailable () const =0
 Gets the number of iEffect slots remaining that can be attached to. More...
 
virtual Real GetPitch () const =0
 Gets the pitch of the sound source. More...
 
virtual UInt32 GetTotalSize () const
 Gets the size of the decoded audio source in use. More...
 
virtual Real GetTotalTime () const
 Gets the length of the stream in seconds. More...
 
virtual UInt16 GetType () const =0
 Gets the sound type of this sound. More...
 
virtual Real GetVolume () const =0
 Gets the current volume of the sound source after all volume settings are applied. More...
 
virtual Boole IsLooping () const =0
 Checks to see if the sound is currently set to loop. More...
 
virtual Boole IsPaused () const =0
 Gets whether or not the sound is currently paused. More...
 
virtual Boole IsPlaying () const =0
 Gets whether or not the sound is currently playing. More...
 
virtual Boole IsStopped () const =0
 Gets whether or not the sound is currently stopped. More...
 
virtual Boole IsValid () const =0
 Checks to see if this sound is valid and is ready for playback. More...
 
virtual void Loop (Boole ToLoop)=0
 Sets whether the playback of the sound should loop or not. More...
 
virtual void Pause ()=0
 Pauses playback of the sound at it's current position in the stream.
 
virtual Boole Play ()=0
 Plays the sound with it's current configuration. More...
 
virtual void RemoveEffect (const UInt32 Slot)=0
 Removes the iEffect in the specified slot. More...
 
virtual void RemoveFilter ()=0
 Removes any currently attached filters.
 
virtual Boole Seek (const Real Seconds, Boole Relative=false)=0
 Sets the current position of the stream from which to playback audio. More...
 
virtual void SetBaseVolume (const Real Base)=0
 Sets the current volume of the sound source before effects and other volume settings. More...
 
virtual void SetMaxVolume (const Real MaxVol)=0
 Sets the maximum volume the sound source can achieve. More...
 
virtual void SetMinVolume (const Real MinVol)=0
 Sets the minimum volume the sound source can achieve. More...
 
virtual void SetPitch (const Real Pitch)=0
 Sets the pitch of the sound source. More...
 
virtual void SetStream (Resource::DataStreamPtr Stream, const Audio::Encoding Encode)=0
 Sets a new stream for playback by this iSound. More...
 
virtual void SetStream (const UInt16 Type, Resource::DataStreamPtr Stream, const Audio::Encoding Encode)=0
 Sets a new stream for playback by this iSound. More...
 
virtual void SetStream (iDecoder *Decode)=0
 Sets a new stream for playback by this iSound via a new decoder. More...
 
virtual void SetStream (const UInt16 Type, iDecoder *Decode)=0
 Sets a new stream for playback by this iSound via a new decoder. More...
 
virtual void Stop ()=0
 Stops playback of the sound and resets it's position back to the start.
 

Static Public Member Functions

static String GetSerializableName ()
 Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized. More...
 
- Static Public Member Functions inherited from Mezzanine::WorldProxy
static String GetSerializableName ()
 Get the name of the the XML tag the proxy class will leave behind as its instances are serialized. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Mezzanine::WorldProxy
virtual void ProtoDeSerializeImpl (const XML::Node &SelfRoot)
 Implementation method for deseriailizing additional sets of data. More...
 
virtual void ProtoSerializeImpl (XML::Node &SelfRoot) const
 Implementation method for serializing additional sets of data. More...
 
- Protected Attributes inherited from Mezzanine::WorldProxy
WorldObjectParentObject
 Pointer to the Object this proxy belongs to. More...
 
UInt32 ProxyID
 The unique ID assigned to the type of proxy an instance is. More...
 

Detailed Description

This is a proxy class for representing a sound being played in 3D space.

Definition at line 57 of file soundproxy.h.

Constructor & Destructor Documentation

Mezzanine::Audio::SoundProxy::SoundProxy ( const UInt32  ID)
inline

Class constructor.

Parameters
IDThe unique ID of this SoundProxy.

Definition at line 63 of file soundproxy.h.

Member Function Documentation

virtual void Mezzanine::Audio::SoundProxy::AddToWorld ( )
pure virtual

Performs all the necessary task to ensure this object is connected to it's respective world and ready for use.

Remarks
Some implementations such as the OALS sound system will pause playback when a SoundProxy is removed from the world and resume it's playback when added back in. You also cannot start playback while outside of the world. If you want to prevent the resuming of playback when added back into the world be sure to manually call "Stop()" before adding the proxy back into the world.

Implements Mezzanine::WorldProxy.

virtual Real Mezzanine::Audio::SoundProxy::GetDopplerStrength ( ) const
pure virtual

Gets the Doppler Strength of the sound.

Returns
Returns the doppler strength.
virtual Vector3 Mezzanine::Audio::SoundProxy::GetDopplerVelocity ( ) const
pure virtual

Gets the doppler velocity vector.

Returns
Returns the override for the doppler velocity vector.
virtual Real Mezzanine::Audio::SoundProxy::GetInnerConeAngle ( ) const
pure virtual

Gets the inner cone angle of the sound source.

Returns
Returns the angle of the inner sound cone of the source.
virtual Real Mezzanine::Audio::SoundProxy::GetMaxDistance ( ) const
pure virtual

Gets the distance at which sound attenuation will stop.

Returns
Returns the distance from the source where attenuation will stop.
virtual Real Mezzanine::Audio::SoundProxy::GetMinDistance ( ) const
pure virtual

Gets the distance at which sound attenuation will start.

Returns
Returns the distance from the source where attenuation will start.
virtual Real Mezzanine::Audio::SoundProxy::GetOuterConeAngle ( ) const
pure virtual

Gets the outer cone angle of the sound source.

Returns
Returns the angle of the outer sound cone of the source.
virtual Real Mezzanine::Audio::SoundProxy::GetOuterConeVolume ( ) const
pure virtual

Gets the outer cone volume of the sound source.

Returns
Returns how much the volume of the source is scaled in the outer cone.
virtual Real Mezzanine::Audio::SoundProxy::GetRolloffFactor ( ) const
pure virtual

Gets the Rolloff factor of the sound source.

This function will get the factor used in attenuating the source over distance.

Returns
Returns the factor used in attenuating the source over distance.
static String Mezzanine::Audio::SoundProxy::GetSerializableName ( )
inlinestatic

Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized.

Returns
A string containing the name of this class.

Definition at line 178 of file soundproxy.h.

virtual Vector3 Mezzanine::Audio::SoundProxy::GetVelocity ( ) const
pure virtual

Gets the current velocity of this sound proxy.

Returns
Returns a Vector3 representing this proxy's current velocity.
virtual Boole Mezzanine::Audio::SoundProxy::IsDirectingSound ( ) const
pure virtual

Gets whether or not this sound proxy is emitting in a specific direction.

Returns
Returns true if this sound proxy is emitting in a specific direction, false if it's emitting in all directions.
virtual Boole Mezzanine::Audio::SoundProxy::IsInWorld ( ) const
pure virtual

Gets whether or not this object is inside of it's world.

Returns
Returns true if this proxy is inserted in it's respective subsystems world.

Implements Mezzanine::WorldProxy.

virtual void Mezzanine::Audio::SoundProxy::RemoveFromWorld ( )
pure virtual

Unhooks this proxy from it's respective world.

Remarks
Some implementations such as the OALS sound system will pause playback when a SoundProxy is removed from the world and resume it's playback when added back in. You also cannot start playback while outside of the world. If you want to prevent the resuming of playback when added back into the world be sure to manually call "Stop()" before adding the proxy back into the world.

Implements Mezzanine::WorldProxy.

virtual void Mezzanine::Audio::SoundProxy::SetDirectSound ( Boole  Enable)
pure virtual

Sets whether or not sounds generated by this sound proxy will be emitted in a specified direction.

Parameters
EnableTrue to enable this sound proxy to direct it's audio, false to have it emit in all directions.
virtual void Mezzanine::Audio::SoundProxy::SetDopplerStrength ( const Real DopStr)
pure virtual

Sets the doppler strength, which impacts the doppler effect.

This function will set the doppler strength of the sound source, which can enhance or diminish the doppler effect given off by this sound source. Default: 1.0

Parameters
DopStrThe doppler strength to be applied to this sound source.
virtual void Mezzanine::Audio::SoundProxy::SetDopplerVelocity ( const Vector3 DopVel)
pure virtual

Sets the doppler velocity vector.

In most cases you shouldn't need to call this as this is handled by the engine. Is called every time position, velocity, or direction is altered.

Parameters
DopVelA vector3 representing the doppler velocity to be applied.
virtual void Mezzanine::Audio::SoundProxy::SetInnerConeAngle ( const Real InnerAngle)
pure virtual

Sets the inner cone angle of the sound source if you want the sound to be projected as a cone.

This function will set the angle for the inner cone which the sound will be projected. The cone will open up in the direction set by SetDirection(). Sounds are at their loudest only if the listener is within the inner cone.

Parameters
InnerAngleThe angle of the inner cone. Range is: 0.0 to 360.0. Default: 360.0 (broadcast)
virtual void Mezzanine::Audio::SoundProxy::SetMaxDistance ( const Real MaxDistance)
pure virtual

Sets the distance from the sound source where attenuation will stop.

This function will set the distance from the sound source where attenuation effects will stop being applied.

Parameters
MaxDistanceThe distance at which attenuation effects stop being applied.
virtual void Mezzanine::Audio::SoundProxy::SetMinDistance ( const Real MinDistance)
pure virtual

Sets the distance from the sound source where attenuation will start.

This function will set the distance from the sound source where attenuation effects will start being applied.

Parameters
MinDistanceThe distance at which attenuation effects start being applied.
virtual void Mezzanine::Audio::SoundProxy::SetOuterConeAngle ( const Real OuterAngle)
pure virtual

Sets the outer cone angle of the sound source if you want the sound to be projected as a cone.

This function will set the angle for the outer cone which the sound will be projected. The cone will open up in the direction set by SetDirection(). Sounds connot be heard if the listener is outside the outer cone.

Parameters
OuterAngleThe angle of the outer cone. Range is: 0.0 to 360.0. Default: 360.0 (broadcast)
virtual void Mezzanine::Audio::SoundProxy::SetOuterConeVolume ( const Real OuterVolume)
pure virtual

Sets how much the volume is scaled in the outer cone.

This function will set how much the volume is scaled by for sounds in the outer cone of the sound source.

Parameters
OuterVolumeThe scale for volume for sounds in the outer cone.
virtual void Mezzanine::Audio::SoundProxy::SetRolloffFactor ( const Real Rolloff)
pure virtual

Sets the Rolloff factor used to attenuate the sound over a distance.

This function will set how much the sound source will attenuate over a distance. Larger values will make the sound attenuate faster/shorter distnaces, smaller values will make the sound carry better.

Parameters
RolloffThe factor at which the sound will attenuate.
virtual void Mezzanine::Audio::SoundProxy::SetVelocity ( const Vector3 Vel)
pure virtual

Sets the velocity of this sound proxy.

Parameters
VelThe velocity to be given to this sound proxy.

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