Build 1.0_r1(from source)

android.speech.recognition.impl
Class DeviceSpeakerImpl

java.lang.Object
  extended by android.speech.recognition.DeviceSpeaker
      extended by android.speech.recognition.impl.DeviceSpeakerImpl
All Implemented Interfaces:
Runnable

public class DeviceSpeakerImpl
extends DeviceSpeaker
implements Runnable


Method Summary
protected  void finalize()
          Called by the virtual machine when there are no longer any (non-weak) references to the receiver.
static DeviceSpeakerImpl getInstance()
          Returns the singleton instance.
 void run()
          Begin doing the active part of the class' code.
 void setCodec(Codec playbackCodec)
          Set the playback codec.
 void setListener(DeviceSpeakerListener listener)
          set the microphone listener.
 void start(AudioStream source)
          Start audio playback.
 void stop()
          Stops audio playback.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

run

public void run()
Description copied from interface: Runnable
Begin doing the active part of the class' code.

Specified by:
run in interface Runnable

getInstance

public static DeviceSpeakerImpl getInstance()
Returns the singleton instance.

Returns:
the singleton instance

start

public void start(AudioStream source)
Start audio playback.

Specified by:
start in class DeviceSpeaker
Parameters:
source - the audio to play

stop

public void stop()
Stops audio playback.

Specified by:
stop in class DeviceSpeaker

setCodec

public void setCodec(Codec playbackCodec)
Set the playback codec. This must be called before start is called.

Specified by:
setCodec in class DeviceSpeaker
Parameters:
playbackCodec - the codec to use for the playback operation.

setListener

public void setListener(DeviceSpeakerListener listener)
set the microphone listener.

Specified by:
setListener in class DeviceSpeaker
Parameters:
listener - the device speaker listener.

finalize

protected void finalize()
                 throws Throwable
Description copied from class: Object
Called by the virtual machine when there are no longer any (non-weak) references to the receiver. Subclasses can use this facility to guarantee that any associated resources are cleaned up before the receiver is garbage collected. Uncaught exceptions which are thrown during the running of the method cause it to terminate immediately, but are otherwise ignored.

Note: The virtual machine assumes that the implementation in class Object is empty.

Overrides:
finalize in class Object
Throws:
Throwable - The virtual machine ignores any exceptions which are thrown during finalization.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature