TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
iSoundSource Struct Referenceabstract
Inheritance diagram for iSoundSource:
iDeviceResource iUnknown

Detailed Description

Sound source interface.

Public Member Functions

virtual tBool SetSoundBuffer (iSoundBuffer *apBuffer)=0
 Set the sound buffer. More...
 
virtual iSoundBufferGetSoundBuffer () const =0
 Get the sound buffer. {Property}. More...
 
virtual void SetMode (eSoundMode aMode)=0
 Set the sound mode. More...
 
virtual eSoundMode GetMode () const =0
 Get the sound mode. {Property}. More...
 
virtual void SetPosition (const sVec3f &avPos)=0
 Set the source's position. More...
 
virtual sVec3f GetPosition () const =0
 Get the source's position. {Property}. More...
 
virtual void SetVelocity (const sVec3f &avVel)=0
 Set the source's velocity. More...
 
virtual sVec3f GetVelocity () const =0
 Get the source's velocity. {Property}. More...
 
virtual void SetMinDistance (tF32 fMin)=0
 Set the minimum audible distance. More...
 
virtual tF32 GetMinDistance () const =0
 Get the minimum audible distance. More...
 
virtual void SetMaxDistance (tF32 fMax)=0
 Set the maximum audible distance. More...
 
virtual tF32 GetMaxDistance () const =0
 Get the maximum audible distance. {Property}. More...
 
virtual void SetPan (tF32 afPanning)=0
 Set the sound panning. More...
 
virtual tF32 GetPan () const =0
 Get the sound volume. {Property}. More...
 
virtual void SetVolume (tF32 afVolume)=0
 Set the sound volume. More...
 
virtual tF32 GetVolume () const =0
 Get the sound volume. {Property}. More...
 
virtual void SetSpeed (tF32 afPitch)=0
 Set the sound speed. More...
 
virtual tF32 GetSpeed () const =0
 Get the sound speed. {Property}. More...
 
virtual void SetLoop (tBool abLoop)=0
 Set the source in loop mode. More...
 
virtual tBool GetLoop () const =0
 Get the source loop mode. {Property}. More...
 
virtual tBool Play ()=0
 Starts playing the sound. More...
 
virtual tBool Stop ()=0
 Stops playing the sound. More...
 
virtual tBool Pause ()=0
 Pause the sound. More...
 
virtual tBool GetIsPlaying () const =0
 Check if the sound is currently playing. {Property}. More...
 
virtual tBool GetIsPaused () const =0
 Check if the sound is currently paused. {Property}. More...
 
virtual ni::tBool Play2D (ni::tF32 afVolume, ni::tF32 afSpeed, ni::tF32 afPan)=0
 Play as a 2d sound FX. More...
 
virtual ni::tBool Play3D (ni::tF32 afVolume, ni::tF32 afSpeed, ni::sVec3f avPosition, ni::tBool abListenerRelative, ni::tF32 afMinDistance, ni::tF32 afMaxDistance)=0
 Play as a 3d sound FX. More...
 
- Public Member Functions inherited from iDeviceResource
virtual iHStringGetDeviceResourceName () const =0
 Get the resource's name. More...
 
virtual tBool HasDeviceResourceBeenReset (tBool abClearFlag)=0
 Check whether the device resource has just been reset. More...
 
virtual tBool ResetDeviceResource ()=0
 Reset the device resource. More...
 
virtual iDeviceResourceBind (iUnknown *apDevice)=0
 Called when the resource is going to be used by the device. More...
 
- Public Member Functions inherited from iUnknown
virtual tBool IsOK () const =0
 Check if the object is valid. More...
 
virtual tI32 AddRef ()=0
 Signal that one more reference of the object has been created. More...
 
virtual tI32 Release ()=0
 Release a reference of the object. More...
 
virtual void DeleteThis ()=0
 Bypass any reference counting and delete this object. More...
 
