CAmbisonicDecoder Class Reference

Ambisonic decoder. More...

#include <AmbisonicDecoder.h>

Inherits CAmbisonicBase.

Inheritance diagram for CAmbisonicDecoder:

Inheritance graph
[legend]
Collaboration diagram for CAmbisonicDecoder:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CAmbisonicDecoder (AmbInt nOrder=DEFAULT_ORDER, AmbInt b3D=DEFAULT_HEIGHT, AmbInt nSpeakerSetUp=k50, AmbInt nSpeakers=0)
 ~CAmbisonicDecoder ()
void Create (AmbInt nOrder, AmbInt b3D, AmbInt nSpeakerSetUp, AmbInt nSpeakers=0)
void Reset ()
void Refresh ()
void Process (CBFormat *pBFSrc, AmbInt nSamples, AmbFloat **ppfDst)
AmbInt GetSpeakerSetUp ()
AmbInt GetSpeakerCount ()
void SetPosition (AmbInt nSpeaker, PolarPoint polPosition)
PolarPoint GetPosition (AmbInt nSpeaker)
void SetOrderWeight (AmbInt nSpeaker, AmbInt nOrder, AmbFloat fWeight)
AmbFloat GetOrderWeight (AmbInt nSpeaker, AmbInt nOrder)
virtual AmbFloat GetCoefficient (AmbInt nSpeaker, AmbInt nChannel)

Protected Member Functions

void SpeakerSetUp (AmbInt nSpeakerSetUp, AmbInt nSpeakers=1)

Protected Attributes

AmbInt m_nSpeakerSetUp
AmbInt m_nSpeakers
CAmbisonicSpeakerm_pAmbSpeakers

Detailed Description

Ambisonic decoder.

This is a basic decoder, handling both default and custom speaker configurations.


Constructor & Destructor Documentation

CAmbisonicDecoder::CAmbisonicDecoder ( AmbInt  nOrder = DEFAULT_ORDER,
AmbInt  b3D = DEFAULT_HEIGHT,
AmbInt  nSpeakerSetUp = k50,
AmbInt  nSpeakers = 0 
)

Constructor that allows for the format to be specified. If the format arguments are not specified, the values set for DEFAULT_ORDER, and DEFAULT_HEIGHT, will be used instead, with a 5.0 speaker setup. nSpeakerSetUp can be any of the SpeakerSetUps enumerations. If kCustomSpeakerSetUp is used, then nSpeakers must also be given, indicating the number of speakers in the custom speaker configuration. Else, if using one of the default configurations, nSpeakers does not need to be specified.

CAmbisonicDecoder::~CAmbisonicDecoder (  ) 


Member Function Documentation

void CAmbisonicDecoder::Create ( AmbInt  nOrder,
AmbInt  b3D,
AmbInt  nSpeakerSetUp,
AmbInt  nSpeakers = 0 
)

Re-create the object for the given configuration. Previous data is lost. nSpeakerSetUp can be any of the SpeakerSetUps enumerations. If kCustomSpeakerSetUp is used, then nSpeakers must also be given, indicating the number of speakers in the custom speaker configuration. Else, if using one of the default configurations, nSpeakers does not need to be specified.

void CAmbisonicDecoder::Reset (  )  [virtual]

Resets all the speakers.

Implements CAmbisonicBase.

void CAmbisonicDecoder::Refresh (  )  [virtual]

Refreshes all the speakers.

Implements CAmbisonicBase.

void CAmbisonicDecoder::Process ( CBFormat pBFSrc,
AmbInt  nSamples,
AmbFloat **  ppfDst 
)

Decode B-Format to speaker feeds.

AmbInt CAmbisonicDecoder::GetSpeakerSetUp (  ) 

Returns the current speaker setup, which is a SpeakerSetUps enumeration.

AmbInt CAmbisonicDecoder::GetSpeakerCount (  ) 

Returns the number of speakers in the current speaker setup.

void CAmbisonicDecoder::SetPosition ( AmbInt  nSpeaker,
PolarPoint  polPosition 
)

Used when current speaker setup is kCustomSpeakerSetUp, to position each speaker. Should be used by iterating nSpeaker for the number of speakers declared present in the current speaker setup, using polPosition to position each on.

PolarPoint CAmbisonicDecoder::GetPosition ( AmbInt  nSpeaker  ) 

Used when current speaker setup is kCustomSpeakerSetUp, it returns the position of the speaker of index nSpeaker, in the current speaker setup.

void CAmbisonicDecoder::SetOrderWeight ( AmbInt  nSpeaker,
AmbInt  nOrder,
AmbFloat  fWeight 
)

Sets the weight [0,1] for the spherical harmonics of the given order, at the given speaker.

AmbFloat CAmbisonicDecoder::GetOrderWeight ( AmbInt  nSpeaker,
AmbInt  nOrder 
)

Returns the weight [0,1] for the spherical harmonics of the given order, at the given speaker.

AmbFloat CAmbisonicDecoder::GetCoefficient ( AmbInt  nSpeaker,
AmbInt  nChannel 
) [virtual]

Gets the coefficient of the specified channel/component of the specified speaker. Useful for the Binauralizer.

void CAmbisonicDecoder::SpeakerSetUp ( AmbInt  nSpeakerSetUp,
AmbInt  nSpeakers = 1 
) [protected]


Member Data Documentation

AmbInt CAmbisonicDecoder::m_nSpeakerSetUp [protected]

AmbInt CAmbisonicDecoder::m_nSpeakers [protected]

CAmbisonicSpeaker* CAmbisonicDecoder::m_pAmbSpeakers [protected]


The documentation for this class was generated from the following files:
Generated on Sat May 19 02:26:28 2007 for amblib by doxygen1.5.1-p1;  SourceForge.net Logo