NW4F Snd
Loading...
Searching...
No Matches
snd_ExternalSoundPlayer.h
Go to the documentation of this file.
1#ifndef NW_SND_EXTERNAL_SOUND_PLAYER_H_
2#define NW_SND_EXTERNAL_SOUND_PLAYER_H_
3
4#include <nw/ut/ut_LinkList.h>
5#include <nw/snd/snd_BasicSound.h>
6
7namespace nw { namespace snd {
8
9class SoundActor;
10
11namespace internal {
12
14{
15public:
17
18public:
21
22 void StopAllSound(int fadeFrames);
23 void PauseAllSound(bool flag, int fadeFrames);
24
25 int GetPlayingSoundCount() const { return static_cast<int>(m_SoundList.GetSize()); }
26 void SetPlayableSoundCount(int count);
27 int GetPlayableSoundCount() const { return m_PlayableCount; }
28
29 bool detail_CanPlaySound(int startPriority);
30
33
34 template <class Function>
35 void ForEachSoundRef(Function& function, bool reverse = false);
36
37 template <class Function>
38 Function ForEachSound(Function function, bool reverse = false);
39
40 void Finalize(SoundActor* actor);
41
42private:
44
47};
48static_assert(sizeof(ExternalSoundPlayer) == 0x10);
49
50} } } // namespace nw::snd::internal
51
52#endif // NW_SND_EXTERNAL_SOUND_PLAYER_H_
Definition snd_SoundActor.h:13
Definition snd_BasicSound.h:146
Definition snd_ExternalSoundPlayer.h:14
int GetPlayingSoundCount() const
Definition snd_ExternalSoundPlayer.h:25
void ForEachSoundRef(Function &function, bool reverse=false)
SoundList m_SoundList
Definition snd_ExternalSoundPlayer.h:45
int m_PlayableCount
Definition snd_ExternalSoundPlayer.h:46
bool AppendSound(internal::BasicSound *sound)
Function ForEachSound(Function function, bool reverse=false)
bool detail_CanPlaySound(int startPriority)
void Finalize(SoundActor *actor)
ut::LinkList< BasicSound, offsetof(BasicSound, m_ExtSoundPlayerPlayLink)> SoundList
Definition snd_ExternalSoundPlayer.h:16
void RemoveSound(internal::BasicSound *sound)
internal::BasicSound * GetLowestPrioritySound()
void PauseAllSound(bool flag, int fadeFrames)
int GetPlayableSoundCount() const
Definition snd_ExternalSoundPlayer.h:27
Definition snd_BasicSound.cpp:3
Definition snd_BasicSound.cpp:3