summaryrefslogtreecommitdiffhomepage
path: root/StarsEx/AudioConfig.h
blob: 0f4f55a8f726ee157e2a255185eab16ac0152d87 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*  Starshatter: The Open Source Project
    Copyright (c) 2021-2024, Starshatter: The Open Source Project Contributors
    Copyright (c) 2011-2012, Starshatter OpenSource Distribution Contributors
    Copyright (c) 1997-2006, Destroyer Studios LLC.

    AUTHOR:       John DiCamillo


    OVERVIEW
    ========
    Audio Configuration class
*/

#ifndef AudioConfig_h
#define AudioConfig_h

#include "Types.h"

// +--------------------------------------------------------------------+

class AudioConfig
{
public:
    AudioConfig();
    ~AudioConfig();

    static void          Initialize();
    static void          Close();
    static AudioConfig*  GetInstance();

    void     Load();
    void     Save();

    static int  MenuMusic();
    static int  GameMusic();
    static int  EfxVolume();
    static int  GuiVolume();
    static int  WrnVolume();
    static int  VoxVolume();
    static int  Silence();
    static void SetTraining(bool t);

    int      GetMasterVolume() const { return master_volume; }
    int      GetMusicVolume() const { return music_volume; }
    int      GetWorldVolume() const { return world_volume; }
    int      GetMenuMusic() const { return menu_music; }
    int      GetGameMusic() const { return game_music; }
    int      GetEfxVolume() const { return efx_volume; }
    int      GetGuiVolume() const { return gui_volume; }
    int      GetWrnVolume() const { return wrn_volume; }
    int      GetVoxVolume() const { return vox_volume; }

    void     SetMasterVolume(int v);
    void     SetMusicVolume(int v);
    void     SetWorldVolume(int v);
    void     SetMenuMusic(int v);
    void     SetGameMusic(int v);
    void     SetEfxVolume(int v);
    void     SetGuiVolume(int v);
    void     SetWrnVolume(int v);
    void     SetVoxVolume(int v);

protected:
    int      master_volume;
    int      music_volume;
    int      world_volume;

    int      menu_music;
    int      game_music;

    int      efx_volume;
    int      gui_volume;
    int      wrn_volume;
    int      vox_volume;

    bool     training;
};

#endif  // AudioConfig_h