KisaragiLibrary
 
読み取り中…
検索中…
一致する文字列を見つけられません
Kisaragi_Lib::SoundClip クラス

#include <Sound.hpp>

公開メンバ関数

 SoundClip (int _handle)
 
template<typename Num>
const int & Vol (Num _in)
 
void Play ()
 
void Pause ()
 
void Stop ()
 
bool IsPlay ()
 

公開変数類

SoundPlayType playType = ASYNC
 

非公開変数類

SoundHandle handle
 
bool isPlayTop = 1
 
RangeNum< int, ClampOnOutOfRangevol { 0,255 }
 

構築子と解体子

◆ SoundClip()

Kisaragi_Lib::SoundClip::SoundClip ( int _handle)
inline
73 : handle{ _handle }
74 {
75 Vol(128);
76 }
SoundHandle handle
Definition Sound.hpp:66
const int & Vol(Num _in)
Definition Sound.hpp:82

関数詳解

◆ Vol()

template<typename Num>
const int & Kisaragi_Lib::SoundClip::Vol ( Num _in)
inline
83 {
84 vol = _in;
85 ChangeVolumeSoundMem(vol,handle);
86 return vol;
87 }
RangeNum< int, ClampOnOutOfRange > vol
Definition Sound.hpp:69

参照元 SoundClip().

◆ Play()

void Kisaragi_Lib::SoundClip::Play ( )
inline
91 {
92 if (IsPlay())
93 {
94 Debug::PrintWarningStatic("既に再生中です");
95 return;
96 }
97
98 PlaySoundMem(handle, playType, isPlayTop);
99
100 }
static void PrintWarningStatic(const std::string _in)
警告用コンソール出力(文字色しか変わらない)
Definition Debug.cpp:147
bool isPlayTop
Definition Sound.hpp:67
bool IsPlay()
Definition Sound.hpp:128
SoundPlayType playType
Definition Sound.hpp:79

◆ Pause()

void Kisaragi_Lib::SoundClip::Pause ( )
inline
103 {
104 if (IsPlay())
105 {
106 isPlayTop = 0;
107 StopSoundMem(handle);
108 return;
109 }
110
111 Debug::PrintWarningStatic("再生されていない音声を停止しようとしました");
112 }

◆ Stop()

void Kisaragi_Lib::SoundClip::Stop ( )
inline
116 {
117 if (IsPlay())
118 {
119 isPlayTop = 1;
120 StopSoundMem(handle);
121 return;
122 }
123
124 Debug::PrintWarningStatic("再生されていない音声を停止しようとしました");
125 }

◆ IsPlay()

bool Kisaragi_Lib::SoundClip::IsPlay ( )
inline
129 {
130 return CheckSoundMem(handle) == 1;
131 }

参照元 Pause(), Play(), Stop().

メンバ詳解

◆ handle

SoundHandle Kisaragi_Lib::SoundClip::handle
private

◆ isPlayTop

bool Kisaragi_Lib::SoundClip::isPlayTop = 1
private

参照元 Pause(), Play(), Stop().

◆ vol

RangeNum<int, ClampOnOutOfRange> Kisaragi_Lib::SoundClip::vol { 0,255 }
private
69{ 0,255 };

参照元 Vol().

◆ playType

SoundPlayType Kisaragi_Lib::SoundClip::playType = ASYNC

参照元 Play().


このクラス詳解は次のファイルから抽出されました: