Moved the async mixing toggle into the ini.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2836 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
ramapcsx2 2010-04-12 01:44:59 +00:00
parent ab2897a417
commit a45c013ff3
5 changed files with 15 additions and 9 deletions

View File

@ -68,6 +68,7 @@ extern bool EffectsDisabled;
extern u32 OutputModule;
extern int SndOutLatencyMS;
extern bool timeStretchDisabled;
extern bool asyncMixingEnabled;
#ifndef __LINUX__
extern wchar_t dspPlugin[];

View File

@ -48,6 +48,7 @@ int ReverbBoost = 0;
u32 OutputModule = FindOutputModuleById( PortaudioOut->GetIdent() );
int SndOutLatencyMS = 160;
bool timeStretchDisabled = false;
bool asyncMixingEnabled = false;
/*****************************************************************************/
@ -63,6 +64,7 @@ void ReadSettings()
SndOutLatencyMS = CfgReadInt(L"OUTPUT",L"Latency", 150);
timeStretchDisabled = CfgReadBool( L"OUTPUT", L"Disable_Timestretch", false );
asyncMixingEnabled = CfgReadBool( L"OUTPUT", L"Enable_AsyncMixing", false );
PortaudioOut->ReadSettings();
SoundtouchCfg::ReadSettings();
@ -87,6 +89,7 @@ void WriteSettings()
CfgWriteStr(L"OUTPUT",L"Output_Module", mods[OutputModule]->GetIdent() );
CfgWriteInt(L"OUTPUT",L"Latency", SndOutLatencyMS);
CfgWriteBool(L"OUTPUT",L"Disable_Timestretch", timeStretchDisabled);
CfgWriteBool(L"OUTPUT",L"Enable_AsyncMixing", asyncMixingEnabled);
PortaudioOut->WriteSettings();
SoundtouchCfg::WriteSettings();

View File

@ -79,6 +79,7 @@ extern int dspPluginModule;
extern bool dspPluginEnabled;
extern bool timeStretchDisabled;
extern bool asyncMixingEnabled;
extern bool StereoExpansionEnabled;
namespace SoundtouchCfg

View File

@ -41,6 +41,7 @@ bool EffectsDisabled = false;
// OUTPUT
int SndOutLatencyMS = 150;
bool timeStretchDisabled = false;
bool asyncMixingEnabled = false;
u32 OutputModule = 0;
@ -62,6 +63,7 @@ void ReadSettings()
ReverbBoost = CfgReadInt( L"MIXING",L"Reverb_Boost", 0 );
timeStretchDisabled = CfgReadBool( L"OUTPUT", L"Disable_Timestretch", false );
asyncMixingEnabled = CfgReadBool( L"OUTPUT", L"Enable_AsyncMixing", false );
EffectsDisabled = CfgReadBool( L"MIXING", L"Disable_Effects", false );
StereoExpansionEnabled = CfgReadBool( L"OUTPUT", L"Enable_StereoExpansion", false );
@ -112,6 +114,7 @@ void WriteSettings()
CfgWriteStr(L"OUTPUT",L"Output_Module", mods[OutputModule]->GetIdent() );
CfgWriteInt(L"OUTPUT",L"Latency", SndOutLatencyMS);
CfgWriteBool(L"OUTPUT",L"Disable_Timestretch", timeStretchDisabled);
CfgWriteBool(L"OUTPUT",L"Enable_AsyncMixing", asyncMixingEnabled);
CfgWriteBool(L"OUTPUT",L"Enable_StereoExpansion", StereoExpansionEnabled);
if( Config_WaveOut.Device.empty() ) Config_WaveOut.Device = L"default";

View File

@ -296,9 +296,9 @@ __forceinline void TimeUpdate(u32 cClocks)
}
//UpdateDebugDialog();
#ifdef USE_ASYNC_MIXING
SndBuffer::UpdateTempoChangeAsyncMixing();
#endif
if(asyncMixingEnabled)
SndBuffer::UpdateTempoChangeAsyncMixing();
//Update Mixing Progress
while(dClocks>=TickInterval)
{
@ -855,8 +855,10 @@ static void __fastcall RegWrite_Core( u16 value )
// When we have exact cycle update info from the Pcsx2 IOP unit, then use
// the more accurate delayed initialization system.
ConLog( " * SPU2: Runtime core%d reset\n", core );
#ifndef USE_ASYNC_MIXING
if(cyclePtr != NULL)
// Async mixing can cause a scheduled reset to happen untimely, ff12 hates it and dies.
// So do the next best thing and reset the core directly.
if(cyclePtr != NULL && !asyncMixingEnabled)
{
thiscore.InitDelay = 1;
thiscore.Regs.STATX = 0;
@ -866,10 +868,6 @@ static void __fastcall RegWrite_Core( u16 value )
thiscore.Reset(thiscore.Index);
}
}
#else
thiscore.Reset(thiscore.Index);
}
#endif
thiscore.AttrBit0 =(value>> 0) & 0x01; //1 bit
thiscore.DMABits =(value>> 1) & 0x07; //3 bits