Drag[en]gine Game Engine  1.21
deMicrophone Class Reference

Microphone Class. More...

#include <deMicrophone.h>

Inheritance diagram for deMicrophone:
deResource deObject

Public Types

enum  eMicrophoneType { emtPoint , emtDirected }
 
typedef deTObjectReference< deMicrophoneRef
 Type holding strong reference. More...
 
- Public Types inherited from deResource
typedef deTObjectReference< deResourceRef
 Type holding strong reference. More...
 
- Public Types inherited from deObject
typedef deTObjectReference< deObjectRef
 Type holding strong reference. More...
 

Public Member Functions

Management
eMicrophoneType GetType () const
 Type. More...
 
void SetType (eMicrophoneType type)
 Set type. More...
 
const decDVectorGetPosition () const
 Position. More...
 
void SetPosition (const decDVector &position)
 Set position. More...
 
const decQuaternionGetOrientation () const
 Orientation. More...
 
void SetOrientation (const decQuaternion &orientation)
 Set orientation. More...
 
const decVectorGetVelocity () const
 Linear velocity in m/s. More...
 
void SetVelocity (const decVector &velocity)
 Set velocity in m/s. More...
 
bool GetMuted () const
 Microphone is muted. More...
 
void SetMuted (bool muted)
 Set if microphone is muted. More...
 
float GetVolume () const
 Volume. More...
 
void SetVolume (float volume)
 Set volume. More...
 
const decLayerMaskGetLayerMask () const
 Layer mask. More...
 
void SetLayerMask (const decLayerMask &layerMask)
 Set layer mask. More...
 
float GetSpeakerGain () const
 Gain to multiply all speakers with. More...
 
void SetSpeakerGain (float gain)
 Set gain to multiply all speakers with. More...
 
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
deBaseAudioMicrophoneGetPeerAudio () const
 Audio system peer. More...
 
void SetPeerAudio (deBaseAudioMicrophone *peer)
 Set audio system peer. 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)
 Create microphone. More...
 
virtual ~deMicrophone ()
 Clean up microphone. More...
 

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...
 

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.

The layer masks affects which speakers the microphone can hear and which components affect sound propagation. Speakers assigned to the microphone are not affected by the layer mask.

Member Typedef Documentation

◆ Ref

Type holding strong reference.

Member Enumeration Documentation

◆ eMicrophoneType

Enumerator
emtPoint 
emtDirected 

Constructor & Destructor Documentation

◆ deMicrophone()

deMicrophone::deMicrophone ( deMicrophoneManager manager)

Create microphone.

◆ ~deMicrophone()

virtual deMicrophone::~deMicrophone ( )
protectedvirtual

Clean up microphone.

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.

◆ GetLayerMask()

const decLayerMask& deMicrophone::GetLayerMask ( ) const
inline

Layer mask.

◆ GetLLWorldNext()

deMicrophone* deMicrophone::GetLLWorldNext ( ) const
inline

Next microphone in the parent world linked list.

◆ GetLLWorldPrev()

deMicrophone* deMicrophone::GetLLWorldPrev ( ) const
inline

Previous microphone in the parent world linked list.

◆ GetMuted()

bool deMicrophone::GetMuted ( ) const
inline

Microphone is muted.

◆ GetOrientation()

const decQuaternion& deMicrophone::GetOrientation ( ) const
inline

Orientation.

◆ GetParentWorld()

deWorld* deMicrophone::GetParentWorld ( ) const
inline

Parent world or NULL.

◆ GetPeerAudio()

deBaseAudioMicrophone* deMicrophone::GetPeerAudio ( ) const
inline

Audio system peer.

◆ GetPosition()

const decDVector& deMicrophone::GetPosition ( ) const
inline

Position.

◆ GetRootSpeaker()

deSpeaker* deMicrophone::GetRootSpeaker ( ) const
inline

Root speaker or NULL if there are none.

◆ GetSpeakerCount()

int deMicrophone::GetSpeakerCount ( ) const
inline

Number of speakers.

◆ GetSpeakerGain()

float deMicrophone::GetSpeakerGain ( ) const
inline

Gain to multiply all speakers with.

Version
1.16

◆ GetType()

eMicrophoneType deMicrophone::GetType ( ) const
inline

Type.

◆ GetVelocity()

const decVector& deMicrophone::GetVelocity ( ) const
inline

Linear velocity in m/s.

◆ GetVolume()

float deMicrophone::GetVolume ( ) const
inline

Volume.

◆ RemoveAllSpeakers()

void deMicrophone::RemoveAllSpeakers ( )

Remove all speakers.

◆ RemoveSpeaker()

void deMicrophone::RemoveSpeaker ( deSpeaker speaker)

Remove speaker.

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

◆ SetLayerMask()

void deMicrophone::SetLayerMask ( const decLayerMask layerMask)

Set layer mask.

◆ SetLLWorldNext()

void deMicrophone::SetLLWorldNext ( deMicrophone microphone)

Set next microphone in the parent world linked list.

◆ SetLLWorldPrev()

void deMicrophone::SetLLWorldPrev ( deMicrophone microphone)

Set next microphone in the parent world linked list.

◆ SetMuted()

void deMicrophone::SetMuted ( bool  muted)

Set if microphone is muted.

◆ SetOrientation()

void deMicrophone::SetOrientation ( const decQuaternion orientation)

Set orientation.

◆ SetParentWorld()

void deMicrophone::SetParentWorld ( deWorld world)

Set parent world or NULL.

◆ SetPeerAudio()

void deMicrophone::SetPeerAudio ( deBaseAudioMicrophone peer)

Set audio system peer.

◆ SetPosition()

void deMicrophone::SetPosition ( const decDVector position)

Set position.

◆ SetSpeakerGain()

void deMicrophone::SetSpeakerGain ( float  gain)

Set gain to multiply all speakers with.

Version
1.16

◆ SetType()

void deMicrophone::SetType ( eMicrophoneType  type)

Set type.

◆ SetVelocity()

void deMicrophone::SetVelocity ( const decVector velocity)

Set velocity in m/s.

◆ SetVolume()

void deMicrophone::SetVolume ( float  volume)

Set volume.


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