commit
9cc1bcef0a
435
Config/Audio.rdb
435
Config/Audio.rdb
|
@ -1,433 +1,4 @@
|
|||
// ============ Audio RDB for Project64 ====================================
|
||||
[82DC04FD-CF2D82F4-C:45]
|
||||
Good Name=A Bug's Life (U)
|
||||
BufferDivider=60
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[E6A95A4F-BAD2EA23-C:45]
|
||||
Good Name=Aidyn Chronicles - The First Mage (U) [!] (V1.0)
|
||||
BufferDivider=60
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[112051D2-68BEF8AC-C:45]
|
||||
Good Name=Aidyn Chronicles - The First Mage (U) [!] (V1.1)
|
||||
BufferDivider=60
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[1FB5D932-3BA9481B-C:45]
|
||||
Good Name=Armorines - Project S.W.A.R.M. (U)
|
||||
SyncAudio=0
|
||||
|
||||
[4C52BBB2-CEAB0F6B-C:45]
|
||||
Good Name=Army Men - Air Combat (U)
|
||||
SyncAudio=0
|
||||
|
||||
[B20F73B6-2975FC34-C:45]
|
||||
Good Name=Army Men - Sarge's Heroes 2 (U)
|
||||
SyncAudio=0
|
||||
|
||||
[A4BF9306-BF0CDFD1-C:45]
|
||||
Good Name=Banjo-Kazooie (U) (V1.0)
|
||||
BufferDivider=30
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[CD7559AC-B26CF5AE-C:45]
|
||||
Good Name=Banjo-Kazooie (U) (V1.1)
|
||||
BufferDivider=30
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[C2E9AA9A-475D70AA-C:45]
|
||||
Good Name=Banjo-Tooie (U)
|
||||
BufferDivider=30
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[6AA4DDE7-E3E2F4E7-C:45]
|
||||
Good Name=BattleTanx (U)
|
||||
BufferDivider=30
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[75A4E247-6008963D-C:45]
|
||||
Good Name=BattleTanx - Global Assault (U)
|
||||
BufferDivider=30
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[EDF419A8-BF1904CC-C:45]
|
||||
Good Name=Beetle Adventure Racing! (U) (M3)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[7C647C25-D9D901E6-C:45]
|
||||
Good Name=Blast Corps (U) (V1.0)
|
||||
BufferDivider=30
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[7C647E65-1948D305-C:45]
|
||||
Good Name=Blast Corps (U) (V1.1)
|
||||
BufferDivider=30
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[5326696F-FE9A99C3-C:45]
|
||||
Good Name=Body Harvest (U)
|
||||
BufferDivider=95
|
||||
SyncAudio=1
|
||||
|
||||
[F568D51E-7E49BA1E-C:45]
|
||||
Good Name=Bomberman 64 (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[F35D5F95-8AFE3D69-C:45]
|
||||
Good Name=Castlevania (U) (V1.0)
|
||||
BufferDivider=60
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[F35D5335-B7667CB7-C:45]
|
||||
Good Name=Castlevania (U) (V1.1)
|
||||
BufferDivider=60
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[4BCDFF47-AAA3AF8F-C:45]
|
||||
Good Name=Castlevania (U) (V1.2)
|
||||
BufferDivider=60
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[30C7AC50-7704072D-C:45]
|
||||
Good Name=Conker's Bad Fur Day (U)
|
||||
BufferDivider=30
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[46A3F7AF-0F7591D0-C:45]
|
||||
Good Name=Cruis'n Exotica (U)
|
||||
|
||||
[FF2F2FB4-D161149A-C:45]
|
||||
Good Name=Cruis'n USA (U) (V1.0)
|
||||
BufferDivider=30
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[5306CF45-CBC49250-C:45]
|
||||
Good Name=Cruis'n USA (U) (V1.1)
|
||||
BufferDivider=30
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[B3402554-7340C004-C:45]
|
||||
Good Name=Cruis'n USA (U) (V1.2)
|
||||
BufferDivider=30
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[DFE61153-D76118E6-C:45]
|
||||
Good Name=Cruis'n World (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[DEE584A2-0F161187-C:45]
|
||||
Good Name=Destruction Derby 64 (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[53D440E7-7519B011-C:45]
|
||||
Good Name=Diddy Kong Racing (U) (M2) (V1.0)
|
||||
BufferDivider=30
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[E402430D-D2FCFC9D-C:45]
|
||||
Good Name=Diddy Kong Racing (U) (M2) (V1.1)
|
||||
BufferDivider=30
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[EC58EABF-AD7C7169-C:45]
|
||||
Good Name=Donkey Kong 64 (U)
|
||||
BufferDivider=30
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[A83E101A-E937B69D-C:45]
|
||||
Good Name=Doom 64 (U) (V1.0)
|
||||
BufferDivider=30
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[423E96F4-CE88F05B-C:45]
|
||||
Good Name=Doom 64 (U) (V1.1)
|
||||
BufferDivider=30
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[07861842-A12EBC9F-C:45]
|
||||
Good Name=Excitebike 64 (U) (V1.0)
|
||||
|
||||
[F9D411E3-7CB29BC0-C:45]
|
||||
Good Name=Excitebike 64 (U) (V1.1)
|
||||
|
||||
[FDA245D2-A74A3D47-C:45]
|
||||
Good Name=Extreme-G (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[B30ED978-3003C9F9-C:45]
|
||||
Good Name=F-ZERO X (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[4252A5AD-AE6FBF4E-C:45]
|
||||
Good Name=Goemon's Great Adventure (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[DCBC50D1-09FD1AA3-C:45]
|
||||
Good Name=GoldenEye 007 (U)
|
||||
BufferDivider=30
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[C7C98F8E-42145DDE-C:45]
|
||||
Good Name=Hot Wheels Turbo Racing (U)
|
||||
|
||||
[8A6009B6-94ACE150-C:45]
|
||||
Good Name=Jet Force Gemini (U)
|
||||
BufferDivider=30
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[9E8FE2BA-8B270770-C:45]
|
||||
Good Name=Killer Instinct Gold (U) (V1.0)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[9E8FCDFA-49F5652B-C:45]
|
||||
Good Name=Killer Instinct Gold (U) (V1.1)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[F908CA4C-36464327-C:45]
|
||||
Good Name=Killer Instinct Gold (U) (V1.2)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[7F304099-52CF5276-C:4A]
|
||||
Good Name=Last Legion UX (J)
|
||||
BufferDivider=30
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[0160E9E5-29A4CB68-C:45]
|
||||
Good Name=Last Legion UX (J) [T]
|
||||
BufferDivider=30
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[664BA3D4-678A80B7-C:45]
|
||||
Good Name=Mario Golf (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[3E5055B6-2E92DA52-C:45]
|
||||
Good Name=Mario Kart 64 (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[7C3829D9-6E8247CE-C:45]
|
||||
Good Name=Mario Party 3 (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[5001CF4F-F30CB3BD-C:45]
|
||||
Good Name=Mario Tennis (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[28768D6D-B379976C-C:45]
|
||||
Good Name=Monaco Grand Prix (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[5AC383E1-D712E387-C:45]
|
||||
Good Name=Monopoly (U) (M2)
|
||||
|
||||
[FCBCCB21-72903C6B-C:45]
|
||||
Good Name=Mystical Ninja Starring Goemon (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[DF331A18-5FD4E044-C:45]
|
||||
Good Name=NASCAR 2000 (U)
|
||||
|
||||
[591A806E-A5E6921D-C:45]
|
||||
Good Name=NHL 99 (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[82EFDC30-806A2461-C:45]
|
||||
Good Name=NHL Blades of Steel '99 (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[6DFDCDC3-4DE701C8-C:45]
|
||||
Good Name=NHL Breakaway 98 (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=0
|
||||
|
||||
[441768D0-7D73F24F-C:45]
|
||||
Good Name=NHL Breakaway 99 (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=0
|
||||
|
||||
[E6419BC5-69011DE3-C:45]
|
||||
Good Name=Ogre Battle 64 - Person of Lordly Caliber (U) (V1.0)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[0ADAECA7-B17F9795-C:45]
|
||||
Good Name=Ogre Battle 64 - Person of Lordly Caliber (U) (V1.1)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[65EEE53A-ED7D733C-C:45]
|
||||
Good Name=Paper Mario (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[DDF460CC-3CA634C0-C:45]
|
||||
Good Name=Perfect Dark (U) (V1.0)
|
||||
BufferDivider=30
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[41F2B98F-B458B466-C:45]
|
||||
Good Name=Perfect Dark (U) (V1.1)
|
||||
BufferDivider=30
|
||||
BufferLevel=2
|
||||
SyncAudio=1
|
||||
|
||||
[C851961C-78FCAAFA-C:45]
|
||||
Good Name=Pilotwings 64 (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[03571182-892FD06D-C:45]
|
||||
Good Name=Pokemon Stadium 2 (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[BDA8F143-B1AF2D62-C:45]
|
||||
Good Name=Quake II (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=0
|
||||
|
||||
[0F1FA987-BFC1AFA6-C:45]
|
||||
Good Name=Re-Volt (U)
|
||||
|
||||
[F050746C-247B820B-C:45]
|
||||
Good Name=Road Rash 64 (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[0C5EE085-A167DD3E-C:45]
|
||||
Good Name=Rocket - Robot on Wheels (U)
|
||||
|
||||
[2500267E-2A7EC3CE-C:45]
|
||||
Good Name=RR64 - Ridge Racer 64 (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=0
|
||||
|
||||
[769147F3-2033C10E-C:45]
|
||||
Good Name=S.C.A.R.S. (U)
|
||||
|
||||
[3A4760B5-2D74D410-C:45]
|
||||
Good Name=Shadow Man (U)
|
||||
|
||||
[7ECBE939-3C331795-C:45]
|
||||
Good Name=South Park (U)
|
||||
|
||||
[A60ED171-3D85D06E-C:45]
|
||||
Good Name=Spider-Man (U)
|
||||
|
||||
[A7D015F8-2289AA43-C:45]
|
||||
Good Name=Star Fox 64 (U) (V1.0)
|
||||
|
||||
[BA780BA0-0F21DB34-C:45]
|
||||
Good Name=Star Fox 64 (U) (V1.1)
|
||||
|
||||
[0684FBFB-5D3EA8A5-C:45]
|
||||
Good Name=StarCraft 64 (U)
|
||||
|
||||
[635A2BFF-8B022326-C:45]
|
||||
Good Name=Super Mario 64 (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[916B8B5B-780B85A4-C:45]
|
||||
Good Name=Super Smash Bros. (U)
|
||||
BufferDivider=30
|
||||
SyncAudio=1
|
||||
|
||||
[204EC022-B119D185-C:45]
|
||||
Good Name=Tony Hawk's Pro Skater (U) (V1.0)
|
||||
|
||||
[E0144180-650B78C9-C:45]
|
||||
Good Name=Tony Hawk's Pro Skater (U) (V1.1)
|
||||
|
||||
[99150E18-1266E6A5-C:45]
|
||||
Good Name=Tony Hawk's Pro Skater 2 (U)
|
||||
|
||||
[1A7F70B5-00B7B9FD-C:45]
|
||||
Good Name=Tony Hawk's Pro Skater 3 (U)
|
||||
|
||||
[BE5973E0-89B0EDB8-C:45]
|
||||
Good Name=Top Gear Rally 2 (U)
|
||||
|
||||
[2F70F10D-5C4187FF-C:45]
|
||||
Good Name=Turok - Dinosaur Hunter (U) (V1.0)
|
||||
|
||||
[2F700DCD-176CC5C9-C:45]
|
||||
Good Name=Turok - Dinosaur Hunter (U) (V1.1) (V1.2)
|
||||
|
||||
[49088A11-6494957E-C:45]
|
||||
Good Name=Turok 2 - Seeds of Evil (U) (V1.0)
|
||||
|
||||
[E0B92B94-B9A7E025-C:45]
|
||||
Good Name=Turok 2 - Seeds of Evil (U) (V1.1)
|
||||
|
||||
[89A579F1-667E97EF-C:45]
|
||||
Good Name=Turok 3 - Shadow of Oblivion (U)
|
||||
|
||||
[3C059038-C8BF2182-C:45]
|
||||
Good Name=V-Rally Edition 99 (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[EA71056A-E4214847-C:45]
|
||||
Good Name=Vigilante 8 (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[F5C5866D-052713D9-C:45]
|
||||
Good Name=Vigilante 8 - 2nd Offense (U)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
|
||||
[ED98957E-8242DCAC-C:45]
|
||||
Good Name=WinBack - Covert Operations (U)
|
||||
|
||||
[2337D8E8-6B8E7CEC-C:45]
|
||||
Good Name=Yoshi's Story (U) (M2)
|
||||
BufferDivider=60
|
||||
SyncAudio=1
|
||||
[AA18B1A5-07DB6AEB-C:45]
|
||||
Good Name=Resident Evil 2 (U) (V1.1)
|
||||
Sync Audio=0
|
||||
|
|
|
@ -4,7 +4,8 @@ Auto Sleep=0
|
|||
Basic Mode=0
|
||||
Cheats=..\..\Config\Project64.cht
|
||||
ExtInfo=..\..\Config\Project64.rdx
|
||||
Glide64RDB=..\..\Config\Glide64.rdb
|
||||
VideoRDB=..\..\Config\Video.rdb
|
||||
AudioRDB=..\..\Config\Audio.rdb
|
||||
Notes=..\..\Config\Project64.rdn
|
||||
RomDatabase=..\..\Config\Project64.rdb
|
||||
RomListCache=..\..\Config\Project64.cache3
|
||||
|
|
|
@ -86,7 +86,38 @@ EXPORT void CALL AiDacrateChanged(int SystemType)
|
|||
case SYSTEM_MPAL: video_clock = 48628316; break;
|
||||
}
|
||||
uint32_t Frequency = video_clock / (g_Dacrate + 1);
|
||||
g_SoundDriver->AI_SetFrequency(Frequency);
|
||||
|
||||
if (Frequency < 4000)
|
||||
{
|
||||
WriteTrace(TraceAudioDriver, TraceDebug, "Not Audio Data!");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
int32_t BufferSize = 0; double audio_clock = 0; double framerate = 0;
|
||||
|
||||
if (g_settings->FPSBuffer() == true)
|
||||
{
|
||||
framerate = 59.94004;
|
||||
if (SystemType == SYSTEM_PAL) { framerate = 50; }
|
||||
}
|
||||
else
|
||||
{
|
||||
framerate = 64;
|
||||
if (SystemType == SYSTEM_PAL) { framerate = 53.33333; }
|
||||
}
|
||||
if (g_settings->TinyBuffer() == true)
|
||||
{
|
||||
audio_clock = ((video_clock / framerate) * 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
audio_clock = ((video_clock / framerate) * 4);
|
||||
}
|
||||
|
||||
BufferSize = (int32_t)audio_clock / (g_Dacrate) + 1 & ~0x1;
|
||||
g_SoundDriver->AI_SetFrequency(Frequency, BufferSize);
|
||||
}
|
||||
}
|
||||
WriteTrace(TraceAudioInterface, TraceDebug, "Done");
|
||||
}
|
||||
|
@ -126,7 +157,7 @@ EXPORT void CALL AiUpdate(int32_t Wait)
|
|||
}
|
||||
else
|
||||
{
|
||||
pjutil::Sleep(1);
|
||||
pjutil::Sleep(1); // TODO: Fixme -- Ai Update appears to be problematic
|
||||
}
|
||||
WriteTrace(TraceAudioInterface, TraceDebug, "Done");
|
||||
}
|
||||
|
@ -224,4 +255,4 @@ extern "C" void UseUnregisteredSetting(int /*SettingID*/)
|
|||
#ifdef _WIN32
|
||||
DebugBreak();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,9 @@ CSettings * g_settings = NULL;
|
|||
|
||||
CSettings::CSettings() :
|
||||
m_Set_EnableAudio(0),
|
||||
m_Set_SyncAudio(0),
|
||||
m_Set_FullSpeed(0),
|
||||
m_Set_LimitFPS(0),
|
||||
m_Set_basic_mode(0),
|
||||
m_Set_debugger(0),
|
||||
m_Set_log_dir(0),
|
||||
|
@ -26,18 +29,22 @@ CSettings::CSettings() :
|
|||
m_advanced_options(false),
|
||||
m_debugger_enabled(false),
|
||||
m_Volume(100),
|
||||
m_BufferDivider(90),
|
||||
m_BufferLevel(4),
|
||||
m_SyncAudio(false)
|
||||
m_TinyBuffer(true),
|
||||
m_FPSBuffer(true),
|
||||
m_SyncAudio(false),
|
||||
m_FullSpeed(true)
|
||||
{
|
||||
memset(m_log_dir, 0, sizeof(m_log_dir));
|
||||
RegisterSettings();
|
||||
ReadSettings();
|
||||
|
||||
if (m_Set_EnableAudio != 0) { SettingsRegisterChange(false, m_Set_EnableAudio, this, stSettingsChanged); }
|
||||
if (m_Set_basic_mode != 0) { SettingsRegisterChange(false, m_Set_basic_mode, this, stSettingsChanged); }
|
||||
if (m_Set_debugger != 0) { SettingsRegisterChange(false, m_Set_debugger, this, stSettingsChanged); }
|
||||
if (m_Set_log_flush != 0) { SettingsRegisterChange(false, m_Set_log_flush, this, stSettingsChanged); }
|
||||
if (m_Set_EnableAudio != 0) { SettingsRegisterChange(true, m_Set_EnableAudio, this, stSettingsChanged); }
|
||||
if (m_Set_basic_mode != 0) { SettingsRegisterChange(true, m_Set_basic_mode, this, stSettingsChanged); }
|
||||
if (m_Set_debugger != 0) { SettingsRegisterChange(true, m_Set_debugger, this, stSettingsChanged); }
|
||||
if (m_Set_log_flush != 0) { SettingsRegisterChange(true, m_Set_log_flush, this, stSettingsChanged); }
|
||||
if (m_Set_SyncAudio != 0) { SettingsRegisterChange(true, m_Set_SyncAudio, this, stSettingsChanged); }
|
||||
if (m_Set_FullSpeed != 0) { SettingsRegisterChange(true, m_Set_FullSpeed, this, stSettingsChanged); }
|
||||
if (m_Set_LimitFPS != 0) { SettingsRegisterChange(true, m_Set_LimitFPS, this, stSettingsChanged); }
|
||||
SettingsRegisterChange(false, Set_Volume, this, stSettingsChanged);
|
||||
|
||||
SettingsRegisterChange(false, Set_Logging_MD5, this, stLogLevelChanged);
|
||||
|
@ -50,10 +57,13 @@ CSettings::CSettings() :
|
|||
|
||||
CSettings::~CSettings()
|
||||
{
|
||||
if (m_Set_EnableAudio != 0) { SettingsUnregisterChange(false, m_Set_EnableAudio, this, stSettingsChanged); }
|
||||
if (m_Set_basic_mode != 0) { SettingsUnregisterChange(false, m_Set_basic_mode, this, stSettingsChanged); }
|
||||
if (m_Set_debugger != 0) { SettingsUnregisterChange(false, m_Set_debugger, this, stSettingsChanged); }
|
||||
if (m_Set_log_flush != 0) { SettingsUnregisterChange(false, m_Set_log_flush, this, stSettingsChanged); }
|
||||
if (m_Set_EnableAudio != 0) { SettingsUnregisterChange(true, m_Set_EnableAudio, this, stSettingsChanged); }
|
||||
if (m_Set_basic_mode != 0) { SettingsUnregisterChange(true, m_Set_basic_mode, this, stSettingsChanged); }
|
||||
if (m_Set_debugger != 0) { SettingsUnregisterChange(true, m_Set_debugger, this, stSettingsChanged); }
|
||||
if (m_Set_log_flush != 0) { SettingsUnregisterChange(true, m_Set_log_flush, this, stSettingsChanged); }
|
||||
if (m_Set_SyncAudio != 0) { SettingsUnregisterChange(true, m_Set_SyncAudio, this, stSettingsChanged); }
|
||||
if (m_Set_FullSpeed != 0) { SettingsUnregisterChange(true, m_Set_FullSpeed, this, stSettingsChanged); }
|
||||
if (m_Set_LimitFPS != 0) { SettingsUnregisterChange(true, m_Set_LimitFPS, this, stSettingsChanged); }
|
||||
SettingsUnregisterChange(false, Set_Volume, this, stSettingsChanged);
|
||||
|
||||
SettingsUnregisterChange(false, Set_Logging_MD5, this, stLogLevelChanged);
|
||||
|
@ -68,6 +78,9 @@ void CSettings::RegisterSettings(void)
|
|||
{
|
||||
SetModuleName("default");
|
||||
m_Set_EnableAudio = FindSystemSettingId("Enable Audio");
|
||||
m_Set_SyncAudio = FindSystemSettingId("Sync Audio");
|
||||
m_Set_FullSpeed = FindSystemSettingId("Full Speed");
|
||||
m_Set_LimitFPS = FindSystemSettingId("Limit FPS");
|
||||
m_Set_basic_mode = FindSystemSettingId("Basic Mode");
|
||||
m_Set_debugger = FindSystemSettingId("Debugger");
|
||||
m_Set_log_flush = FindSystemSettingId("Log Auto Flush");
|
||||
|
@ -81,9 +94,8 @@ void CSettings::RegisterSettings(void)
|
|||
RegisterSetting(Set_Logging_InitShutdown, Data_DWORD_General, "InitShutdown", "Logging", g_ModuleLogLevel[TraceAudioInitShutdown], NULL);
|
||||
RegisterSetting(Set_Logging_Interface, Data_DWORD_General, "Interface", "Logging", g_ModuleLogLevel[TraceAudioInterface], NULL);
|
||||
RegisterSetting(Set_Logging_Driver, Data_DWORD_General, "Driver", "Logging", g_ModuleLogLevel[TraceAudioDriver], NULL);
|
||||
RegisterSetting(Set_BufferDivider, Data_DWORD_Game, "BufferDivider", "", 90, NULL);
|
||||
RegisterSetting(Set_BufferLevel, Data_DWORD_Game, "BufferLevel", "", 4, NULL);
|
||||
RegisterSetting(Set_SyncAudio, Data_DWORD_Game, "SyncAudio", "", (uint32_t)false, NULL);
|
||||
RegisterSetting(Set_TinyBuffer, Data_DWORD_Game, "TinyBuffer", "", (bool)true, NULL);
|
||||
RegisterSetting(Set_FPSBuffer, Data_DWORD_Game, "FPSBuffer", "", (bool)true, NULL);
|
||||
LogLevelChanged();
|
||||
}
|
||||
|
||||
|
@ -103,19 +115,14 @@ void CSettings::SetVolume(uint32_t Volume)
|
|||
}
|
||||
}
|
||||
|
||||
void CSettings::SetBufferDivider(uint32_t BufferDivider)
|
||||
void CSettings::SetTinyBuffer(bool TinyBuffer)
|
||||
{
|
||||
SetSetting(Set_BufferDivider, BufferDivider);
|
||||
SetSetting(Set_TinyBuffer, TinyBuffer ? 1 : 0);
|
||||
}
|
||||
|
||||
void CSettings::SetBufferLevel(uint32_t BufferLevel)
|
||||
void CSettings::SetFPSBuffer(bool FPSBuffer)
|
||||
{
|
||||
SetSetting(Set_BufferLevel, BufferLevel);
|
||||
}
|
||||
|
||||
void CSettings::SetSyncAudio(bool Enabled)
|
||||
{
|
||||
SetSetting(Set_SyncAudio, Enabled ? 1 : 0);
|
||||
SetSetting(Set_FPSBuffer, FPSBuffer ? 1 : 0);
|
||||
}
|
||||
|
||||
void CSettings::LogLevelChanged(void)
|
||||
|
@ -130,13 +137,18 @@ void CSettings::LogLevelChanged(void)
|
|||
|
||||
void CSettings::ReadSettings(void)
|
||||
{
|
||||
bool SyncAudio = m_Set_SyncAudio ? GetSystemSetting(m_Set_SyncAudio) != 0 : false;
|
||||
bool bLimitFPS = m_Set_LimitFPS ? GetSystemSetting(m_Set_LimitFPS) != 0 : true;
|
||||
|
||||
m_Volume = GetSetting(Set_Volume);
|
||||
m_AudioEnabled = m_Set_EnableAudio ? GetSystemSetting(m_Set_EnableAudio) != 0 : true;
|
||||
m_advanced_options = m_Set_basic_mode ? GetSystemSetting(m_Set_basic_mode) == 0 : false;
|
||||
m_debugger_enabled = m_advanced_options && m_Set_debugger ? GetSystemSetting(m_Set_debugger) == 1 : false;
|
||||
m_BufferDivider = GetSetting(Set_BufferDivider);
|
||||
m_BufferLevel = GetSetting(Set_BufferLevel);
|
||||
m_SyncAudio = GetSetting(Set_SyncAudio) != 0;
|
||||
m_TinyBuffer = GetSetting(Set_TinyBuffer) != 0;
|
||||
m_FPSBuffer = GetSetting(Set_FPSBuffer) != 0;
|
||||
m_FullSpeed = m_Set_FullSpeed ? GetSystemSetting(m_Set_FullSpeed) != 0 : false;
|
||||
|
||||
m_SyncAudio = ((!m_advanced_options || bLimitFPS) && SyncAudio && m_FullSpeed);
|
||||
|
||||
if (m_Set_log_dir != 0)
|
||||
{
|
||||
|
@ -160,4 +172,4 @@ void CleanupAudioSettings(void)
|
|||
delete g_settings;
|
||||
g_settings = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,17 +19,17 @@ public:
|
|||
inline bool AudioEnabled(void) const { return m_AudioEnabled; }
|
||||
inline bool debugger_enabled(void) const { return m_debugger_enabled; }
|
||||
inline uint32_t GetVolume(void) const { return m_Volume; }
|
||||
inline uint32_t BufferDivider(void) const { return m_BufferDivider; }
|
||||
inline uint32_t BufferLevel(void) const { return m_BufferLevel; }
|
||||
inline bool TinyBuffer(void) const { return m_TinyBuffer; }
|
||||
inline bool FPSBuffer(void) const { return m_FPSBuffer; }
|
||||
inline bool SyncAudio(void) const { return m_SyncAudio; }
|
||||
inline bool FullSpeed(void) const { return m_FullSpeed; }
|
||||
inline bool FlushLogs(void) const { return m_FlushLogs; }
|
||||
inline const char * log_dir(void) const { return m_log_dir; }
|
||||
|
||||
void SetAudioEnabled(bool Enabled);
|
||||
void SetVolume(uint32_t Volume);
|
||||
void SetBufferDivider(uint32_t BufferDivider);
|
||||
void SetBufferLevel(uint32_t BufferLevel);
|
||||
void SetSyncAudio(bool Enabled);
|
||||
void SetTinyBuffer(bool TinyBuffer);
|
||||
void SetFPSBuffer(bool FPSBuffer);
|
||||
void ReadSettings();
|
||||
|
||||
private:
|
||||
|
@ -46,6 +46,9 @@ private:
|
|||
void LogLevelChanged(void);
|
||||
|
||||
short m_Set_EnableAudio;
|
||||
short m_Set_SyncAudio;
|
||||
short m_Set_FullSpeed;
|
||||
short m_Set_LimitFPS;
|
||||
short m_Set_basic_mode;
|
||||
short m_Set_debugger;
|
||||
short m_Set_log_dir;
|
||||
|
@ -56,9 +59,10 @@ private:
|
|||
bool m_advanced_options;
|
||||
bool m_debugger_enabled;
|
||||
uint32_t m_Volume;
|
||||
uint32_t m_BufferDivider;
|
||||
uint32_t m_BufferLevel;
|
||||
bool m_TinyBuffer;
|
||||
bool m_FPSBuffer;
|
||||
bool m_SyncAudio;
|
||||
bool m_FullSpeed;
|
||||
};
|
||||
|
||||
extern CSettings * g_settings;
|
||||
|
|
|
@ -103,52 +103,37 @@ public:
|
|||
|
||||
BEGIN_MSG_MAP(CDebugSettings)
|
||||
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
|
||||
COMMAND_HANDLER(IDC_BUFFER_DIVIDER, EN_CHANGE, ItemChanged)
|
||||
COMMAND_HANDLER(IDC_BUFFER_LEVEL, EN_CHANGE, ItemChanged)
|
||||
COMMAND_ID_HANDLER_EX(IDC_TINYBUFFER, ItemChanged)
|
||||
COMMAND_ID_HANDLER_EX(IDC_FPSBUFFER, ItemChanged)
|
||||
CHAIN_MSG_MAP(CPropertyPageImpl<CGameSettings>)
|
||||
END_MSG_MAP()
|
||||
|
||||
LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
|
||||
{
|
||||
m_BufferDivider.Attach(GetDlgItem(IDC_BUFFER_DIVIDER));
|
||||
m_BufferDivider.SetWindowText(stdstr_f("%d", g_settings->BufferDivider()).c_str());
|
||||
|
||||
m_BufferLevel.Attach(GetDlgItem(IDC_BUFFER_LEVEL));
|
||||
m_BufferLevel.SetWindowText(stdstr_f("%d", g_settings->BufferLevel()).c_str());
|
||||
|
||||
m_btnSyncAudio.Attach(GetDlgItem(IDC_SYNC_AUDIO));
|
||||
m_btnSyncAudio.SetCheck(g_settings->SyncAudio() ? BST_CHECKED : BST_UNCHECKED);
|
||||
m_btnTinyBuffer.Attach(GetDlgItem(IDC_TINYBUFFER));
|
||||
m_btnTinyBuffer.SetCheck(g_settings->TinyBuffer() ? BST_CHECKED : BST_UNCHECKED);
|
||||
m_btnFPSBuffer.Attach(GetDlgItem(IDC_FPSBUFFER));
|
||||
m_btnFPSBuffer.SetCheck(g_settings->FPSBuffer() ? BST_CHECKED : BST_UNCHECKED);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool OnApply()
|
||||
{
|
||||
char buffer[100];
|
||||
m_BufferDivider.GetWindowText(buffer, sizeof(buffer));
|
||||
g_settings->SetBufferDivider(atoi(buffer));
|
||||
m_BufferLevel.GetWindowText(buffer, sizeof(buffer));
|
||||
g_settings->SetBufferLevel(atoi(buffer));
|
||||
g_settings->SetSyncAudio(m_btnSyncAudio.GetCheck() == BST_CHECKED);
|
||||
|
||||
g_settings->SetTinyBuffer(m_btnTinyBuffer.GetCheck() == BST_CHECKED);
|
||||
g_settings->SetFPSBuffer(m_btnFPSBuffer.GetCheck() == BST_CHECKED);
|
||||
FlushSettings();
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
CEdit m_BufferDivider;
|
||||
CEdit m_BufferLevel;
|
||||
CButton m_btnSyncAudio;
|
||||
CButton m_btnTinyBuffer;
|
||||
CButton m_btnFPSBuffer;
|
||||
|
||||
LRESULT ItemChangedNotify(NMHDR* /*pNMHDR*/)
|
||||
void ItemChanged(UINT /*Code*/, int /*id*/, HWND /*ctl*/)
|
||||
{
|
||||
SendMessage(GetParent(), PSM_CHANGED, (WPARAM)m_hWnd, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT ItemChanged(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
|
||||
{
|
||||
SendMessage(GetParent(), PSM_CHANGED, (WPARAM)m_hWnd, 0);
|
||||
return 0;
|
||||
g_settings->SetTinyBuffer(m_btnTinyBuffer.GetCheck() == BST_CHECKED);
|
||||
g_settings->SetFPSBuffer(m_btnFPSBuffer.GetCheck() == BST_CHECKED);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -276,4 +261,4 @@ CAudioUI::~CAudioUI()
|
|||
void ConfigAudio(void * hParent)
|
||||
{
|
||||
CAudioUI().DoModal((HWND)hParent);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ bool DirectSoundDriver::Initialize()
|
|||
WAVEFORMATEX wfm = { 0 };
|
||||
wfm.wFormatTag = WAVE_FORMAT_PCM;
|
||||
wfm.nChannels = 2;
|
||||
wfm.nSamplesPerSec = 44100;
|
||||
wfm.nSamplesPerSec = 48000;
|
||||
wfm.wBitsPerSample = 16;
|
||||
wfm.nBlockAlign = wfm.wBitsPerSample / 8 * wfm.nChannels;
|
||||
wfm.nAvgBytesPerSec = wfm.nSamplesPerSec * wfm.nBlockAlign;
|
||||
|
@ -119,11 +119,11 @@ void DirectSoundDriver::StartAudio()
|
|||
WriteTrace(TraceAudioDriver, TraceDebug, "Done");
|
||||
}
|
||||
|
||||
void DirectSoundDriver::SetFrequency(uint32_t Frequency)
|
||||
void DirectSoundDriver::SetFrequency(uint32_t Frequency, uint32_t BufferSize)
|
||||
{
|
||||
WriteTrace(TraceAudioDriver, TraceDebug, "Start (Frequency: 0x%08X)", Frequency);
|
||||
StopAudio();
|
||||
m_LOCK_SIZE = (uint32_t)((Frequency / g_settings->BufferDivider())) * 4;
|
||||
m_LOCK_SIZE = (BufferSize * 2);
|
||||
SetSegmentSize(m_LOCK_SIZE, Frequency);
|
||||
|
||||
StartAudio();
|
||||
|
@ -133,7 +133,7 @@ void DirectSoundDriver::SetFrequency(uint32_t Frequency)
|
|||
void DirectSoundDriver::SetVolume(uint32_t Volume)
|
||||
{
|
||||
LPDIRECTSOUNDBUFFER & lpdsb = (LPDIRECTSOUNDBUFFER &)m_lpdsb;
|
||||
int32_t dsVolume = - 10 ^ ((100 - Volume) * 33);
|
||||
int32_t dsVolume = -((100 - (int32_t)Volume) * 25);
|
||||
if (Volume == 0)
|
||||
{
|
||||
dsVolume = DSBVOLUME_MIN;
|
||||
|
@ -211,12 +211,6 @@ void DirectSoundDriver::AudioThreadProc()
|
|||
{
|
||||
break;
|
||||
}
|
||||
// Check to see if the audio pointer moved on to the next segment
|
||||
if (write_pos == last_pos)
|
||||
{
|
||||
WriteTrace(TraceAudioDriver, TraceVerbose, "Sleep");
|
||||
Sleep(1);
|
||||
}
|
||||
uint32_t play_pos = 0;
|
||||
if (lpdsbuff == NULL || FAILED(lpdsbuff->GetCurrentPosition((unsigned long*)&play_pos, NULL)))
|
||||
{
|
||||
|
@ -226,6 +220,11 @@ void DirectSoundDriver::AudioThreadProc()
|
|||
}
|
||||
write_pos = play_pos < m_LOCK_SIZE ? (m_LOCK_SIZE * DS_SEGMENTS) - m_LOCK_SIZE : ((play_pos / m_LOCK_SIZE) * m_LOCK_SIZE) - m_LOCK_SIZE;
|
||||
WriteTrace(TraceAudioDriver, TraceVerbose, "play_pos: 0x%08X m_write_pos: 0x%08X next_pos: 0x%08X m_LOCK_SIZE: 0x%08X", play_pos, write_pos, next_pos, m_LOCK_SIZE);
|
||||
if (last_pos == write_pos)
|
||||
{
|
||||
WriteTrace(TraceAudioDriver, TraceVerbose, "Sleep");
|
||||
Sleep(1);
|
||||
}
|
||||
}
|
||||
// This means we had a buffer segment skipped
|
||||
if (next_pos != write_pos)
|
||||
|
|
|
@ -21,7 +21,7 @@ public:
|
|||
bool Initialize();
|
||||
void StopAudio(); // Stops the Audio PlayBack (as if paused)
|
||||
void StartAudio(); // Starts the Audio PlayBack (as if unpaused)
|
||||
void SetFrequency(uint32_t Frequency);
|
||||
void SetFrequency(uint32_t Frequency, uint32_t BufferSize);
|
||||
void SetVolume(uint32_t Volume);
|
||||
|
||||
private:
|
||||
|
@ -37,4 +37,4 @@ private:
|
|||
void * m_lpdsbuf;
|
||||
void * m_handleAudioThread;
|
||||
uint32_t m_dwAudioThreadId;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -34,10 +34,14 @@ bool SoundDriverBase::Initialize()
|
|||
return true;
|
||||
}
|
||||
|
||||
void SoundDriverBase::AI_SetFrequency(uint32_t Frequency)
|
||||
void SoundDriverBase::AI_SetFrequency(uint32_t Frequency, uint32_t BufferSize)
|
||||
{
|
||||
SetFrequency(Frequency);
|
||||
m_MaxBufferSize = (uint32_t)((Frequency / g_settings->BufferDivider())) * 4 * g_settings->BufferLevel();
|
||||
SetFrequency(Frequency, BufferSize);
|
||||
m_MaxBufferSize = (BufferSize * 4);
|
||||
if (g_settings->TinyBuffer() == true)
|
||||
{
|
||||
m_MaxBufferSize = m_MaxBufferSize * 2;
|
||||
}
|
||||
m_BufferRemaining = 0;
|
||||
m_CurrentReadLoc = m_CurrentWriteLoc = m_BufferRemaining = 0;
|
||||
}
|
||||
|
@ -108,7 +112,7 @@ void SoundDriverBase::AI_Update(bool Wait)
|
|||
uint32_t SoundDriverBase::AI_ReadLength()
|
||||
{
|
||||
CGuard guard(m_CS);
|
||||
return m_AI_DMAPrimaryBytes & ~0x3;
|
||||
return m_AI_DMAPrimaryBytes & ~0x7;
|
||||
}
|
||||
|
||||
void SoundDriverBase::LoadAiBuffer(uint8_t *start, uint32_t length)
|
||||
|
@ -187,7 +191,7 @@ void SoundDriverBase::BufferAudio()
|
|||
WriteTrace(TraceAudioDriver, TraceVerbose, "Done (m_BufferRemaining: 0x%08X)", m_BufferRemaining);
|
||||
}
|
||||
|
||||
void SoundDriverBase::SetFrequency(uint32_t /*Frequency*/)
|
||||
void SoundDriverBase::SetFrequency(uint32_t /*Frequency*/, uint32_t /*Divider*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -197,4 +201,4 @@ void SoundDriverBase::StartAudio()
|
|||
|
||||
void SoundDriverBase::StopAudio()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,19 +18,19 @@ class SoundDriverBase
|
|||
public:
|
||||
SoundDriverBase();
|
||||
|
||||
void AI_SetFrequency(uint32_t Frequency);
|
||||
void AI_SetFrequency(uint32_t Frequency, uint32_t BufferSize);
|
||||
void AI_LenChanged(uint8_t *start, uint32_t length);
|
||||
void AI_Startup();
|
||||
void AI_Shutdown();
|
||||
void AI_Update(bool Wait);
|
||||
uint32_t AI_ReadLength();
|
||||
|
||||
virtual void SetFrequency(uint32_t Frequency);
|
||||
virtual void SetFrequency(uint32_t Frequency, uint32_t BufferSize);
|
||||
virtual void StartAudio();
|
||||
virtual void StopAudio();
|
||||
|
||||
protected:
|
||||
enum { MAX_SIZE = 44100 * 2 * 2 }; // Max Buffer Size (44100Hz * 16bit * Stereo)
|
||||
enum { MAX_SIZE = 48000 * 2 * 2 }; // Max Buffer Size (44100Hz * 16bit * Stereo)
|
||||
|
||||
virtual bool Initialize();
|
||||
void LoadAiBuffer(uint8_t *start, uint32_t length); // Reads in length amount of audio bytes
|
||||
|
|
Binary file not shown.
|
@ -20,7 +20,6 @@ enum
|
|||
Set_Logging_InitShutdown,
|
||||
Set_Logging_Interface,
|
||||
Set_Logging_Driver,
|
||||
Set_BufferDivider,
|
||||
Set_BufferLevel,
|
||||
Set_SyncAudio,
|
||||
};
|
||||
Set_TinyBuffer,
|
||||
Set_FPSBuffer,
|
||||
};
|
||||
|
|
Binary file not shown.
|
@ -116,10 +116,6 @@ void CAudio::InterruptTimerDone()
|
|||
{
|
||||
m_Status &= ~ai_busy;
|
||||
}
|
||||
if (g_Reg->m_AudioIntrReg == 0)
|
||||
{
|
||||
g_System->SyncToAudio();
|
||||
}
|
||||
WriteTrace(TraceAudio, TraceDebug, "Done");
|
||||
}
|
||||
|
||||
|
@ -157,4 +153,4 @@ void CAudio::SetFrequency(uint32_t Dacrate, uint32_t System)
|
|||
//m_BytesPerSecond = 128024;
|
||||
|
||||
m_FramesPerSecond = System == SYSTEM_PAL ? 50 : 60;
|
||||
}
|
||||
}
|
|
@ -476,6 +476,7 @@ bool CN64System::RunDiskImage(const char * FileLoc)
|
|||
void CN64System::CloseSystem()
|
||||
{
|
||||
WriteTrace(TraceN64System, TraceDebug, "Start");
|
||||
g_Settings->SaveBool(Game_FullSpeed, true);
|
||||
if (g_BaseSystem)
|
||||
{
|
||||
g_BaseSystem->CloseCpu();
|
||||
|
@ -2073,33 +2074,6 @@ void CN64System::RunRSP()
|
|||
WriteTrace(TraceRSP, TraceDebug, "Done (SP Status %X)", m_Reg.SP_STATUS_REG);
|
||||
}
|
||||
|
||||
void CN64System::SyncToAudio()
|
||||
{
|
||||
if (!bSyncToAudio() || !bLimitFPS())
|
||||
{
|
||||
return;
|
||||
}
|
||||
PROFILE_TIMERS PreviousTimer = Timer_None;
|
||||
if (bShowCPUPer())
|
||||
{
|
||||
PreviousTimer = m_CPU_Usage.StartTimer(Timer_Idel);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 50; i++)
|
||||
{
|
||||
if (g_Reg->m_AudioIntrReg != 0)
|
||||
{
|
||||
WriteTrace(TraceAudio, TraceDebug, "Audio Interrupt done (%d)", i);
|
||||
break;
|
||||
}
|
||||
pjutil::Sleep(1);
|
||||
}
|
||||
if (bShowCPUPer())
|
||||
{
|
||||
m_CPU_Usage.StartTimer(PreviousTimer);
|
||||
}
|
||||
}
|
||||
|
||||
void CN64System::RefreshScreen()
|
||||
{
|
||||
PROFILE_TIMERS CPU_UsageAddr = Timer_None/*, ProfilingAddr = Timer_None*/;
|
||||
|
@ -2152,7 +2126,7 @@ void CN64System::RefreshScreen()
|
|||
}
|
||||
g_MMU->UpdateFieldSerration((m_Reg.VI_STATUS_REG & 0x40) != 0);
|
||||
|
||||
if ((bBasicMode() || bLimitFPS()) && !bSyncToAudio())
|
||||
if ((bBasicMode() || bLimitFPS()) && (!bSyncToAudio() || !FullSpeed()))
|
||||
{
|
||||
if (bShowCPUPer()) { m_CPU_Usage.StartTimer(Timer_Idel); }
|
||||
uint32_t FrameRate;
|
||||
|
|
|
@ -68,9 +68,8 @@ public:
|
|||
void ExternalEvent(SystemEvent action); //covers gui interacting and timers etc..
|
||||
void StartEmulation(bool NewThread);
|
||||
void EndEmulation();
|
||||
void SyncToAudio();
|
||||
void AlterSpeed(const CSpeedLimiter::ESpeedChange SpeedChange) { m_Limiter.AlterSpeed(SpeedChange); }
|
||||
void SetSpeed(int Speed) { m_Limiter.SetSpeed(Speed); }
|
||||
void SetSpeed(int Speed) { m_Limiter.SetSpeed(Speed); }
|
||||
int GetSpeed(void) const { return m_Limiter.GetSpeed(); }
|
||||
int GetBaseSpeed(void) const { return m_Limiter.GetBaseSpeed(); }
|
||||
void Reset(bool bInitReg, bool ClearMenory);
|
||||
|
|
|
@ -27,8 +27,8 @@ bool CGameSettings::m_DelayDP = false;
|
|||
bool CGameSettings::m_DelaySI = false;
|
||||
uint32_t CGameSettings::m_RdramSize = 0;
|
||||
bool CGameSettings::m_bFixedAudio = true;
|
||||
bool CGameSettings::m_bSyncingToAudio = true;
|
||||
bool CGameSettings::m_bSyncToAudio = true;
|
||||
bool CGameSettings::m_FullSpeed = true;
|
||||
bool CGameSettings::m_bFastSP = true;
|
||||
bool CGameSettings::m_b32Bit = true;
|
||||
bool CGameSettings::m_RspAudioSignal;
|
||||
|
@ -57,7 +57,8 @@ void CGameSettings::RefreshGameSettings()
|
|||
m_DelaySI = g_Settings->LoadBool(Game_DelaySI);
|
||||
m_DelayDP = g_Settings->LoadBool(Game_DelayDP);
|
||||
m_bFixedAudio = g_Settings->LoadBool(Game_FixedAudio);
|
||||
m_bSyncToAudio = m_bFixedAudio ? g_Settings->LoadBool(Game_SyncViaAudio) : false;
|
||||
m_bSyncToAudio = g_Settings->LoadBool(Game_SyncViaAudio);
|
||||
m_FullSpeed = g_Settings->LoadBool(Game_FullSpeed);
|
||||
m_b32Bit = g_Settings->LoadBool(Game_32Bit);
|
||||
#ifdef ANDROID
|
||||
m_bFastSP = false;
|
||||
|
@ -72,7 +73,6 @@ void CGameSettings::RefreshGameSettings()
|
|||
m_SystemType = (SYSTEM_TYPE)g_Settings->LoadDword(Game_SystemType);
|
||||
m_CpuType = (CPU_TYPE)g_Settings->LoadDword(Game_CpuType);
|
||||
m_OverClockModifier = g_Settings->LoadDword(Game_OverClockModifier);
|
||||
m_bSyncingToAudio = m_bSyncToAudio;
|
||||
if (m_CountPerOp == 0)
|
||||
{
|
||||
m_CountPerOp = 2;
|
||||
|
@ -84,6 +84,6 @@ void CGameSettings::RefreshGameSettings()
|
|||
|
||||
void CGameSettings::SpeedChanged(int SpeedLimit)
|
||||
{
|
||||
int FullSpeed = g_System->m_SystemType == SYSTEM_PAL ? 50 : 60;
|
||||
m_bSyncingToAudio = SpeedLimit == FullSpeed ? m_bSyncToAudio : false;
|
||||
m_FullSpeed = (g_System->m_SystemType == SYSTEM_PAL ? 50 : 60) == SpeedLimit;
|
||||
g_Settings->SaveBool(Game_FullSpeed, m_FullSpeed);
|
||||
}
|
|
@ -30,7 +30,8 @@ public:
|
|||
inline static bool bDelaySI(void) { return m_DelaySI; }
|
||||
inline static uint32_t RdramSize(void) { return m_RdramSize; }
|
||||
inline static bool bFixedAudio(void) { return m_bFixedAudio; }
|
||||
inline static bool bSyncToAudio(void) { return m_bSyncingToAudio; }
|
||||
inline static bool bSyncToAudio(void) { return m_bSyncToAudio; }
|
||||
inline static bool FullSpeed(void) { return m_FullSpeed; }
|
||||
inline static bool bFastSP(void) { return m_bFastSP; }
|
||||
inline static bool b32BitCore(void) { return m_b32Bit; }
|
||||
inline static bool RspAudioSignal(void) { return m_RspAudioSignal; }
|
||||
|
@ -61,8 +62,8 @@ private:
|
|||
static bool m_DelaySI;
|
||||
static uint32_t m_RdramSize;
|
||||
static bool m_bFixedAudio;
|
||||
static bool m_bSyncingToAudio;
|
||||
static bool m_bSyncToAudio;
|
||||
static bool m_FullSpeed;
|
||||
static bool m_bFastSP;
|
||||
static bool m_b32Bit;
|
||||
static bool m_RspAudioSignal;
|
||||
|
|
|
@ -11,70 +11,71 @@
|
|||
#include "stdafx.h"
|
||||
#include "SettingsType-TempBool.h"
|
||||
|
||||
CSettingTypeTempBool::CSettingTypeTempBool(bool initialValue) :
|
||||
m_value(initialValue)
|
||||
CSettingTypeTempBool::CSettingTypeTempBool(bool initialValue, const char * Name) :
|
||||
m_value(initialValue),
|
||||
m_Name(Name ? Name : "")
|
||||
{
|
||||
}
|
||||
|
||||
CSettingTypeTempBool::~CSettingTypeTempBool ( void )
|
||||
CSettingTypeTempBool::~CSettingTypeTempBool(void)
|
||||
{
|
||||
}
|
||||
|
||||
bool CSettingTypeTempBool::Load ( int /*Index*/, bool & Value ) const
|
||||
bool CSettingTypeTempBool::Load(int /*Index*/, bool & Value) const
|
||||
{
|
||||
Value = m_value;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CSettingTypeTempBool::Load ( int /*Index*/, uint32_t & /*Value*/ ) const
|
||||
bool CSettingTypeTempBool::Load(int /*Index*/, uint32_t & Value) const
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
return false;
|
||||
Value = m_value ? 1 : 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CSettingTypeTempBool::Load ( int /*Index*/, stdstr & /*Value*/ ) const
|
||||
bool CSettingTypeTempBool::Load(int /*Index*/, stdstr & /*Value*/) const
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
return false;
|
||||
}
|
||||
|
||||
//return the default values
|
||||
void CSettingTypeTempBool::LoadDefault ( int /*Index*/, bool & /*Value*/ ) const
|
||||
void CSettingTypeTempBool::LoadDefault(int /*Index*/, bool & /*Value*/) const
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CSettingTypeTempBool::LoadDefault ( int /*Index*/, uint32_t & /*Value*/ ) const
|
||||
void CSettingTypeTempBool::LoadDefault(int /*Index*/, uint32_t & /*Value*/) const
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CSettingTypeTempBool::LoadDefault ( int /*Index*/, stdstr & /*Value*/ ) const
|
||||
void CSettingTypeTempBool::LoadDefault(int /*Index*/, stdstr & /*Value*/) const
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CSettingTypeTempBool::Save ( int /*Index*/, bool Value )
|
||||
void CSettingTypeTempBool::Save(int /*Index*/, bool Value)
|
||||
{
|
||||
m_value = Value;
|
||||
}
|
||||
|
||||
void CSettingTypeTempBool::Save ( int /*Index*/, uint32_t /*Value*/ )
|
||||
void CSettingTypeTempBool::Save(int /*Index*/, uint32_t /*Value*/)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CSettingTypeTempBool::Save ( int /*Index*/, const stdstr & /*Value*/ )
|
||||
void CSettingTypeTempBool::Save(int /*Index*/, const stdstr & /*Value*/)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CSettingTypeTempBool::Save ( int /*Index*/, const char * /*Value*/ )
|
||||
void CSettingTypeTempBool::Save(int /*Index*/, const char * /*Value*/)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void CSettingTypeTempBool::Delete( int /*Index*/ )
|
||||
void CSettingTypeTempBool::Delete(int /*Index*/)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||
}
|
||||
}
|
|
@ -16,31 +16,33 @@ class CSettingTypeTempBool :
|
|||
public CSettingType
|
||||
{
|
||||
public:
|
||||
CSettingTypeTempBool(bool initialValue );
|
||||
CSettingTypeTempBool(bool initialValue, const char * name = NULL);
|
||||
~CSettingTypeTempBool();
|
||||
|
||||
bool IndexBasedSetting ( void ) const { return false; }
|
||||
SettingType GetSettingType ( void ) const { return SettingType_BoolVariable; }
|
||||
bool IndexBasedSetting(void) const { return false; }
|
||||
SettingType GetSettingType(void) const { return SettingType_BoolVariable; }
|
||||
bool IsSettingSet(void) const { return false; }
|
||||
|
||||
const char * GetName(void) const { return m_Name.c_str(); }
|
||||
|
||||
//return the values
|
||||
bool Load ( int32_t Index, bool & Value ) const;
|
||||
bool Load ( int32_t Index, uint32_t & Value ) const;
|
||||
bool Load ( int32_t Index, stdstr & Value ) const;
|
||||
bool Load(int32_t Index, bool & Value) const;
|
||||
bool Load(int32_t Index, uint32_t & Value) const;
|
||||
bool Load(int32_t Index, stdstr & Value) const;
|
||||
|
||||
//return the default values
|
||||
void LoadDefault ( int32_t Index, bool & Value ) const;
|
||||
void LoadDefault ( int32_t Index, uint32_t & Value ) const;
|
||||
void LoadDefault ( int32_t Index, stdstr & Value ) const;
|
||||
void LoadDefault(int32_t Index, bool & Value) const;
|
||||
void LoadDefault(int32_t Index, uint32_t & Value) const;
|
||||
void LoadDefault(int32_t Index, stdstr & Value) const;
|
||||
|
||||
//Update the settings
|
||||
void Save ( int32_t Index, bool Value );
|
||||
void Save ( int32_t Index, uint32_t Value );
|
||||
void Save ( int32_t Index, const stdstr & Value );
|
||||
void Save ( int32_t Index, const char * Value );
|
||||
void Save(int32_t Index, bool Value);
|
||||
void Save(int32_t Index, uint32_t Value);
|
||||
void Save(int32_t Index, const stdstr & Value);
|
||||
void Save(int32_t Index, const char * Value);
|
||||
|
||||
// Delete the setting
|
||||
void Delete ( int32_t Index );
|
||||
void Delete(int32_t Index);
|
||||
|
||||
private:
|
||||
CSettingTypeTempBool(void); // Disable default constructor
|
||||
|
@ -48,4 +50,5 @@ private:
|
|||
CSettingTypeTempBool& operator=(const CSettingTypeTempBool&); // Disable assignment
|
||||
|
||||
bool m_value;
|
||||
std::string m_Name;
|
||||
};
|
||||
|
|
|
@ -153,6 +153,7 @@ enum SettingID
|
|||
Game_Transferpak_Sav,
|
||||
Game_LoadSaveAtStart,
|
||||
Game_OverClockModifier,
|
||||
Game_FullSpeed,
|
||||
|
||||
// General Game running info
|
||||
GameRunning_LoadingInProgress,
|
||||
|
|
|
@ -143,7 +143,7 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory)
|
|||
AddHandler(Rdb_32Bit, new CSettingTypeRDBYesNo("32bit", true));
|
||||
AddHandler(Rdb_FastSP, new CSettingTypeRDBYesNo("Fast SP", true));
|
||||
AddHandler(Rdb_FixedAudio, new CSettingTypeRomDatabase("Fixed Audio", true));
|
||||
AddHandler(Rdb_SyncViaAudio, new CSettingTypeRomDatabase("Sync Audio", false));
|
||||
AddHandler(Rdb_SyncViaAudio, new CSettingTypeRomDatabase("Audio-Sync Audio", true));
|
||||
AddHandler(Rdb_RspAudioSignal, new CSettingTypeRDBYesNo("Audio Signal", false));
|
||||
AddHandler(Rdb_TLB_VAddrStart, new CSettingTypeRomDatabase("TLB: Vaddr Start", 0));
|
||||
AddHandler(Rdb_TLB_VAddrLen, new CSettingTypeRomDatabase("TLB: Vaddr Len", 0));
|
||||
|
@ -226,6 +226,7 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory)
|
|||
AddHandler(Game_Transferpak_Sav, new CSettingTypeGame("Tpak-Sav-dir", Default_None));
|
||||
AddHandler(Game_LoadSaveAtStart, new CSettingTypeTempBool(false));
|
||||
AddHandler(Game_OverClockModifier, new CSettingTypeGame("OverClockModifier", Rdb_OverClockModifier));
|
||||
AddHandler(Game_FullSpeed, new CSettingTypeTempBool(true, "Full Speed"));
|
||||
|
||||
//User Interface
|
||||
AddHandler(UserInterface_ShowCPUPer, new CSettingTypeApplication("", "Display CPU Usage", (uint32_t)false));
|
||||
|
@ -298,7 +299,7 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory)
|
|||
AddHandler(GameRunning_CPU_Paused, new CSettingTypeTempBool(false));
|
||||
AddHandler(GameRunning_CPU_PausedType, new CSettingTypeTempNumber(Default_None));
|
||||
AddHandler(GameRunning_InstantSaveFile, new CSettingTypeTempString(""));
|
||||
AddHandler(GameRunning_LimitFPS, new CSettingTypeTempBool(true));
|
||||
AddHandler(GameRunning_LimitFPS, new CSettingTypeTempBool(true, "Limit FPS"));
|
||||
AddHandler(GameRunning_ScreenHertz, new CSettingTypeTempNumber(60));
|
||||
AddHandler(GameRunning_InReset, new CSettingTypeTempBool(false));
|
||||
|
||||
|
@ -346,7 +347,11 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory)
|
|||
#ifdef _WIN32
|
||||
AddHandler(Plugin_RSP_Current, new CSettingTypeApplication("Plugin", "RSP Dll", "RSP\\RSP 1.7.dll"));
|
||||
AddHandler(Plugin_GFX_Current, new CSettingTypeApplication("Plugin", "Graphics Dll", "GFX\\Jabo_Direct3D8.dll"));
|
||||
AddHandler(Plugin_AUDIO_Current, new CSettingTypeApplication("Plugin", "Audio Dll", "Audio\\Jabo_Dsound.dll"));
|
||||
#ifdef _DEBUG
|
||||
AddHandler(Plugin_AUDIO_Current, new CSettingTypeApplication("Plugin", "Audio Dll", "Audio\\Project64-Audio_d.dll"));
|
||||
#else
|
||||
AddHandler(Plugin_AUDIO_Current, new CSettingTypeApplication("Plugin", "Audio Dll", "Audio\\Project64-Audio.dll"));
|
||||
#endif
|
||||
AddHandler(Plugin_CONT_Current, new CSettingTypeApplication("Plugin", "Controller Dll", "Input\\PJ64_NRage.dll"));
|
||||
#else
|
||||
AddHandler(Plugin_RSP_Current, new CSettingTypeApplication("Plugin", "RSP Dll", "libProject64-rsp-hle.so"));
|
||||
|
@ -416,7 +421,7 @@ uint32_t CSettings::FindSetting(CSettings * _this, const char * Name)
|
|||
}
|
||||
return iter->first;
|
||||
}
|
||||
if (Setting->GetSettingType() == SettingType_CfgFile)
|
||||
else if (Setting->GetSettingType() == SettingType_CfgFile)
|
||||
{
|
||||
CSettingTypeApplication * CfgSetting = (CSettingTypeApplication *)Setting;
|
||||
if (_stricmp(CfgSetting->GetKeyName(), Name) != 0)
|
||||
|
@ -425,7 +430,7 @@ uint32_t CSettings::FindSetting(CSettings * _this, const char * Name)
|
|||
}
|
||||
return iter->first;
|
||||
}
|
||||
if (Setting->GetSettingType() == SettingType_SelectedDirectory)
|
||||
else if (Setting->GetSettingType() == SettingType_SelectedDirectory)
|
||||
{
|
||||
CSettingTypeSelectedDirectory * SelectedDirectory = (CSettingTypeSelectedDirectory *)Setting;
|
||||
if (_stricmp(SelectedDirectory->GetName(), Name) != 0)
|
||||
|
@ -434,6 +439,15 @@ uint32_t CSettings::FindSetting(CSettings * _this, const char * Name)
|
|||
}
|
||||
return iter->first;
|
||||
}
|
||||
else if (Setting->GetSettingType() == SettingType_BoolVariable)
|
||||
{
|
||||
CSettingTypeTempBool * BoolSetting = (CSettingTypeTempBool *)Setting;
|
||||
if (_stricmp(BoolSetting->GetName(), Name) != 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
return iter->first;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue