com.jme3.audio
クラス AudioData

java.lang.Object
  上位を拡張 com.jme3.audio.ALObject
      上位を拡張 com.jme3.audio.AudioData
直系の既知のサブクラス:
AudioBuffer, AudioStream

public abstract class AudioData
extends ALObject

AudioData is an abstract representation of audio data. There are two ways to handle audio data, short audio files are to be stored entirely in memory, while long audio files (music) is streamed from the hard drive as it is played.


入れ子のクラスの概要
static class AudioData.DataType
           
 
コンストラクタの概要
AudioData()
           
 
メソッドの概要
 int getBitsPerSample()
           
 int getChannels()
           
abstract  AudioData.DataType getDataType()
           
abstract  float getDuration()
           
 int getSampleRate()
           
 void setupFormat(int channels, int bitsPerSample, int sampleRate)
          Setup the format of the audio data.
 
クラス com.jme3.audio.ALObject から継承されたメソッド
clearUpdateNeeded, deleteObject, getId, isUpdateNeeded, resetObject, setId, setUpdateNeeded, toString
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

AudioData

public AudioData()
メソッドの詳細

getDataType

public abstract AudioData.DataType getDataType()
戻り値:
The data type, either Buffer or Stream.

getDuration

public abstract float getDuration()
戻り値:
the duration in seconds of the audio clip.

getBitsPerSample

public int getBitsPerSample()
戻り値:
Bits per single sample from a channel.

getChannels

public int getChannels()
戻り値:
Number of channels. 1 for mono, 2 for stereo, etc.

getSampleRate

public int getSampleRate()
戻り値:
The sample rate, or how many samples per second.

setupFormat

public void setupFormat(int channels,
                        int bitsPerSample,
                        int sampleRate)
Setup the format of the audio data.

パラメータ:
channels - # of channels, 1 = mono, 2 = stereo
bitsPerSample - Bits per sample, e.g 8 bits, 16 bits.
sampleRate - Sample rate, 44100, 22050, etc.