org.mobicents.media.server.component.audio
Class AudioMixer

java.lang.Object
  extended by org.mobicents.media.server.component.audio.AudioMixer
All Implemented Interfaces:
Mixer

public class AudioMixer
extends Object
implements Mixer

Implements audio mixer.

Author:
kulikov

Field Summary
protected  long mixCount
           
 
Constructor Summary
AudioMixer(Scheduler scheduler)
           
 
Method Summary
 Format getFormat()
          Gets the format of the output stream.
 MediaSource getOutput()
          Gets the mixed stream.
protected  int getPacketSize()
          Gets the used packet size.
 MediaSink newInput()
          Creates new input for this mixer.
 void release(MediaSink input)
          Releases unused input stream
 String report()
           
 void setFormat(Format format)
          Modifies format of the output stream.
 void setGain(double gain)
          Modify gain of the output stream.
 void start()
           
 void startMixer()
           
 void stop()
           
 void stopMixer(boolean stopOutput)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mixCount

protected long mixCount
Constructor Detail

AudioMixer

public AudioMixer(Scheduler scheduler)
Method Detail

getFormat

public Format getFormat()
Gets the format of the output stream.

Specified by:
getFormat in interface Mixer
Returns:
the audio format descriptor.

setFormat

public void setFormat(Format format)
Modifies format of the output stream.

Specified by:
setFormat in interface Mixer
Parameters:
format - the format descriptor.

newInput

public MediaSink newInput()
Creates new input for this mixer.

Specified by:
newInput in interface Mixer
Returns:
Input as media sink object.

getOutput

public MediaSource getOutput()
Gets the mixed stream.

Specified by:
getOutput in interface Mixer
Returns:
the output stream

getPacketSize

protected int getPacketSize()
Gets the used packet size.

Returns:
the packet size value in bytes.

release

public void release(MediaSink input)
Releases unused input stream

Specified by:
release in interface Mixer
Parameters:
input - the input stream previously created

setGain

public void setGain(double gain)
Modify gain of the output stream.

Parameters:
gain - the new value of the gain in dBm.

start

public void start()
Specified by:
start in interface Mixer

startMixer

public void startMixer()

stop

public void stop()
Specified by:
stop in interface Mixer

stopMixer

public void stopMixer(boolean stopOutput)

report

public String report()
Specified by:
report in interface Mixer


Copyright © 2011. All Rights Reserved.