Build 1.0_r1(from source)

android.speech.recognition.impl
Class MediaFileReaderImpl

java.lang.Object
  extended by android.speech.recognition.MediaFileReader
      extended by android.speech.recognition.impl.MediaFileReaderImpl
All Implemented Interfaces:
AudioSource, Runnable

public class MediaFileReaderImpl
extends MediaFileReader
implements Runnable


Nested Class Summary
 
Nested classes/interfaces inherited from class android.speech.recognition.MediaFileReader
MediaFileReader.Mode
 
Constructor Summary
MediaFileReaderImpl(String filename, AudioSourceListener listener)
          Creates a new MediaFileReaderImpl.
 
Method Summary
 AudioStream createAudio()
          Creates an audioStream source
 void dispose()
          Releases the native resources associated with the object.
protected  void finalize()
          Called by the virtual machine when there are no longer any (non-weak) references to the receiver.
 void run()
          Begin doing the active part of the class' code.
 void setMode(MediaFileReader.Mode mode)
          Set the reading mode
 void start()
          Tells the audio source to start collecting audio samples.
 void stop()
          Stops this source from collecting audio samples.
 
Methods inherited from class android.speech.recognition.MediaFileReader
create
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MediaFileReaderImpl

public MediaFileReaderImpl(String filename,
                           AudioSourceListener listener)
Creates a new MediaFileReaderImpl.

Parameters:
filename - the name of the file to read from
listener - listens for MediaFileReader events
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

setMode

public void setMode(MediaFileReader.Mode mode)
Set the reading mode

Specified by:
setMode in class MediaFileReader
Parameters:
mode - the reading mode

createAudio

public AudioStream createAudio()
Creates an audioStream source

Specified by:
createAudio in interface AudioSource
Specified by:
createAudio in class MediaFileReader
Returns:
an AudioStream instance

start

public void start()
Tells the audio source to start collecting audio samples.

Specified by:
start in interface AudioSource
Specified by:
start in class MediaFileReader

stop

public void stop()
Stops this source from collecting audio samples.

Specified by:
stop in interface AudioSource
Specified by:
stop in class MediaFileReader

dispose

public void dispose()
Releases the native resources associated with the object.


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