2 #include <Multimedia/SDX.h>
25 Sound(
const char *ファイル名 ,
double 音量 = 1.0)
31 int Load(
const char *ファイル名 ,
double 音量 = 1.0)
33 handle = Mix_LoadWAV(ファイル名);
34 if( !handle )
return false;
36 Mix_VolumeChunk(handle,
int(音量 * 128));
43 Mix_FreeChunk(handle);
56 static int channel = 0;
57 Mix_PlayChannel(0, handle, (
int)再生方法);
58 channel = (++channel) % 2;
83 Mix_VolumeChunk(handle,
int(音量 * 128));
bool SetLoopSamplePos(int ループ周波数)
サンプリング周波数でループ位置を設定[未実装].
Definition: Sound.h:102
効果音用音声を表すクラス.
Definition: Sound.h:16
bool Play(PlayType 再生方法=PlayType::Back, bool 先頭から再生=true) const
音声ファイルを再生.
Definition: Sound.h:54
bool SetPan(int 音声パン)
音声パンを設定[未実装].
Definition: Sound.h:75
bool SetFrequency(int 再生周波数)
再生周波数を設定[未実装].
Definition: Sound.h:89
bool Check() const
再生中か判定[未実装].
Definition: Sound.h:63
Sound(const char *ファイル名, double 音量=1.0)
音声ファイルをメモリに読み込む.
Definition: Sound.h:25
SoundHandle GetHandle() const
ハンドルを取得.
Definition: Sound.h:48
int Load(const char *ファイル名, double 音量=1.0)
音声ファイルをメモリに読み込む.
Definition: Sound.h:31
bool SetVolume(double 音量)
音量を0~1.0の範囲で設定.
Definition: Sound.h:81
bool Release()
音声ファイルをメモリから開放.
Definition: Sound.h:41
bool SetLoopPos(int ループ位置)
ミリ秒単位でループ位置を設定[未実装].
Definition: Sound.h:95
bool Stop()
再生を停止[未実装].
Definition: Sound.h:69
PlayType
音声の再生方式.
Definition: Sound.h:7