summaryrefslogtreecommitdiffhomepage
path: root/StarsEx/AudioConfig.h
blob: f721592aade53e8db460f2fefb48a85f019bfe27 (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
/*  Starshatter: The Open Source Project
    Copyright (c) 2021-2022, 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      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     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      menu_music;
    int      game_music;

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

    bool     training;
};

#endif  // AudioConfig_h