Beispiel #1
0
	void ReadSettings()
	{
		CfgReadStr( L"DSOUNDOUT", L"Device", m_Device, L"default" );
		m_NumBuffers = CfgReadInt( L"DSOUNDOUT", L"Buffer_Count", 5 );
		m_DisableGlobalFocus = CfgReadBool( L"DSOUNDOUT", L"Disable_Global_Focus", false );
		m_UseHardware = CfgReadBool( L"DSOUNDOUT", L"Use_Hardware", false );

		Clampify( m_NumBuffers, (u8)3, (u8)8 );
	}
Beispiel #2
0
void ReadSettings()
{
	Interpolation = CfgReadInt( L"MIXING",L"Interpolation", 1 );
	ReverbBoost = CfgReadInt( L"MIXING",L"Reverb_Boost", 0 );

	SynchMode = CfgReadInt( L"OUTPUT", L"Synch_Mode", 0);
	EffectsDisabled = CfgReadBool( L"MIXING", L"Disable_Effects", false );

	numSpeakers = CfgReadInt( L"OUTPUT", L"XAudio2_SpeakerConfiguration", 0);
	SndOutLatencyMS = CfgReadInt(L"OUTPUT",L"Latency", 150);

	wchar_t omodid[128];
	CfgReadStr( L"OUTPUT", L"Output_Module", omodid, 127, XAudio2Out->GetIdent() );

	// find the driver index of this module:
	OutputModule = FindOutputModuleById( omodid );

	CfgReadStr( L"DSP PLUGIN",L"Filename",dspPlugin,255,L"");
	dspPluginModule = CfgReadInt(L"DSP PLUGIN",L"ModuleNum",0);
	dspPluginEnabled= CfgReadBool(L"DSP PLUGIN",L"Enabled",false);

	// Read DSOUNDOUT and WAVEOUT configs:
	CfgReadStr( L"WAVEOUT", L"Device", Config_WaveOut.Device, L"default" );
	Config_WaveOut.NumBuffers = CfgReadInt( L"WAVEOUT", L"Buffer_Count", 4 );

	DSoundOut->ReadSettings();

	SoundtouchCfg::ReadSettings();
	DebugConfig::ReadSettings();

	// Sanity Checks
	// -------------

	Clampify( SndOutLatencyMS, LATENCY_MIN, LATENCY_MAX );

	if( mods[OutputModule] == NULL )
	{
		// Unsupported or legacy module.
		fprintf( stderr, "* SPU2-X: Unknown output module '%s' specified in configuration file.\n", omodid );
		fprintf( stderr, "* SPU2-X: Defaulting to DirectSound (%S).\n", DSoundOut->GetIdent() );
		OutputModule = FindOutputModuleById( DSoundOut->GetIdent() );
	}
}
Beispiel #3
0
	void ReadSettings()
	{
		wxString api( L"EMPTYEMPTYEMPTY" );
		m_Device = L"EMPTYEMPTYEMPTY";
#ifdef __LINUX__
		// By default on linux use the ALSA API (+99% users) -- Gregory
		CfgReadStr( L"PORTAUDIO", L"HostApi", api, L"ALSA" );
#else
		CfgReadStr( L"PORTAUDIO", L"HostApi", api, L"Unknown" );
#endif
		CfgReadStr( L"PORTAUDIO", L"Device", m_Device, L"default" );

		SetApiSettings(api);

		m_WasapiExclusiveMode = CfgReadBool( L"PORTAUDIO", L"Wasapi_Exclusive_Mode", false);
	}
Beispiel #4
0
void ReadSettings()
{
    // For some reason this can be called before we know what ini file we're writing to.
    // Lets not try to read it if that happens.
    if (!pathSet) {
        FileLog("Read called without the path set.\n");
        return;
    }

    Interpolation = CfgReadInt(L"MIXING", L"Interpolation", 4);
    EffectsDisabled = CfgReadBool(L"MIXING", L"Disable_Effects", false);
    postprocess_filter_dealias = CfgReadBool(L"MIXING", L"DealiasFilter", false);
    FinalVolume = ((float)CfgReadInt(L"MIXING", L"FinalVolume", 100)) / 100;
    if (FinalVolume > 1.0f)
        FinalVolume = 1.0f;

    AdvancedVolumeControl = CfgReadBool(L"MIXING", L"AdvancedVolumeControl", false);
    VolumeAdjustCdb = CfgReadFloat(L"MIXING", L"VolumeAdjustC(dB)", 0);
    VolumeAdjustFLdb = CfgReadFloat(L"MIXING", L"VolumeAdjustFL(dB)", 0);
    VolumeAdjustFRdb = CfgReadFloat(L"MIXING", L"VolumeAdjustFR(dB)", 0);
    VolumeAdjustBLdb = CfgReadFloat(L"MIXING", L"VolumeAdjustBL(dB)", 0);
    VolumeAdjustBRdb = CfgReadFloat(L"MIXING", L"VolumeAdjustBR(dB)", 0);
    VolumeAdjustSLdb = CfgReadFloat(L"MIXING", L"VolumeAdjustSL(dB)", 0);
    VolumeAdjustSRdb = CfgReadFloat(L"MIXING", L"VolumeAdjustSR(dB)", 0);
    VolumeAdjustLFEdb = CfgReadFloat(L"MIXING", L"VolumeAdjustLFE(dB)", 0);
    VolumeAdjustC = powf(10, VolumeAdjustCdb / 10);
    VolumeAdjustFL = powf(10, VolumeAdjustFLdb / 10);
    VolumeAdjustFR = powf(10, VolumeAdjustFRdb / 10);
    VolumeAdjustBL = powf(10, VolumeAdjustBLdb / 10);
    VolumeAdjustBR = powf(10, VolumeAdjustBRdb / 10);
    VolumeAdjustSL = powf(10, VolumeAdjustSLdb / 10);
    VolumeAdjustSR = powf(10, VolumeAdjustSRdb / 10);
    VolumeAdjustLFE = powf(10, VolumeAdjustLFEdb / 10);
    delayCycles = CfgReadInt(L"DEBUG", L"DelayCycles", 4);


    wxString temp;
    CfgReadStr(L"OUTPUT", L"Output_Module", temp, PortaudioOut->GetIdent());
    OutputModule = FindOutputModuleById(temp.c_str()); // find the driver index of this module

// find current API
#ifdef __linux__
    CfgReadStr(L"PORTAUDIO", L"HostApi", temp, L"ALSA");
    OutputAPI = -1;
    if (temp == L"ALSA")
        OutputAPI = 0;
    if (temp == L"OSS")
        OutputAPI = 1;
    if (temp == L"JACK")
        OutputAPI = 2;
#else
    CfgReadStr(L"PORTAUDIO", L"HostApi", temp, L"OSS");
    OutputAPI = -1;

    if (temp == L"OSS")
        OutputAPI = 0;
#endif

#ifdef __unix__
    CfgReadStr(L"SDL", L"HostApi", temp, L"pulseaudio");
    SdlOutputAPI = -1;
#if SDL_MAJOR_VERSION >= 2
    // YES It sucks ...
    for (int i = 0; i < SDL_GetNumAudioDrivers(); ++i) {
        if (!temp.Cmp(wxString(SDL_GetAudioDriver(i), wxConvUTF8)))
            SdlOutputAPI = i;
    }
#endif
#endif

    SndOutLatencyMS = CfgReadInt(L"OUTPUT", L"Latency", 300);
    SynchMode = CfgReadInt(L"OUTPUT", L"Synch_Mode", 0);

    PortaudioOut->ReadSettings();
#ifdef __unix__
    SDLOut->ReadSettings();
#endif
    SoundtouchCfg::ReadSettings();
    DebugConfig::ReadSettings();

    // Sanity Checks
    // -------------

    Clampify(SndOutLatencyMS, LATENCY_MIN, LATENCY_MAX);

    WriteSettings();
    spuConfig->Flush();
}
Beispiel #5
0
void ReadSettings()
{
	Interpolation = CfgReadInt( L"MIXING",L"Interpolation", 4 );

	EffectsDisabled = CfgReadBool( L"MIXING", L"Disable_Effects", false );
	postprocess_filter_dealias = CfgReadBool( L"MIXING", L"DealiasFilter", false );
	FinalVolume = ((float)CfgReadInt( L"MIXING", L"FinalVolume", 100 )) / 100;
		if ( FinalVolume > 1.0f) FinalVolume = 1.0f;

	AdvancedVolumeControl = CfgReadBool(L"MIXING", L"AdvancedVolumeControl", false);
	VolumeAdjustCdb = CfgReadFloat(L"MIXING", L"VolumeAdjustC(dB)", 0);
	VolumeAdjustFLdb = CfgReadFloat(L"MIXING", L"VolumeAdjustFL(dB)", 0);
	VolumeAdjustFRdb = CfgReadFloat(L"MIXING", L"VolumeAdjustFR(dB)", 0);
	VolumeAdjustBLdb = CfgReadFloat(L"MIXING", L"VolumeAdjustBL(dB)", 0);
	VolumeAdjustBRdb = CfgReadFloat(L"MIXING", L"VolumeAdjustBR(dB)", 0);
	VolumeAdjustSLdb = CfgReadFloat(L"MIXING", L"VolumeAdjustSL(dB)", 0);
	VolumeAdjustSRdb = CfgReadFloat(L"MIXING", L"VolumeAdjustSR(dB)", 0);
	VolumeAdjustLFEdb = CfgReadFloat(L"MIXING", L"VolumeAdjustLFE(dB)", 0);
	VolumeAdjustC = powf(10, VolumeAdjustCdb / 10);
	VolumeAdjustFL = powf(10, VolumeAdjustFLdb / 10);
	VolumeAdjustFR = powf(10, VolumeAdjustFRdb / 10);
	VolumeAdjustBL = powf(10, VolumeAdjustBLdb / 10);
	VolumeAdjustBR = powf(10, VolumeAdjustBRdb / 10);
	VolumeAdjustSL = powf(10, VolumeAdjustSLdb / 10);
	VolumeAdjustSR = powf(10, VolumeAdjustSRdb / 10);
	VolumeAdjustLFE = powf(10, VolumeAdjustLFEdb / 10);

	SynchMode = CfgReadInt( L"OUTPUT", L"Synch_Mode", 0);
	numSpeakers = CfgReadInt( L"OUTPUT", L"SpeakerConfiguration", 0);
	dplLevel = CfgReadInt( L"OUTPUT", L"DplDecodingLevel", 0);
	SndOutLatencyMS = CfgReadInt(L"OUTPUT",L"Latency", 100);

	if((SynchMode == 0) && (SndOutLatencyMS < LATENCY_MIN_TS)) // can't use low-latency with timestretcher atm
		SndOutLatencyMS = LATENCY_MIN_TS;
	else if(SndOutLatencyMS < LATENCY_MIN)
		SndOutLatencyMS = LATENCY_MIN;

	wchar_t omodid[128];

	if ( IsVistaOrGreater2() ) {		// XA2 for WinXP, morder modern gets Portaudio
		CfgReadStr(L"OUTPUT", L"Output_Module", omodid, 127, PortaudioOut->GetIdent());
	}
	else {
		CfgReadStr(L"OUTPUT", L"Output_Module", omodid, 127, XAudio2Out->GetIdent());
	}

	// find the driver index of this module:
	OutputModule = FindOutputModuleById( omodid );

	CfgReadStr( L"DSP PLUGIN",L"Filename",dspPlugin,255,L"");
	dspPluginModule = CfgReadInt(L"DSP PLUGIN",L"ModuleNum",0);
	dspPluginEnabled= CfgReadBool(L"DSP PLUGIN",L"Enabled",false);

	// Read DSOUNDOUT and WAVEOUT configs:
	CfgReadStr( L"WAVEOUT", L"Device", Config_WaveOut.Device, L"default" );
	Config_WaveOut.NumBuffers = CfgReadInt( L"WAVEOUT", L"Buffer_Count", 4 );

	DSoundOut->ReadSettings();
	PortaudioOut->ReadSettings();

	SoundtouchCfg::ReadSettings();
	DebugConfig::ReadSettings();

	// Sanity Checks
	// -------------

	Clampify( SndOutLatencyMS, LATENCY_MIN, LATENCY_MAX );

	if( mods[OutputModule] == NULL )
	{
		// Unsupported or legacy module.
		fwprintf( stderr, L"* SPU2-X: Unknown output module '%s' specified in configuration file.\n", omodid );
		fprintf( stderr, "* SPU2-X: Defaulting to DirectSound (%S).\n", DSoundOut->GetIdent() );
		OutputModule = FindOutputModuleById( DSoundOut->GetIdent() );
	}
}
Beispiel #6
0
void ReadSettings()
{
	DebugEnabled = CfgReadBool(Section, L"Global_Enable",0);
	_MsgToConsole= CfgReadBool(Section, L"Show_Messages",0);
	_MsgKeyOnOff = CfgReadBool(Section, L"Show_Messages_Key_On_Off",0);
	_MsgVoiceOff = CfgReadBool(Section, L"Show_Messages_Voice_Off",0);
	_MsgDMA      = CfgReadBool(Section, L"Show_Messages_DMA_Transfer",0);
	_MsgAutoDMA  = CfgReadBool(Section, L"Show_Messages_AutoDMA",0);
	_MsgOverruns = CfgReadBool(Section, L"Show_Messages_Overruns",0);
	_MsgCache    = CfgReadBool(Section, L"Show_Messages_CacheStats",0);

	_AccessLog   = CfgReadBool(Section, L"Log_Register_Access",0);
	_DMALog      = CfgReadBool(Section, L"Log_DMA_Transfers",0);
	_WaveLog     = CfgReadBool(Section, L"Log_WAVE_Output",0);

	_CoresDump   = CfgReadBool(Section, L"Dump_Info",0);
	_MemDump     = CfgReadBool(Section, L"Dump_Memory",0);
	_RegDump     = CfgReadBool(Section, L"Dump_Regs",0);

	set_default_filenames();

	CfgReadStr(Section,L"Access_Log_Filename",AccessLogFileName,	L"logs/SPU2Log.txt");
	CfgReadStr(Section,L"WaveLog_Filename",   WaveLogFileName,		L"logs/SPU2log.wav");
	CfgReadStr(Section,L"DMA4Log_Filename",   DMA4LogFileName,		L"logs/SPU2dma4.dat");
	CfgReadStr(Section,L"DMA7Log_Filename",   DMA7LogFileName,		L"logs/SPU2dma7.dat");

	CfgReadStr(Section,L"Info_Dump_Filename",CoresDumpFileName,		L"logs/SPU2Cores.txt");
	CfgReadStr(Section,L"Mem_Dump_Filename", MemDumpFileName,		L"logs/SPU2mem.dat");
	CfgReadStr(Section,L"Reg_Dump_Filename", RegDumpFileName,		L"logs/SPU2regs.dat");
}
Beispiel #7
0
void LoadConfig() 
{
	conf.Log = CfgReadBool(L"Interface", L"Logging", false);
}
Beispiel #8
0
void ReadSettings()
{
	DebugEnabled = CfgReadBool(Section, _T("Global_Enable"),0);
	_MsgToConsole= CfgReadBool(Section, _T("Show_Messages"),0);
	_MsgKeyOnOff = CfgReadBool(Section, _T("Show_Messages_Key_On_Off"),0);
	_MsgVoiceOff = CfgReadBool(Section, _T("Show_Messages_Voice_Off"),0);
	_MsgDMA      = CfgReadBool(Section, _T("Show_Messages_DMA_Transfer"),0);
	_MsgAutoDMA  = CfgReadBool(Section, _T("Show_Messages_AutoDMA"),0);
	_MsgOverruns = CfgReadBool(Section, _T("Show_Messages_Overruns"),0);
	_MsgCache    = CfgReadBool(Section, _T("Show_Messages_CacheStats"),0);

	_AccessLog   = CfgReadBool(Section, _T("Log_Register_Access"),0);
	_DMALog      = CfgReadBool(Section, _T("Log_DMA_Transfers"),0);
	_WaveLog     = CfgReadBool(Section, _T("Log_WAVE_Output"),0);

	_CoresDump   = CfgReadBool(Section, _T("Dump_Info"),0);
	_MemDump     = CfgReadBool(Section, _T("Dump_Memory"),0);
	_RegDump     = CfgReadBool(Section, _T("Dump_Regs"),0);

	CfgReadStr(Section,_T("Access_Log_Filename"),AccessLogFileName,255,_T("logs\\SPU2Log.txt"));
	CfgReadStr(Section,_T("WaveLog_Filename"),   WaveLogFileName,  255,_T("logs\\SPU2log.wav"));
	CfgReadStr(Section,_T("DMA4Log_Filename"),   DMA4LogFileName,  255,_T("logs\\SPU2dma4.dat"));
	CfgReadStr(Section,_T("DMA7Log_Filename"),   DMA7LogFileName,  255,_T("logs\\SPU2dma7.dat"));

	CfgReadStr(Section,_T("Info_Dump_Filename"),CoresDumpFileName,255,_T("logs\\SPU2Cores.txt"));
	CfgReadStr(Section,_T("Mem_Dump_Filename"), MemDumpFileName,  255,_T("logs\\SPU2mem.dat"));
	CfgReadStr(Section,_T("Reg_Dump_Filename"), RegDumpFileName,  255,_T("logs\\SPU2regs.dat"));
}
Beispiel #9
0
void ReadSettings()
{
	DebugEnabled = CfgReadBool(Section, L"Global_Enable",0);
	_MsgToConsole= CfgReadBool(Section, L"Show_Messages",0);
	_MsgKeyOnOff = CfgReadBool(Section, L"Show_Messages_Key_On_Off",0);
	_MsgVoiceOff = CfgReadBool(Section, L"Show_Messages_Voice_Off",0);
	_MsgDMA      = CfgReadBool(Section, L"Show_Messages_DMA_Transfer",0);
	_MsgAutoDMA  = CfgReadBool(Section, L"Show_Messages_AutoDMA",0);
	_MsgOverruns = CfgReadBool(Section, L"Show_Messages_Overruns",0);
	_MsgCache    = CfgReadBool(Section, L"Show_Messages_CacheStats",0);

	_AccessLog   = CfgReadBool(Section, L"Log_Register_Access",0);
	_DMALog      = CfgReadBool(Section, L"Log_DMA_Transfers",0);
	_WaveLog     = CfgReadBool(Section, L"Log_WAVE_Output",0);

	_CoresDump   = CfgReadBool(Section, L"Dump_Info",0);
	_MemDump     = CfgReadBool(Section, L"Dump_Memory",0);
	_RegDump     = CfgReadBool(Section, L"Dump_Regs",0);

	_visual_debug_enabled = CfgReadBool(Section, L"Visual_Debug_Enabled",0);

	CfgReadStr(Section,L"Logs_Folder", CfgLogsFolder, L"logs");
	CfgReadStr(Section,L"Dumps_Folder",CfgDumpsFolder,L"logs");

	CfgReadStr(Section,L"Access_Log_Filename",AccessLogFileName, L"SPU2Log.txt");
	CfgReadStr(Section,L"DMA4Log_Filename",   DMA4LogFileName,   L"SPU2dma4.dat");
	CfgReadStr(Section,L"DMA7Log_Filename",   DMA7LogFileName,   L"SPU2dma7.dat");

	CfgReadStr(Section,L"Info_Dump_Filename", CoresDumpFileName, L"SPU2Cores.txt");
	CfgReadStr(Section,L"Mem_Dump_Filename",  MemDumpFileName,   L"SPU2mem.dat");
	CfgReadStr(Section,L"Reg_Dump_Filename",  RegDumpFileName,   L"SPU2regs.dat");

	if( !LogLocationSetByPcsx2 )
	{
		LogsFolder	= CfgLogsFolder;
		DumpsFolder = CfgLogsFolder;
	}
}