com.jme3.audio
クラス AudioStream

java.lang.Object
  上位を拡張 com.jme3.audio.ALObject
      上位を拡張 com.jme3.audio.AudioData
          上位を拡張 com.jme3.audio.AudioStream
すべての実装されたインタフェース:
java.io.Closeable

public class AudioStream
extends AudioData
implements java.io.Closeable

AudioStream is an implementation of AudioData that acquires the audio from an InputStream. Audio can be streamed from network, hard drive etc. It is assumed the data coming from the input stream is uncompressed.


入れ子のクラスの概要
 
クラス com.jme3.audio.AudioData から継承された入れ子のクラス/インタフェース
AudioData.DataType
 
コンストラクタの概要
AudioStream()
           
 
メソッドの概要
 void close()
          Closes the stream, releasing all data relating to it.
 void deleteObject(AudioRenderer r)
           
 AudioData.DataType getDataType()
           
 float getDuration()
           
 int getId()
           
 int getId(int index)
           
 int[] getIds()
           
 void initIds(int count)
           
 boolean isOpen()
           
 int readSamples(byte[] buf)
          Reads samples from the stream.
 int readSamples(byte[] buf, int offset, int length)
          Reads samples from the stream.
 void resetObject()
           
 void setId(int id)
           
 void setId(int index, int id)
           
 void setIds(int[] ids)
           
 void updateData(java.io.InputStream in, float duration)
           
 
クラス com.jme3.audio.AudioData から継承されたメソッド
getBitsPerSample, getChannels, getSampleRate, setupFormat
 
クラス com.jme3.audio.ALObject から継承されたメソッド
clearUpdateNeeded, isUpdateNeeded, setUpdateNeeded, toString
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

AudioStream

public AudioStream()
メソッドの詳細

updateData

public void updateData(java.io.InputStream in,
                       float duration)

readSamples

public int readSamples(byte[] buf,
                       int offset,
                       int length)
Reads samples from the stream. The format of the data depends on the getSampleRate(), getChannels(), getBitsPerSample() values.

パラメータ:
buf - Buffer where to read the samples
offset - The offset in the buffer where to read samples
length - The length inside the buffer where to read samples
戻り値:
number of bytes read.

readSamples

public int readSamples(byte[] buf)
Reads samples from the stream.

パラメータ:
buf - Buffer where to read the samples
戻り値:
number of bytes read.
関連項目:
readSamples(byte[], int, int)

getDuration

public float getDuration()
定義:
クラス AudioData 内の getDuration
戻り値:
the duration in seconds of the audio clip.

getId

public int getId()
オーバーライド:
クラス ALObject 内の getId

setId

public void setId(int id)
オーバーライド:
クラス ALObject 内の setId

initIds

public void initIds(int count)

getId

public int getId(int index)

setId

public void setId(int index,
                  int id)

getIds

public int[] getIds()

setIds

public void setIds(int[] ids)

getDataType

public AudioData.DataType getDataType()
定義:
クラス AudioData 内の getDataType
戻り値:
The data type, either Buffer or Stream.

resetObject

public void resetObject()
定義:
クラス ALObject 内の resetObject

deleteObject

public void deleteObject(AudioRenderer r)
定義:
クラス ALObject 内の deleteObject

isOpen

public boolean isOpen()
戻り値:
Whether the stream is open or not. Reading from a closed stream will always return eof.

close

public void close()
Closes the stream, releasing all data relating to it. Reading from the stream will return eof.

定義:
インタフェース java.io.Closeable 内の close
例外:
java.io.IOException