virtual void Invalidate ()=0
 Invalidate the object. More...
 
virtual iUnknownQueryInterface (const tUUID &aIID)=0
 Query an interface. More...
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0
 Fill a UUID list containing the UUIDs of the implemented interfaces. More...
 
virtual tI32 SetNumRefs (tI32 anNumRefs)=0
 Set the reference counter directly. More...
 
virtual tI32 GetNumRefs () const =0
 Get the number of references to this object. More...
 

Member Function Documentation

virtual tBool SetSoundBuffer ( iSoundBuffer apBuffer)
pure virtual

Set the sound buffer.

Remarks
If currently playing the sound source is stopped first. {Property}
virtual iSoundBuffer* GetSoundBuffer ( ) const
pure virtual

Get the sound buffer. {Property}.

virtual void SetMode ( eSoundMode  aMode)
pure virtual

Set the sound mode.

Remarks
The sound mode is changed only next time the sound source starts to play. {Property}
virtual eSoundMode GetMode ( ) const
pure virtual

Get the sound mode. {Property}.

virtual void SetPosition ( const sVec3f avPos)
pure virtual

Set the source's position.

Remarks
Zero by default. {Property}
virtual sVec3f GetPosition ( ) const
pure virtual

Get the source's position. {Property}.

virtual void SetVelocity ( const sVec3f avVel)
pure virtual

Set the source's velocity.

Remarks
Zero by default. {Property}
virtual sVec3f GetVelocity ( ) const
pure virtual

Get the source's velocity. {Property}.

virtual void SetMinDistance ( tF32  fMin)
pure virtual

Set the minimum audible distance.

Remarks
10 by default. {Property}
virtual tF32 GetMinDistance ( ) const
pure virtual

Get the minimum audible distance.

Remarks
0 by default. {Property}
virtual void SetMaxDistance ( tF32  fMax)
pure virtual

Set the maximum audible distance.

Remarks
1000 by default. {Property}
virtual tF32 GetMaxDistance ( ) const
pure virtual

Get the maximum audible distance. {Property}.

virtual void SetPan ( tF32  afPanning)
pure virtual

Set the sound panning.

Remarks
0 by default, -1 left, 1 right. {Property}
virtual tF32 GetPan ( ) const
pure virtual

Get the sound volume. {Property}.

virtual void SetVolume ( tF32  afVolume)
pure virtual

Set the sound volume.

Remarks
1 by default. {Property}
virtual tF32 GetVolume ( ) const
pure virtual

Get the sound volume. {Property}.

virtual void SetSpeed ( tF32  afPitch)
pure virtual

Set the sound speed.

Remarks
1 by default. {Property}
virtual tF32 GetSpeed ( ) const
pure virtual

Get the sound speed. {Property}.

virtual void SetLoop ( tBool  abLoop)
pure virtual

Set the source in loop mode.

Remarks
eFalse by default. {Property}
virtual tBool GetLoop ( ) const
pure virtual

Get the source loop mode. {Property}.

virtual tBool Play ( )
pure virtual

Starts playing the sound.

virtual tBool Stop ( )
pure virtual

Stops playing the sound.

virtual tBool Pause ( )
pure virtual

Pause the sound.

virtual tBool GetIsPlaying ( ) const
pure virtual

Check if the sound is currently playing. {Property}.

virtual tBool GetIsPaused ( ) const
pure virtual

Check if the sound is currently paused. {Property}.

virtual ni::tBool Play2D ( ni::tF32  afVolume,
ni::tF32  afSpeed,
ni::tF32  afPan 
)
pure virtual

Play as a 2d sound FX.

virtual ni::tBool Play3D ( ni::tF32  afVolume,
ni::tF32  afSpeed,
ni::sVec3f  avPosition,
ni::tBool  abListenerRelative,
ni::tF32  afMinDistance,
ni::tF32  afMaxDistance 
)
pure virtual

Play as a 3d sound FX.