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

net.java.sip.communicator.impl.media.notify
Class PortAudioClipImpl

java.lang.Object
  extended by net.java.sip.communicator.impl.media.notify.SCAudioClipImpl
      extended by net.java.sip.communicator.impl.media.notify.PortAudioClipImpl
All Implemented Interfaces:
SCAudioClip

public class PortAudioClipImpl
extends SCAudioClipImpl

Implementation of SCAudioClip using PortAudio.

Author:
Damian Minkov

Constructor Summary
PortAudioClipImpl(URL url, AudioNotifierServiceImpl audioNotifier)
          Creates the audio clip and initialize the listener used from the loop timer.
 
Method Summary
 void internalStop()
          Stops this audio without setting the isLooping property in the case of a looping audio.
 void play()
          Plays this audio.
 void playInLoop(int interval)
          Plays this audio in loop.
 void stop()
          Stops this audio.
 
Methods inherited from class net.java.sip.communicator.impl.media.notify.SCAudioClipImpl
getLoopInterval, isInvalid, isLooping, setInvalid, setIsInvalid, setIsLooping, setLoopInterval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortAudioClipImpl

public PortAudioClipImpl(URL url,
                         AudioNotifierServiceImpl audioNotifier)
                  throws IOException
Creates the audio clip and initialize the listener used from the loop timer.

Parameters:
url - the url pointing to the audio file
audioNotifier - the audio notify service
Throws:
IOException - cannot audio clip with supplied url.
Method Detail

play

public void play()
Plays this audio.


playInLoop

public void playInLoop(int interval)
Plays this audio in loop.

Parameters:
interval - the loop interval

stop

public void stop()
Stops this audio.


internalStop

public void internalStop()
Stops this audio without setting the isLooping property in the case of a looping audio. The AudioNotifier uses this method to stop the audio when setMute(true) is invoked. This allows us to restore all looping audios when the sound is restored by calling setMute(false).

Specified by:
internalStop in class SCAudioClipImpl

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

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