EMIPLIB
Public Member Functions

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]

List of all members.

Public Member Functions

bool init (int sampRate, int channels, MIPTime blockTime, bool useTimeInfo=true, bool floatSamples=true)
 Initializes the mixer component.
bool destroy ()
 De-initializes the mixer component.
bool setExtraDelay (MIPTime t)
 Adds an additional playback delay.
void setPlaybackTime (MIPTime t)
 Sets the internal playback time to a specific value.
MIPTime getPlaybackTime () const
 Returns the current internal playback time of this mixer.
void addSourceToIgnore (uint64_t id)
 Adds a source identifier which should be ignored.
void clearIgnoreList ()
 Clears the list of sources to ignore.

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: