com.speech4j.speech
Class Audio

java.lang.Object
  |
  +--com.speech4j.speech.NativeObject
        |
        +--com.speech4j.speech.Audio
Direct Known Subclasses:
AudioDest, AudioSource

public abstract class Audio
extends NativeObject

Represents IAudio interface. See IAudio documentation for more details. Methods PassNotify() and ToFileTime() are not implemened.

Version:
1.1
Author:
Pavel Vlasov

Constructor Summary
Audio()
           
 
Method Summary
 void claim()
          See IAudio::Claim().
 void flush()
          See IAudio::Flush()
 int getLevel()
          See IAudio::LevelGet()
 long getPosn()
          See IAudio::PosnGet()
 long getTotal()
          See IAudio::TotalGet()
 byte[] getWaveFormat()
          See IAudio::WaveFormatGet()
 void setLevel(int level)
          See IAudio::LevelSet()
 void setWaveFormat(byte[] format)
          See IAudio::WaveFormatSet()
 void start()
          See IAudio::Start()
 void Stop()
          See IAudio::Stop()
 void unClaim()
          See IAudio::UnClaim()
 
Methods inherited from class com.speech4j.speech.NativeObject
bytes2String, cleanup, getObjID, processMessages, stopProcessingMessages, string2Bytes, testSpeech
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Audio

public Audio()
Method Detail

claim

public void claim()
           throws SpeechException
See IAudio::Claim().

Throws:
SpeechException - If a corresponding native object does not exist (create() has not been invoked or destroy() has been invoked) or Claim() returns nonzero error code.

flush

public void flush()
           throws SpeechException
See IAudio::Flush()

Throws:
SpeechException - If a corresponding native object does not exist (create() has not been invoked or destroy() has been invoked) or Flush() returns nonzero error code.

getLevel

public int getLevel()
             throws SpeechException
See IAudio::LevelGet()

Returns:
Volume level
Throws:
SpeechException - If a corresponding native object does not exist (create() has not been invoked or destroy() has been invoked) or LevelGet() returns nonzero error code.

setLevel

public void setLevel(int level)
              throws SpeechException
See IAudio::LevelSet()

Parameters:
level - Volume level
Throws:
SpeechException - If a corresponding native object does not exist (create() has not been invoked or destroy() has been invoked) or LevelSet() returns nonzero error code.

getPosn

public long getPosn()
             throws SpeechException
See IAudio::PosnGet()

Returns:
position in bytes
Throws:
SpeechException - If a corresponding native object does not exist (create() has not been invoked or destroy() has been invoked) or PosnGet() returns nonzero error code.

start

public void start()
           throws SpeechException
See IAudio::Start()

Throws:
SpeechException - If a corresponding native object does not exist (create() has not been invoked or destroy() has been invoked) or Start() returns nonzero error code.

Stop

public void Stop()
          throws SpeechException
See IAudio::Stop()

Throws:
SpeechException - If a corresponding native object does not exist (create() has not been invoked or destroy() has been invoked) or Stop() returns nonzero error code.

getTotal

public long getTotal()
              throws SpeechException
See IAudio::TotalGet()

Returns:
Total number of bytes played or recorded
Throws:
SpeechException - If a corresponding native object does not exist (create() has not been invoked or destroy() has been invoked) or TotalGet() returns nonzero error code.

unClaim

public void unClaim()
             throws SpeechException
See IAudio::UnClaim()

Throws:
SpeechException - If a corresponding native object does not exist (create() has not been invoked or destroy() has been invoked) or UnClaim() returns nonzero error code.

getWaveFormat

public byte[] getWaveFormat()
                     throws SpeechException
See IAudio::WaveFormatGet()

Returns:
Wave format
Throws:
SpeechException - If a corresponding native object does not exist (create() has not been invoked or destroy() has been invoked) or WaveFormatGet() returns nonzero error code.

setWaveFormat

public void setWaveFormat(byte[] format)
                   throws SpeechException
See IAudio::WaveFormatSet()

Parameters:
format - Wave format
Throws:
SpeechException - If a corresponding native object does not exist (create() has not been invoked or destroy() has been invoked) or WaveFormatSet() returns nonzero error code.


Copyright © 2003 Pavel Vlasov. All Rights Reserved.