project64/Source/Project64-audio/AudioSettings.h

61 lines
1.6 KiB
C
Raw Permalink Normal View History

#pragma once
2017-09-14 08:07:12 +00:00
class CSettings
{
public:
CSettings();
~CSettings();
inline bool AudioEnabled(void) const { return m_AudioEnabled; }
inline bool debugger_enabled(void) const { return m_debugger_enabled; }
2017-09-25 12:00:04 +00:00
inline uint32_t GetVolume(void) const { return m_Volume; }
2019-01-21 05:45:52 +00:00
inline uint32_t GetBuffer(void) const { return m_Buffer; }
inline bool SyncAudio(void) const { return m_SyncAudio; }
2017-09-28 11:43:58 +00:00
inline bool FullSpeed(void) const { return m_FullSpeed; }
2017-09-14 08:07:12 +00:00
inline bool FlushLogs(void) const { return m_FlushLogs; }
inline const char * log_dir(void) const { return m_log_dir; }
2019-01-21 05:45:52 +00:00
void SetSyncViaAudioEnabled(bool Enabled);
void SetAudioEnabled(bool Enabled);
void SetVolume(uint32_t Volume);
void SetBuffer(uint32_t Buffer);
2017-09-14 08:07:12 +00:00
void ReadSettings();
private:
2017-09-25 12:00:04 +00:00
static void stLogLevelChanged(void * _this)
{
((CSettings *)_this)->LogLevelChanged();
}
static void stSettingsChanged(void * _this)
{
((CSettings *)_this)->ReadSettings();
2017-09-25 12:00:04 +00:00
}
2017-09-14 08:07:12 +00:00
void RegisterSettings(void);
void LogLevelChanged(void);
2018-12-20 10:19:14 +00:00
short m_Set_SyncViaAudioEnabled;
short m_Set_EnableAudio;
2017-09-28 11:43:58 +00:00
short m_Set_SyncAudio;
short m_Set_FullSpeed;
short m_Set_LimitFPS;
2017-09-14 08:07:12 +00:00
short m_Set_basic_mode;
short m_Set_debugger;
short m_Set_log_dir;
short m_Set_log_flush;
char m_log_dir[260];
bool m_FlushLogs;
bool m_AudioEnabled;
bool m_advanced_options;
bool m_debugger_enabled;
2017-09-25 12:00:04 +00:00
uint32_t m_Volume;
2019-01-21 05:45:52 +00:00
uint32_t m_Buffer;
bool m_SyncAudio;
2017-09-28 11:43:58 +00:00
bool m_FullSpeed;
2017-09-14 08:07:12 +00:00
};
extern CSettings * g_settings;
void SetupAudioSettings(void);
void CleanupAudioSettings(void);