summaryrefslogtreecommitdiff
path: root/libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundSystem.h
blob: c611d049e989be3c6eefb1bfde5c0fb03c5d87c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef NW4HBM_SND_SOUND_SYSTEM_H
#define NW4HBM_SND_SOUND_SYSTEM_H

#include <revolution/types.h>

#include "AxManager.h"
#include "RemoteSpeakerManager.h"
#include "TaskThread.h"

namespace nw4hbm {
    namespace snd {

        class FxBase;
        class SoundSystem {
        public:
            static const int DEFAULT_DVD_THREAD_PRIORITY = 3;
            static const int DEFAULT_SOUND_THREAD_PRIORITY = 4;

            static void InitSoundSystem(s32 soundThreadPrio = DEFAULT_SOUND_THREAD_PRIORITY,
                                        s32 dvdThreadPriority = DEFAULT_DVD_THREAD_PRIORITY);

            static void ShutdownSoundSystem();

            static void SetOutputMode(OutputMode mode) {
                detail::AxManager::GetInstance().SetOutputMode(mode);
            }

            static f32 GetMasterVolume() {
                return detail::AxManager::GetInstance().GetMasterVolume();
            }
            static void SetMasterVolume(f32 volume, int frame) {
                detail::AxManager::GetInstance().SetMasterVolume(volume, frame);
            }

            static RemoteSpeaker& GetRemoteSpeaker(int idx) {
                return detail::RemoteSpeakerManager::GetInstance().GetRemoteSpeaker(idx);
            }

            static void AppendEffect(AuxBus bus, FxBase* pFx) {
                detail::AxManager::GetInstance().AppendEffect(bus, pFx);
            }
            static void ClearEffect(AuxBus bus, int frame) {
                detail::AxManager::GetInstance().ClearEffect(bus, frame);
            }
        };

    }  // namespace snd
}  // namespace nw4hbm

#endif