SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.neomedia.portaudio
Class PortAudioManager

java.lang.Object
  extended by net.java.sip.communicator.impl.neomedia.portaudio.PortAudioManager

public class PortAudioManager
extends Object

Manages PortAudio stream creation and setting necessary properties when using them.

Author:
Damian Minkov, Lubomir Marinov

Constructor Summary
PortAudioManager()
           
 
Method Summary
static long getFilterLengthInMillis()
          Gets the number of milliseconds of echo to cancel.
static double getSuggestedLatency()
          Returns the default values of the latency to be used when opening new streams.
static boolean isEnabledDeNoise()
          Is noise reduction enabled.
static boolean isEnabledEchoCancel()
          Is echo cancel enabled.
static void setDeNoise(boolean enabled)
          Enables or disables noise suppression.
static void setEchoCancel(boolean enabled, long filterLengthInMillis)
          Enables or disables echo cancel.
static void setSuggestedLatency(double aSuggestedLatency)
          Changes the suggested latency.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortAudioManager

public PortAudioManager()
Method Detail

setEchoCancel

public static void setEchoCancel(boolean enabled,
                                 long filterLengthInMillis)
Enables or disables echo cancel.

Parameters:
enabled - should we enable or disable echo cancellation
filterLengthInMillis - the number of milliseconds of echo to cancel. Should generally correspond to 100-500 ms.

setDeNoise

public static void setDeNoise(boolean enabled)
Enables or disables noise suppression.

Parameters:
enabled - should we enable or disable noise suppression.

getSuggestedLatency

public static double getSuggestedLatency()
Returns the default values of the latency to be used when opening new streams.

Returns:
the latency.

setSuggestedLatency

public static void setSuggestedLatency(double aSuggestedLatency)
Changes the suggested latency.

Parameters:
aSuggestedLatency - the suggestedLatency to set.

isEnabledEchoCancel

public static boolean isEnabledEchoCancel()
Is echo cancel enabled.

Returns:
true if echo cancel is enabled, false otherwise.

isEnabledDeNoise

public static boolean isEnabledDeNoise()
Is noise reduction enabled.

Returns:
true if noise reduction is enabled, false otherwise.

getFilterLengthInMillis

public static long getFilterLengthInMillis()
Gets the number of milliseconds of echo to cancel.

Returns:
the number of milliseconds of echo to cancel

SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.