Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

IListener Class Reference

IListener represents the listener around which 3D sounds are oriented and positioned. More...

#include <IAudio.h>

List of all members.

Public Methods

virtual bool Init (const ListenerInit &init)=0
virtual void Term ()=0
virtual bool SetProperties (const ListenerProp &prop)=0
virtual void GetProperties (ListenerProp &prop) const=0
virtual bool SetPosition (const AUDIOVECTOR &vPos)=0
virtual void GetPosition (AUDIOVECTOR &vPos) const=0
virtual bool SetVelocity (const AUDIOVECTOR &vVel)=0
virtual void GetVelocity (AUDIOVECTOR &vVel) const=0
virtual bool SetOrientation (const AUDIOVECTOR &vFront, const AUDIOVECTOR &vTop)=0
virtual void GetOrientation (AUDIOVECTOR &vFront, AUDIOVECTOR &vTop) const=0
virtual bool SetDistanceFactor (float fDistanceFactor)=0
virtual void GetDistanceFactor (float &fDistanceFactor) const=0
virtual bool SetDopplerFactor (float fDopplerFactor)=0
virtual void GetDopplerFactor (float &fDopplerFactor) const=0
virtual bool SetRolloffFactor (float fRolloffFactor)=0
virtual void GetRolloffFactor (float &fRolloffFactor) const=0
virtual bool QuerySupport (const GUID &guid, uint32 nID, uint32 *pTypeSupport)=0
virtual bool Get (const GUID &guidProperty, uint32 nID, void *pInstanceData, uint32 nInstanceLength, void *pPropData, uint32 nPropLength, uint32 *pBytesReturned)=0
virtual bool Set (const GUID &guidProperty, uint32 nID, void *pInstanceData, uint32 nInstanceLength, void *pPropData, uint32 nPropLength, bool bStoreProperty)=0
virtual IEAXListenerEAX ()=0


Detailed Description

IListener represents the listener around which 3D sounds are oriented and positioned.

This class places a virtual "microphone" at a designated position and orientation, and controls how 3D sounds are heard. Properties can also be set and retrieved on the listener object. One example of this is environmental reverberation, such as EAX.


Member Function Documentation

bool IListener::Get ( const GUID & guidProperty,
uint32 nID,
void * pInstanceData,
uint32 nInstanceLength,
void * pPropData,
uint32 nPropLength,
uint32 * pBytesReturned ) [pure virtual]
 

This function allows an application to get property set information from a driver. See the DirectX Audio documentation and the documentation for the property set you wish to work with for details on how to use these parameters.

Returns:
true indicates success, false indicates failure.
See also:
QuerySupport(), Set()

void IListener::GetDistanceFactor ( float & fDistanceFactor ) const [pure virtual]
 

Gets the listener's distance factor.

Parameters:
fDistanceFactor   is the number of meters per vector unit
See also:
SetDistanceFactor()

void IListener::GetDopplerFactor ( float & fDopplerFactor ) const [pure virtual]
 

Gets the listener's doppler factor. See SetDopplerFactor() for addition parameter information.

Parameters:
fDistanceFactor   is the doppler factor value
See also:
SetDopplerFactor()

void IListener::GetOrientation ( AUDIOVECTOR & vFront,
AUDIOVECTOR & vTop ) const [pure virtual]
 

Gets the current listener orientation.

Parameters:
vFront   is the listener's forward orientation.
vTop   is the listener's topward orientation.
See also:
SetOrientation()

void IListener::GetPosition ( AUDIOVECTOR & vPos ) const [pure virtual]
 

Gets the current listener position.

Parameters:
vPos   is the current position.
See also:
SetPosition()

void IListener::GetProperties ( ListenerProp & prop ) const [pure virtual]
 

Gets all 3D listener properties in a single function call.

Parameters:
prop   ListenerProp gets all listener paramaters simultaneously.
See also:
SetProperties()

void IListener::GetRolloffFactor ( float & fRolloffFactor ) const [pure virtual]
 

Gets the listener's rolloff factor. See SetRolloffFactor() for addition parameter information.

Parameters:
fRolloffFactor   is the rolloff factor value
See also:
SetRolloffFactor()

void IListener::GetVelocity ( AUDIOVECTOR & vVel ) const [pure virtual]
 

Gets the current listener velocity.

Parameters:
vPos   is the current velocity.
See also:
GetVelocity()

bool IListener::Init ( const ListenerInit & init ) [pure virtual]
 

Initializes the listener object with required initialization data.

Parameters:
init   ListenerInit structure contains all initialization parameters.
Returns:
true indicates success, false indicates failure.
See also:
ListenerInit, Term()

bool IListener::QuerySupport ( const GUID & guid,
uint32 nID,
uint32 * pTypeSupport ) [pure virtual]
 

Generic property support (for driver-specific extensions). Querying an object allows a program to determine if driver-specific extensions are available on a user's system. By exposing this at the API level, it ensures that the application has complete control over any property sets needed at the application level. See the DirectX Audio documentation and the documentation for the property set you wish to work with for details on how to use these parameters.

Returns:
true indicates success, false indicates failure.
See also:
Get(), Set()

bool IListener::Set ( const GUID & guidProperty,
uint32 nID,
void * pInstanceData,
uint32 nInstanceLength,
void * pPropData,
uint32 nPropLength,
bool bStoreProperty ) [pure virtual]
 

This function allows an application to set a driver-specific property. See the DirectX Audio documentation and the documentation for the property set you wish to work with for details on how to use these parameters.

Returns:
true indicates success, false indicates failure.
See also:
Get(), QuerySupport()

bool IListener::SetDistanceFactor ( float fDistanceFactor ) [pure virtual]
 

Sets the listener's distance factor.

Parameters:
fDistanceFactor   is the number of meters per vector unit
Returns:
true indicates success, false indicates failure.
See also:
GetDistanceFactor()

bool IListener::SetDopplerFactor ( float fDopplerFactor ) [pure virtual]
 

Sets the listener's doppler factor, which is the rate at which pitch will shift when a sound is moving rapidly toward or away from the listener. 1.0, or DS3D_DEFAULTDOPPLERFACTOR is the default. The range is from 0.0 to 10.0, or DS3D_MINDOPPLERFACTOR to DS3D_MAXDOPPLERFACTOR.

Parameters:
fDistanceFactor   is the doppler factor value
Returns:
true indicates success, false indicates failure.
See also:
GetDopplerFactor()

bool IListener::SetOrientation ( const AUDIOVECTOR & vFront,
const AUDIOVECTOR & vTop ) [pure virtual]
 

Sets the current listener orientation.

Parameters:
vFront   is the listener's forward orientation.
vTop   is the listener's topward orientation.
Returns:
true indicates success, false indicates failure.
See also:
GetOrientation()

bool IListener::SetPosition ( const AUDIOVECTOR & vPos ) [pure virtual]
 

Sets the current listener position.

Parameters:
vPos   is the current position.
Returns:
true indicates success, false indicates failure.
See also:
GetPosition()

bool IListener::SetProperties ( const ListenerProp & prop ) [pure virtual]
 

Sets all 3D listener properties in a single function call.

Parameters:
prop   ListenerProp sets all listener paramaters simultaneously.
Returns:
true indicates success, false indicates failure.
See also:
GetProperties()

bool IListener::SetRolloffFactor ( float fRolloffFactor ) [pure virtual]
 

The rolloff factor adjusts the amount a sound will attenuate over distance. 1.0, or DS3D_DEFAULTROLLOFFFACTOR is the default. The range is from 0.0 to 10.0, or DS3D_MINROLLOFFFACTOR to DS3D_MAXROLLOFFFACTOR.

Parameters:
fRolloffFactor   is the rolloff factor value
See also:
GetRolloffFactor()

bool IListener::SetVelocity ( const AUDIOVECTOR & vVel ) [pure virtual]
 

Sets the current listener velocity.

Parameters:
vPos   is the current velocity.
Returns:
true indicates success, false indicates failure.
See also:
GetVelocity()

void IListener::Term ( ) [pure virtual]
 

Shuts down the listener object. An application normally does not have to call this function since the audio manager will automatically terminate the listener when it exits.

See also:
Init()


The documentation for this class was generated from the following file:
Generated at Sun Jul 28 23:17:42 2002 for GAP Audio System by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001