#include <Sound.h>
Inheritance diagram for Lamp::Sound:
Public Types | |
enum | State { statePlay, stateSuspend, stateStop, stateLost } |
ステート More... | |
enum | Focus { focusNormal = 0, focusSticky, focusGlobal } |
フォーカス More... | |
enum | Reset { resetName = (1), resetCursor = (resetName << 1), resetPriority = (resetCursor << 1), resetLoop = (resetPriority << 1), resetLoopCursor = (resetLoop << 1), resetVolume = (resetLoopCursor << 1), resetFrequency = (resetVolume << 1), resetFade = (resetFrequency << 1), resetPan = (resetFade << 1), resetPosition = (resetPan << 1), resetVelocity = (resetPosition << 1), resetDistance = (resetVelocity << 1), resetConeDirection = (resetDistance << 1), resetConeAngle = (resetConeDirection << 1), resetConeOutsideVolume = (resetConeAngle << 1), reset3DEnabled = (resetConeOutsideVolume << 1), resetNone = (0), resetAll = (0xffffffff), resetRuntime } |
リセットフラグ | |
Public Member Functions | |
virtual void | setName (const String &name)=0 |
名前の設定 | |
virtual const String & | getName () const=0 |
名前の取得 | |
virtual u_int | getSize () const=0 |
サイズの取得 | |
virtual float | getTimeLength () const |
時間の長さの取得 | |
virtual int | getSample () const=0 |
サンプル数の取得 | |
virtual int | getChannel () const=0 |
チャンネル数の取得 | |
virtual int | getBit () const=0 |
ビット数の取得 | |
virtual Focus | getFocus () const=0 |
フォーカスの取得 | |
virtual u_int | getOneSampleBytes () const |
1サンプルのバイト数取得 | |
virtual u_int | getOneSecondBytes () const |
1秒のバイト数取得 | |
virtual float | byteToTime (u_int byte) const |
バイト数から時間への変換 | |
virtual u_int | timeToByte (float time) const |
時間からバイト数への変換 | |
virtual bool | play ()=0 |
再生 | |
virtual void | stop ()=0 |
停止 | |
virtual void | suspend ()=0 |
再生の一時停止 | |
virtual bool | resume ()=0 |
再生再開 | |
virtual void | reset (Reset flags) |
リセット | |
virtual State | getState () const=0 |
状態の取得 | |
virtual void | setCursor (u_int cursor)=0 |
再生位置設定 | |
virtual u_int | getCursor () const=0 |
再生位置取得 | |
virtual void | setCurrentTime (float timeCursor) |
再生時間設定 | |
virtual float | getCurrentTime () const |
現在の再生時間取得 | |
virtual void | setPriority (int priority)=0 |
優先度の設定 | |
virtual int | getPriority () const=0 |
優先度の取得 | |
virtual void | setLoop (bool loop)=0 |
ループの設定 | |
virtual bool | isLoop () const=0 |
ループしているか | |
virtual void | setLoopCursor (u_int loopCursor) |
ループ位置の設定 | |
virtual u_int | getLoopCursor () const |
ループ位置の取得 | |
virtual void | setLoopTime (float loopTimeCursor) |
ループ時間の設定 | |
virtual float | getLoopTime () const |
ループ時間の取得 | |
virtual void | setVolume (float volume)=0 |
ボリュームの設定 | |
virtual float | getVolume () const=0 |
ボリュームの取得 | |
virtual void | setFrequency (int frequency)=0 |
周波数の設定 | |
virtual int | getFrequency () const=0 |
周波数の取得 | |
virtual void | setOriginalFrequency ()=0 |
オリジナル周波数の設定 | |
virtual void | fadeIn (float millisecond)=0 |
フェードイン | |
virtual void | fadeOut (float millisecond)=0 |
フェードアウト | |
virtual void | fade (float millisecond, float startVolume, float endVolume)=0 |
フェード | |
virtual void | stopFade () |
フェードの中止 | |
virtual bool | isFading () const=0 |
フェード中かどうか | |
virtual void | setComment (const String &comment)=0 |
コメントの設定 | |
virtual const String & | getComment () const=0 |
コメントの取得 | |
virtual void | applyCommentOption () |
コメントオプションの適用 | |
virtual Sound * | clone () |
複製 ストリームは複製できない。 | |
virtual bool | hasOwnership () const=0 |
所有権の取得 | |
virtual String | toString () const |
文字列への変換 | |
virtual bool | useStream () const |
ストリームを使用しているか | |
virtual bool | isSoundBuffer () const |
サウンドバッファかどうか | |
virtual SoundBuffer * | castSoundBuffer () const |
サウンドバッファへのキャスト | |
virtual bool | isStereoSound () const |
ステレオサウンドかどうか | |
virtual StereoSound * | castStereoSound () const |
ステレオサウンドへのキャスト | |
virtual bool | isSound3D () const |
3Dサウンドかどうか | |
virtual Sound3D * | castSound3D () const |
3Dサウンドへのキャスト | |
virtual bool | isStaticSound () const |
静的サウンドかどうか | |
virtual StaticSound * | castStaticSound () const |
静的サウンドへのキャスト | |
virtual bool | isStreamSound () const |
ストリームサウンドかどうか | |
virtual StreamSound * | castStreamSound () const |
ストリームサウンドへのキャスト | |
virtual bool | isStaticSound3D () const |
静的3Dサウンドかどうか | |
virtual StaticSound3D * | castStaticSound3D () const |
静的3Dサウンドへのキャスト | |
virtual bool | isStreamSound3D () const |
ストリーム3Dサウンドかどうか | |
virtual StreamSound3D * | castStreamSound3D () const |
ストリーム3Dサウンドへのキャスト | |
Static Public Member Functions | |
int | volumeToDecibel (float volume) |
ボリュームデシベル変換 | |
float | decibelToVolume (int decibel) |
デシベルボリューム変換 | |
Static Public Attributes | |
const int | priorityDefault = 0 |
デフォルト優先度 | |
const int | priorityMax = Limit::shortMax |
最高優先度 | |
const int | priorityMin = Limit::shortMin |
最低優先度 | |
Protected Member Functions | |
Sound () | |
コンストラクタ | |
virtual | ~Sound () |
デストラクタ | |
virtual void | setOwnership (bool ownership)=0 |
所有権の設定 | |
virtual bool | update ()=0 |
アップデート | |
Friends | |
class | SoundManager |
class | SoundCache |
状態の移り変わり。
play()
statePlay そのまま再生
stateStop 先頭に戻って再生
stateSuspend 一時停止した場所から再生
stateLost そのまま再生を試みる
stop()
statePlay 停止
stateStop そのまま停止
stateSuspend 停止
stateLost 停止
suspend()
statePlay 一時停止
stateStop そのまま停止
stateSuspend そのまま一時停止
stateLost 一時停止を試みる
resume()
statePlay そのまま再生を試みる
stateStop そのまま停止
stateSuspend 再生再開
stateLost 再生再開を試みる
Definition at line 64 of file Sound.h.
|
フォーカス
Definition at line 99 of file Sound.h. Referenced by Lamp::SoundBuffer::getFocus(), and toString(). |
|
ステート
Definition at line 84 of file Sound.h. Referenced by Lamp::SoundBuffer::resume(), Lamp::SoundBuffer::suspend(), and toString(). |
|
バイト数から時間への変換
Definition at line 214 of file Sound.h. References Assert, getOneSecondBytes(), and getSize(). Referenced by getCurrentTime(), getLoopTime(), and getTimeLength(). |
|
3Dサウンドへのキャスト
Definition at line 524 of file Sound.h. References isSound3D(), and NULL. Referenced by Lamp::SoundCache::getSound3D(), Lamp::SoundCache::playSound3D(), and Lamp::SoundCache::SoundArray::toString(). |
|
サウンドバッファへのキャスト
Definition at line 492 of file Sound.h. References isSoundBuffer(), and NULL. |
|
静的サウンドへのキャスト
Definition at line 540 of file Sound.h. References isStaticSound(), and NULL. |
|
静的3Dサウンドへのキャスト
Definition at line 572 of file Sound.h. References isStaticSound3D(), and NULL. |
|
ステレオサウンドへのキャスト
Definition at line 508 of file Sound.h. References isStereoSound(), and NULL. Referenced by Lamp::SoundCache::getStereoSound(), and Lamp::SoundCache::playStereoSound(). |
|
ストリームサウンドへのキャスト
Definition at line 556 of file Sound.h. References isStreamSound(), and NULL. |
|
ストリーム3Dサウンドへのキャスト
Definition at line 588 of file Sound.h. References isStreamSound3D(), and NULL. |
|
複製 ストリームは複製できない。
Reimplemented in Lamp::StaticSound3D, and Lamp::StaticSound. Definition at line 458 of file Sound.h. References NULL. Referenced by Lamp::SoundCache::SoundArray::getFreeSound(). |
|
デシベルボリューム変換
Definition at line 136 of file Sound.cpp. References Assert. Referenced by Lamp::Sound3D::Sound3D(), Lamp::SoundBuffer::SoundBuffer(), and Lamp::StereoSound::StereoSound(). |
|
フェード
Implemented in Lamp::SoundBuffer. Referenced by stopFade(). |
|
フェードイン
Implemented in Lamp::SoundBuffer. |
|
フェードアウト
Implemented in Lamp::SoundBuffer. |
|
ビット数の取得
Implemented in Lamp::SoundBuffer. Referenced by getOneSampleBytes(), and toString(). |
|
チャンネル数の取得
Implemented in Lamp::SoundBuffer. Referenced by getOneSampleBytes(), and toString(). |
|
コメントの取得
Implemented in Lamp::SoundBuffer. Referenced by applyCommentOption(), and toString(). |
|
現在の再生時間取得
Definition at line 293 of file Sound.h. References byteToTime(), and getCursor(). Referenced by toString(). |
|
再生位置取得
Implemented in Lamp::StreamSound3D, Lamp::StreamSound, and Lamp::SoundBuffer. Referenced by getCurrentTime(), and Lamp::SoundCache::SoundArray::getFreeSound(). |
|
フォーカスの取得
Implemented in Lamp::SoundBuffer. Referenced by toString(). |
|
周波数の取得
Implemented in Lamp::SoundBuffer. Referenced by toString(). |
|
ループ位置の取得
Reimplemented in Lamp::StreamSound3D, and Lamp::StreamSound. Definition at line 343 of file Sound.h. References u_int. Referenced by getLoopTime(). |
|
ループ時間の取得
Definition at line 358 of file Sound.h. References byteToTime(), and getLoopCursor(). Referenced by toString(). |
|
名前の取得
Implemented in Lamp::SoundBuffer. Referenced by Lamp::SoundCache::SoundArray::toString(), and toString(). |
|
1サンプルのバイト数取得
Definition at line 197 of file Sound.h. References getBit(), getChannel(), and u_int. Referenced by applyCommentOption(), getOneSecondBytes(), Lamp::StreamPlayer::setCursor(), and Lamp::StreamPlayer::setLoopCursor(). |
|
1秒のバイト数取得
Definition at line 205 of file Sound.h. References getOneSampleBytes(), getSample(), and u_int. Referenced by byteToTime(), and timeToByte(). |
|
優先度の取得
Implemented in Lamp::SoundBuffer. Referenced by Lamp::SoundCache::SoundArray::toString(), and toString(). |
|
サンプル数の取得
Implemented in Lamp::SoundBuffer. Referenced by getOneSecondBytes(), and toString(). |
|
サイズの取得
Implemented in Lamp::StreamSound3D, Lamp::StreamSound, and Lamp::SoundBuffer. Referenced by byteToTime(), getTimeLength(), and toString(). |
|
時間の長さの取得
Definition at line 167 of file Sound.h. References byteToTime(), and getSize(). Referenced by timeToByte(), and toString(). |
|
ボリュームの取得
Implemented in Lamp::SoundBuffer. Referenced by toString(). |
|
所有権の取得
Implemented in Lamp::SoundBuffer. Referenced by Lamp::SoundCache::SoundArray::getFreeSound(), Lamp::SoundCache::getSound(), and Lamp::SoundCache::releaseSound(). |
|
フェード中かどうか
Implemented in Lamp::SoundBuffer. |
|
ループしているか
Implemented in Lamp::SoundBuffer. Referenced by Lamp::SoundCache::SoundArray::toString(), and toString(). |
|
3Dサウンドかどうか
Reimplemented in Lamp::Sound3D. Definition at line 518 of file Sound.h. Referenced by castSound3D(). |
|
サウンドバッファかどうか
Reimplemented in Lamp::SoundBuffer. Definition at line 486 of file Sound.h. Referenced by castSoundBuffer(). |
|
静的サウンドかどうか
Reimplemented in Lamp::StaticSound. Definition at line 534 of file Sound.h. Referenced by castStaticSound(). |
|
静的3Dサウンドかどうか
Reimplemented in Lamp::StaticSound3D. Definition at line 566 of file Sound.h. Referenced by castStaticSound3D(). |
|
ステレオサウンドかどうか
Reimplemented in Lamp::StereoSound. Definition at line 502 of file Sound.h. Referenced by castStereoSound(), and Lamp::SoundCache::SoundArray::toString(). |
|
ストリームサウンドかどうか
Reimplemented in Lamp::StreamSound. Definition at line 550 of file Sound.h. Referenced by castStreamSound(). |
|
ストリーム3Dサウンドかどうか
Reimplemented in Lamp::StreamSound3D. Definition at line 582 of file Sound.h. Referenced by castStreamSound3D(). |
|
再生
Implemented in Lamp::Sound3D, Lamp::StreamSound3D, Lamp::StreamSound, and Lamp::SoundBuffer. Referenced by Lamp::SoundCache::playSound(). |
|
リセット
Reimplemented in Lamp::Sound3D, and Lamp::StereoSound. Definition at line 43 of file Sound.cpp. References priorityDefault, setLoop(), setLoopCursor(), setName(), setOriginalFrequency(), setPriority(), setVolume(), stop(), and stopFade(). Referenced by Lamp::SoundCache::getSound(), and Lamp::SoundCache::playSound(). |
|
再生再開
Implemented in Lamp::SoundBuffer. Referenced by Lamp::SoundCache::resumeAll(). |
|
コメントの設定
Implemented in Lamp::SoundBuffer. |
|
再生時間設定
Definition at line 285 of file Sound.h. References setCursor(), and timeToByte(). |
|
再生位置設定
Implemented in Lamp::StreamSound3D, Lamp::StreamSound, and Lamp::SoundBuffer. Referenced by setCurrentTime(). |
|
周波数の設定
Implemented in Lamp::SoundBuffer. Referenced by Lamp::SoundCache::playSound(). |
|
ループの設定 ループは次回再生時に適用される
Implemented in Lamp::SoundBuffer. Referenced by applyCommentOption(), and reset(). |
|
ループ位置の設定
Reimplemented in Lamp::StreamSound3D, and Lamp::StreamSound. Definition at line 334 of file Sound.h. References Assert. Referenced by applyCommentOption(), reset(), and setLoopTime(). |
|
ループ時間の設定
Definition at line 350 of file Sound.h. References setLoopCursor(), and timeToByte(). Referenced by applyCommentOption(). |
|
名前の設定
Implemented in Lamp::SoundBuffer. Referenced by reset(). |
|
所有権の設定
Implemented in Lamp::SoundBuffer. Referenced by Lamp::SoundCache::getSound(), and Lamp::SoundCache::releaseSound(). |
|
優先度の設定 優先度は次回再生時に適用される
Implemented in Lamp::SoundBuffer. Referenced by reset(). |
|
ボリュームの設定
Implemented in Lamp::SoundBuffer. Referenced by Lamp::SoundCache::playSound(), and reset(). |
|
時間からバイト数への変換
Definition at line 224 of file Sound.h. References Assert, getOneSecondBytes(), getTimeLength(), and u_int. Referenced by setCurrentTime(), and setLoopTime(). |
|
文字列への変換
Reimplemented in Lamp::Sound3D, and Lamp::StereoSound. Definition at line 78 of file Sound.cpp. References Focus, focusGlobal, focusNormal, focusSticky, Lamp::String::format(), getBit(), getChannel(), getComment(), getCurrentTime(), getFocus(), getFrequency(), getLoopTime(), getName(), getPriority(), getSample(), getSize(), getState(), getTimeLength(), getVolume(), Lamp::String::isEmpty(), isLoop(), State, stateLost, statePlay, stateStop, and stateSuspend. |
|
アップデート
Implemented in Lamp::SoundBuffer. |
|
ストリームを使用しているか
Reimplemented in Lamp::StreamSound3D, and Lamp::StreamSound. |
|
ボリュームデシベル変換
Definition at line 121 of file Sound.cpp. References Assert. Referenced by Lamp::Sound3D::setConeOutsideVolume(), Lamp::StereoSound::setPan(), and Lamp::SoundBuffer::setVolume(). |