2016-06-05 01:33:35 +00:00
|
|
|
/****************************************************************************
|
2017-09-11 11:57:21 +00:00
|
|
|
* *
|
|
|
|
* Project64-audio - A Nintendo 64 audio plugin. *
|
|
|
|
* http://www.pj64-emu.com/ *
|
|
|
|
* Copyright (C) 2017 Project64. All rights reserved. *
|
|
|
|
* *
|
|
|
|
* License: *
|
|
|
|
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
|
|
|
|
* *
|
|
|
|
****************************************************************************/
|
2016-06-05 01:33:35 +00:00
|
|
|
#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; }
|
2017-10-13 00:53:36 +00:00
|
|
|
inline bool TinyBuffer(void) const { return m_TinyBuffer; }
|
|
|
|
inline bool FPSBuffer(void) const { return m_FPSBuffer; }
|
2017-09-26 13:57:33 +00:00
|
|
|
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; }
|
|
|
|
|
2017-09-25 12:00:04 +00:00
|
|
|
void SetAudioEnabled(bool Enabled);
|
|
|
|
void SetVolume(uint32_t Volume);
|
2017-10-13 00:53:36 +00:00
|
|
|
void SetTinyBuffer(bool TinyBuffer);
|
|
|
|
void SetFPSBuffer(bool FPSBuffer);
|
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)
|
|
|
|
{
|
2017-09-26 13:57:33 +00:00
|
|
|
((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);
|
|
|
|
|
|
|
|
short m_Set_EnableAudio;
|
2017-09-28 11:43:58 +00:00
|
|
|
short m_Set_SyncAudio;
|
|
|
|
short m_Set_FullSpeed;
|
2017-09-28 19:32:43 +00:00
|
|
|
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;
|
2017-10-13 00:53:36 +00:00
|
|
|
bool m_TinyBuffer;
|
|
|
|
bool m_FPSBuffer;
|
2017-09-26 13:57:33 +00:00
|
|
|
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);
|