urv.util.audio
Class AudioUtils

java.lang.Object
  extended by urv.util.audio.AudioUtils

public class AudioUtils
extends java.lang.Object

Class that provide a wide set of methods to send and receive audio through a channel

Author:
Raul Gracia

Constructor Summary
AudioUtils()
           
 
Method Summary
static javax.sound.sampled.AudioFormat getFormat()
          Returns the format of the retransmitted audio
static javax.sound.sampled.SourceDataLine initAudioLine()
          Method used to setup the audio line
static boolean isCapturing()
          Returns if the sender thread is capturing audio or not
static void playSoundData(byte[] soundData)
          Reproduces the audio formed by an array of data received
static void startAudioCapture(MChannel groupChannel, java.lang.String channelID, java.lang.String destAddr)
          Runs the sound sender thread.
static void stopAudioCapture()
          Stops the sender audio thread
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AudioUtils

public AudioUtils()
Method Detail

getFormat

public static javax.sound.sampled.AudioFormat getFormat()
Returns the format of the retransmitted audio


initAudioLine

public static javax.sound.sampled.SourceDataLine initAudioLine()
Method used to setup the audio line

Returns:
AudioLine

isCapturing

public static boolean isCapturing()
Returns if the sender thread is capturing audio or not


playSoundData

public static void playSoundData(byte[] soundData)
Reproduces the audio formed by an array of data received


startAudioCapture

public static void startAudioCapture(MChannel groupChannel,
                                     java.lang.String channelID,
                                     java.lang.String destAddr)
Runs the sound sender thread. It will send constantly audio packets to the receiver nodes.

Parameters:
groupChannel -
channelID -
destAddr -

stopAudioCapture

public static void stopAudioCapture()
Stops the sender audio thread