EMIPLIB  1.2.1
Public Member Functions | List of all members
MIPAudioMixer Class Reference

This component can mix several audio streams. More...

#include <mipaudiomixer.h>

Inheritance diagram for MIPAudioMixer:
Inheritance graph
[legend]
Collaboration diagram for MIPAudioMixer:
Collaboration graph
[legend]

Public Member Functions

bool init (int sampRate, int channels, MIPTime blockTime, bool useTimeInfo=true, bool floatSamples=true)
 Initializes the mixer component. More...
 
bool destroy ()
 De-initializes the mixer component. More...
 
bool setExtraDelay (MIPTime t)
 Adds an additional playback delay. More...
 
void setPlaybackTime (MIPTime t)
 Sets the internal playback time to a specific value. More...
 
MIPTime getPlaybackTime () const
 Returns the current internal playback time of this mixer. More...
 
void addSourceToIgnore (uint64_t id)
 Adds a source identifier which should be ignored. More...
 
void clearIgnoreList ()
 Clears the list of sources to ignore. More...
 
- Public Member Functions inherited from MIPComponent
virtual void lock ()
 Locks the current component. More...
 
virtual void unlock ()
 Unlocks the current component. More...
 
std::string getComponentName () const
 Returns the name of the component. More...
 
- Public Member Functions inherited from MIPErrorBase
std::string getErrorString () const
 Returns the last known error description. More...
 

Additional Inherited Members

- Protected Member Functions inherited from MIPComponent
 MIPComponent (const std::string &componentName)
 Create a component with the specified name. More...
 
- Protected Member Functions inherited from MIPErrorBase
void setErrorString (const std::string &str) const
 Stores an error description. More...
 

Detailed Description

Using this component, several audio streams can be mixed. In the default mode, it accepts floating point raw audio messages and produces floating point raw audio messages. You can also work with signed 16 bit native raw audio messages. This component generates feedback about the current offset in the output stream.

Member Function Documentation

void MIPAudioMixer::addSourceToIgnore ( uint64_t  id)
inline
void MIPAudioMixer::clearIgnoreList ( )
inline
bool MIPAudioMixer::destroy ( )

This function frees the resources claimed by the mixer component.

MIPTime MIPAudioMixer::getPlaybackTime ( ) const
inline
bool MIPAudioMixer::init ( int  sampRate,
int  channels,
MIPTime  blockTime,
bool  useTimeInfo = true,
bool  floatSamples = true 
)

Using this function, the audio mixer component can be initialized.

Parameters
sampRateThe sampling rate of incoming and outgoing audio messages.
channelsThe number of channels of incoming and outgoing audio messages.
blockTimeAudio messages created by this component contain the amount of data corresponding to the specified time interval in blockTime
useTimeInfoIf set to true, the time information in a raw audio message will be used to determine the position of the audio in the output stream. If set to false, incoming messages will be inserted at the head of the stream and timing information will be ignored.
floatSamplesFlag indicating if floating point samples should be used or signed 16 bit native endian samples.
bool MIPAudioMixer::setExtraDelay ( MIPTime  t)

Using this function, an additional playback delay can be introduced. Note that only positive delays are allowed. This can be useful for inter-media synchronization, in case not all the component delays are known well enough to provide exact synchronization. Using this function, the synchronization can then be adjusted manually.

void MIPAudioMixer::setPlaybackTime ( MIPTime  t)
inline

Sets the internal playback time to a specific value. This allows multiple audio mixers to be nicely synchronized (can come in handy when creating an audio mixing server).


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