Drag[en]gine Game Engine  1.0
deMicrophone Class Reference

Microphone Class. More...

#include <deMicrophone.h>

Inheritance diagram for deMicrophone:
deResource deObject

Public Types

enum  eMicrophoneType { emtPoint, emtDirected }
 

Public Member Functions

Management
eMicrophoneType GetType () const
 
void SetType (eMicrophoneType type)
 
const decDVectorGetPosition () const
 
void SetPosition (const decDVector &position)
 
const decQuaternionGetOrientation () const
 
void SetOrientation (const decQuaternion &orientation)
 
const decVectorGetVelocity () const
 
void SetVelocity (const decVector &velocity)
 
bool GetMuted () const
 
void SetMuted (bool muted)
 
float GetVolume () const
 
void SetVolume (float volume)
 
Speakers
int GetSpeakerCount () const
 Number of speakers. More...
 
deSpeakerGetRootSpeaker () const
 Root speaker or NULL if there are none. More...
 
void AddSpeaker (deSpeaker *speaker)
 Add speaker. More...
 
void RemoveSpeaker (deSpeaker *speaker)
 Remove speaker. More...
 
void RemoveAllSpeakers ()
 Remove all speakers. More...
 
System Peers
deBaseAudioMicrophoneGetAudioMicrophone () const
 
void SetAudioMicrophone (deBaseAudioMicrophone *audMicrophone)
 
Linked List
deWorldGetParentWorld () const
 Parent world or NULL. More...
 
void SetParentWorld (deWorld *world)
 Set parent world or NULL. More...
 
deMicrophoneGetLLWorldPrev () const
 Previous microphone in the parent world linked list. More...
 
void SetLLWorldPrev (deMicrophone *microphone)
 Set next microphone in the parent world linked list. More...
 
deMicrophoneGetLLWorldNext () const
 Next microphone in the parent world linked list. More...
 
void SetLLWorldNext (deMicrophone *microphone)
 Set next microphone in the parent world linked list. More...
 
- Public Member Functions inherited from deResource
deResourceManagerGetResourceManager () const
 Resource manager or NULL if resource is leaking. More...
 
deEngineGetEngine () const
 Game engine object from resource manager. More...
 
deResourceGetLLManagerPrev () const
 Previous resource in the resource manager linked list. More...
 
void SetLLManagerPrev (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
deResourceGetLLManagerNext () const
 Next resource in the resource manager linked list. More...
 
void SetLLManagerNext (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
void MarkLeaking ()
 Marks the resource leaking. More...
 
 deResource (deResourceManager *resourceManager)
 Create resource. More...
 
- Public Member Functions inherited from deObject
int GetRefCount () const
 Reference count. More...
 
void AddReference ()
 Add reference increasing reference count by 1. More...
 
void FreeReference ()
 Decrease reference count by one and delete object if count reaches 0. More...
 
 deObject ()
 Create object with reference count of 1. More...
 

Constructors and Destructors

 deMicrophone (deMicrophoneManager *manager)
 
virtual ~deMicrophone ()
 Clean up speaker object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from deResource
virtual ~deResource ()
 Clean up resource. More...
 
- Protected Member Functions inherited from deObject
virtual ~deObject ()
 Clean up object. More...
 

Detailed Description

Microphone Class.

Defines a microphone object able to record sounds in a world. The recorded sound is audible at the users speakers afterwards. Only one microphone can be active at any time. A microphone only records sound emitted by speakers in the same world. This way you can switch between microphones without the need for changing a lot of properties each time. Microphones can be of point type recording sound from all directions or directed to record only sound coming from a major direction.

Author
Pl├╝ss Roland
Version
1.0
Date
2008

Member Enumeration Documentation

◆ eMicrophoneType

Enumerator
emtPoint 
emtDirected 

Constructor & Destructor Documentation

◆ deMicrophone()

deMicrophone::deMicrophone ( deMicrophoneManager manager)

Creates a new speaker object.

◆ ~deMicrophone()

virtual deMicrophone::~deMicrophone ( )
protectedvirtual

Clean up speaker object.

Note
Subclasses should set their destructor protected too to avoid users accidently deleting a reference counted object through the object pointer. Only FreeReference() is allowed to delete the object.

Member Function Documentation

◆ AddSpeaker()

void deMicrophone::AddSpeaker ( deSpeaker speaker)

Add speaker.

Exceptions
deeInvalidParamspeaker is NULL.
deeInvalidParamspeaker has a parent world.

Referenced by GetRootSpeaker().

◆ GetAudioMicrophone()

deBaseAudioMicrophone* deMicrophone::GetAudioMicrophone ( ) const
inline

Retrieves the audio system peer object.

References SetAudioMicrophone().

◆ GetLLWorldNext()

deMicrophone* deMicrophone::GetLLWorldNext ( ) const
inline

Next microphone in the parent world linked list.

References SetLLWorldNext().

◆ GetLLWorldPrev()

deMicrophone* deMicrophone::GetLLWorldPrev ( ) const
inline

Previous microphone in the parent world linked list.

References SetLLWorldPrev().

◆ GetMuted()

bool deMicrophone::GetMuted ( ) const
inline

Determines if the speaker is muted.

References SetMuted().

◆ GetOrientation()

const decQuaternion& deMicrophone::GetOrientation ( ) const
inline

Retrieves the orientation.

References SetOrientation().

◆ GetParentWorld()

deWorld* deMicrophone::GetParentWorld ( ) const
inline

Parent world or NULL.

References SetParentWorld().

◆ GetPosition()

const decDVector& deMicrophone::GetPosition ( ) const
inline

Retrieves the position.

References SetPosition().

◆ GetRootSpeaker()

deSpeaker* deMicrophone::GetRootSpeaker ( ) const
inline

Root speaker or NULL if there are none.

References AddSpeaker(), RemoveAllSpeakers(), and RemoveSpeaker().

◆ GetSpeakerCount()

int deMicrophone::GetSpeakerCount ( ) const
inline

Number of speakers.

◆ GetType()

eMicrophoneType deMicrophone::GetType ( ) const
inline

Retrieves the type of the speaker.

References SetType().

◆ GetVelocity()

const decVector& deMicrophone::GetVelocity ( ) const
inline

Retrieves the linear velocity in m/s.

References SetVelocity().

◆ GetVolume()

float deMicrophone::GetVolume ( ) const
inline

Retrieves the volume.

References SetVolume().

◆ RemoveAllSpeakers()

void deMicrophone::RemoveAllSpeakers ( )

Remove all speakers.

Referenced by GetRootSpeaker().

◆ RemoveSpeaker()

void deMicrophone::RemoveSpeaker ( deSpeaker speaker)

Remove speaker.

Exceptions
deeInvalidParamspeaker is NULL.
deeInvalidParamParent world of speaker is not this world.

Referenced by GetRootSpeaker().

◆ SetAudioMicrophone()

void deMicrophone::SetAudioMicrophone ( deBaseAudioMicrophone audMicrophone)

Sets the audio system peer object.

Referenced by GetAudioMicrophone().

◆ SetLLWorldNext()

void deMicrophone::SetLLWorldNext ( deMicrophone microphone)

Set next microphone in the parent world linked list.

Referenced by GetLLWorldNext().

◆ SetLLWorldPrev()

void deMicrophone::SetLLWorldPrev ( deMicrophone microphone)

Set next microphone in the parent world linked list.

Referenced by GetLLWorldPrev().

◆ SetMuted()

void deMicrophone::SetMuted ( bool  muted)

Sets if the speaker is muted.

Referenced by GetMuted().

◆ SetOrientation()

void deMicrophone::SetOrientation ( const decQuaternion orientation)

Sets the orientation.

Referenced by GetOrientation().

◆ SetParentWorld()

void deMicrophone::SetParentWorld ( deWorld world)

Set parent world or NULL.

Referenced by GetParentWorld().

◆ SetPosition()

void deMicrophone::SetPosition ( const decDVector position)

Sets the position.

Referenced by GetPosition().

◆ SetType()

void deMicrophone::SetType ( eMicrophoneType  type)

Sets the type of the speaker.

Referenced by GetType().

◆ SetVelocity()

void deMicrophone::SetVelocity ( const decVector velocity)

Sets the velocity in m/s.

Referenced by GetVelocity().

◆ SetVolume()

void deMicrophone::SetVolume ( float  volume)

Sets the volume.

Referenced by GetVolume().


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