Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
SoundHandle.h
Go to the documentation of this file.
1#ifndef NW4HBM_SND_SOUND_HANDLE_H
2#define NW4HBM_SND_SOUND_HANDLE_H
3
4#include <revolution/types.h>
5
6#include "BasicSound.h"
7
8#include "../ut/inlines.h"
9
10namespace nw4hbm {
11 namespace snd {
12 class SoundHandle : private ut::NonCopyable {
13 public:
14 SoundHandle() : mSound(NULL) {}
16
19
20 bool IsAttachedSound() const { return mSound != NULL; }
21
23
24 void DetachSound();
25
26 bool IsPrepared() const {
27 if (IsAttachedSound()) {
28 return mSound->IsPrepared();
29 }
30
31 return false;
32 }
33
34 u32 GetId() const {
35 if (IsAttachedSound()) {
36 return mSound->GetId();
37 }
38
39 return -1;
40 }
41
43 if (IsAttachedSound()) {
45 }
46 }
47
48 void Stop(int frames) {
49 if (IsAttachedSound()) {
50 mSound->Stop(frames);
51 }
52 }
53
54 void Pause(bool flag, int frames) {
55 if (IsAttachedSound()) {
56 mSound->Pause(flag, frames);
57 }
58 }
59
60 void SetVolume(f32 volume, int frames) {
61 if (IsAttachedSound()) {
62 mSound->SetVolume(volume, frames);
63 }
64 }
65 void SetPan(f32 pan) {
66 if (IsAttachedSound()) {
67 mSound->SetPan(pan);
68 }
69 }
70 void SetPitch(f32 pitch) {
71 if (IsAttachedSound()) {
72 mSound->SetPitch(pitch);
73 }
74 }
75
76 void SetOutputLine(int flag) {
77 if (IsAttachedSound()) {
79 }
80 }
81
82 void SetMainOutVolume(f32 volume) {
83 if (IsAttachedSound()) {
84 mSound->SetMainOutVolume(volume);
85 }
86 }
87 void SetRemoteOutVolume(int remote, f32 volume) {
88 if (IsAttachedSound()) {
89 mSound->SetRemoteOutVolume(remote, volume);
90 }
91 }
92
93 void SetFxSend(AuxBus bus, f32 send) {
94 if (IsAttachedSound()) {
95 mSound->SetFxSend(bus, send);
96 }
97 }
98
99 private:
101 };
102 } // namespace snd
103} // namespace nw4hbm
104
105#endif
static BOOL flag
Definition DEMOAVX.c:20
Definition SoundHandle.h:12
void SetOutputLine(int flag)
Definition SoundHandle.h:76
void SetVolume(f32 volume, int frames)
Definition SoundHandle.h:60
detail::BasicSound * detail_GetAttachedSound()
Definition SoundHandle.h:22
void detail_AttachSoundAsTempHandle(detail::BasicSound *sound)
void SetMainOutVolume(f32 volume)
Definition SoundHandle.h:82
void StartPrepared()
Definition SoundHandle.h:42
void Stop(int frames)
Definition SoundHandle.h:48
void SetPitch(f32 pitch)
Definition SoundHandle.h:70
void detail_AttachSound(detail::BasicSound *sound)
void SetFxSend(AuxBus bus, f32 send)
Definition SoundHandle.h:93
bool IsPrepared() const
Definition SoundHandle.h:26
void SetRemoteOutVolume(int remote, f32 volume)
Definition SoundHandle.h:87
detail::BasicSound * mSound
Definition SoundHandle.h:100
void Pause(bool flag, int frames)
Definition SoundHandle.h:54
SoundHandle()
Definition SoundHandle.h:14
void SetPan(f32 pan)
Definition SoundHandle.h:65
bool IsAttachedSound() const
Definition SoundHandle.h:20
~SoundHandle()
Definition SoundHandle.h:15
u32 GetId() const
Definition SoundHandle.h:34
void DetachSound()
Definition snd_SoundHandle.cpp:8
Definition BasicSound.h:30
void SetMainOutVolume(f32 volume)
u32 GetId() const
Definition BasicSound.h:132
virtual void SetPan(f32 pan)
virtual void SetVolume(f32 volume, int frames)
virtual void Pause(bool flag, int frames)
virtual void Stop(int frames=0)
virtual bool IsPrepared() const
virtual void SetPitch(f32 pitch)
void SetFxSend(AuxBus bus, f32 send)
void SetRemoteOutVolume(int remote, f32 volume)
Definition inlines.h:9
unsigned long u32
Definition types.h:12
float f32
Definition types.h:25
AuxBus
Definition snd_types.h:73
Definition HBMAnmController.h:6