SPU2: merged more core callbacks

This commit is contained in:
Gauvain 'GovanifY' Roussel-Tarbouriech 2020-09-24 18:10:38 +02:00 committed by refractionpcsx2
parent 67738a57b7
commit fe8160f3ec
13 changed files with 24 additions and 30 deletions

View File

@ -21,9 +21,9 @@
#include <alsa/asoundlib.h>
#include "Global.h"
#include "../Global.h"
#include "Alsa.h"
#include "SndOut.h"
#include "../SndOut.h"
// Does not work, except as effectively a null plugin.
class AlsaMod : public SndOutModule

View File

@ -15,14 +15,14 @@
* along with SPU2-X. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Global.h"
#include "../Global.h"
#include "Dialogs.h"
#include "Config.h"
#if defined(__unix__) || defined(__APPLE__)
#include <SDL.h>
#include <SDL_audio.h>
#include "wx/wxConfig.h"
#include "../wx/wxConfig.h"
#endif
int AutoDMAPlayRate[2] = {0, 0};

View File

@ -15,7 +15,7 @@
* along with SPU2-X. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Global.h"
#include "../Global.h"
#include "Dialogs.h"
#include "Config.h"
#include "Utilities/Path.h"

View File

@ -19,7 +19,7 @@
*
*/
#include "Global.h"
#include "../Global.h"
#include "Dialogs.h"
#include "Config.h"
#include "soundtouch/SoundTouch.h"

View File

@ -91,9 +91,7 @@ SndOutModule *mods[] =
#if defined(_WIN32) || defined(SPU2X_PORTAUDIO)
PortaudioOut,
#endif
#if defined(SPU2X_SDL) || defined(SPU2X_SDL2)
SDLOut,
#endif
#if defined(__linux__) /* && defined(__ALSA__)*/
AlsaOut,
#endif

View File

@ -675,9 +675,7 @@ extern SndOutModule *XAudio2Out;
#if defined(_WIN32) || defined(SPU2X_PORTAUDIO)
extern SndOutModule *PortaudioOut;
#endif
#if defined(SPU2X_SDL) || defined(SPU2X_SDL2)
extern SndOutModule *const SDLOut;
#endif
#ifdef __linux__
extern SndOutModule *AlsaOut;
#endif

View File

@ -18,7 +18,11 @@
#include "Global.h"
#include "SndOut.h"
#include "Dialogs.h"
#ifdef __linux__
#include "Linux/Dialogs.h"
#elif defined(_WIN32)
#include "Windows/Dialogs.h"
#endif
#include <memory>

View File

@ -24,7 +24,7 @@
#if defined(__unix__) || defined(__APPLE__)
#include <SDL.h>
#include <SDL_audio.h>
#include "Linux/Config.h"
#include "Config.h"
#endif
class MixerTab : public wxPanel
@ -107,4 +107,4 @@ public:
void Save();
void Reconfigure();
void CallReconfigure(wxCommandEvent& event);
};
};

View File

@ -27,6 +27,7 @@
#include "MTVU.h"
#include "IPC.h"
#include "FW.h"
#include "SPU2/spu2.h"
#include "../DebugTools/MIPSAnalyst.h"
#include "../DebugTools/SymbolMap.h"
@ -291,7 +292,6 @@ void SysCoreThread::OnSuspendInThread()
GetCorePlugins().Close();
DoCDVDclose();
FWclose();
SPU2close();
}
void SysCoreThread::OnResumeInThread( bool isSuspended )
@ -300,7 +300,6 @@ void SysCoreThread::OnResumeInThread( bool isSuspended )
if (isSuspended || !g_GameStarted)
DoCDVDopen();
FWopen();
SPU2open();
}
@ -317,7 +316,6 @@ void SysCoreThread::OnCleanupInThread()
vu1Thread.WaitVU();
DoCDVDclose();
FWclose();
SPU2close();
GetCorePlugins().Close();
GetCorePlugins().Shutdown();

View File

@ -32,6 +32,7 @@
#include "Dump.h"
#include "DebugTools/Debug.h"
#include "R3000A.h"
#include "SPU2/spu2.h"
// renderswitch - tells GSdx to go into dx9 sw if "renderswitch" is set.
bool renderswitch = false;
@ -440,8 +441,7 @@ namespace Implementations
std::wstring* filename = nullptr;
if (filename = GSsetupRecording(g_Pcsx2Recording))
{
if (SPU2setupRecording)
SPU2setupRecording(g_Pcsx2Recording, filename);
SPU2setupRecording(g_Pcsx2Recording, filename);
delete filename;
}
else
@ -453,8 +453,7 @@ namespace Implementations
else
{
// the GS doesn't support recording
if (SPU2setupRecording)
SPU2setupRecording(g_Pcsx2Recording, NULL);
SPU2setupRecording(g_Pcsx2Recording, NULL);
}
if (GetMainFramePtr() && needsMainFrameEnable)
@ -465,8 +464,7 @@ namespace Implementations
// stop recording
if (GSsetupRecording)
GSsetupRecording(g_Pcsx2Recording);
if (SPU2setupRecording)
SPU2setupRecording(g_Pcsx2Recording, NULL);
SPU2setupRecording(g_Pcsx2Recording, NULL);
}
}

View File

@ -19,6 +19,7 @@
#include "CDVD/CDVD.h"
#include "GS.h"
#include "GSFrame.h"
#include "SPU2/spu2.h"
#include "ConsoleLogger.h"
#include "MainFrame.h"
@ -856,8 +857,7 @@ void MainEmuFrame::VideoCaptureUpdate()
std::wstring* filename = nullptr;
if (filename = GSsetupRecording(m_capturingVideo))
{
if (SPU2setupRecording)
SPU2setupRecording(m_capturingVideo, filename);
SPU2setupRecording(m_capturingVideo, filename);
delete filename;
}
else
@ -869,10 +869,7 @@ void MainEmuFrame::VideoCaptureUpdate()
else
{
// the GS doesn't support recording.
if (SPU2setupRecording)
{
SPU2setupRecording(m_capturingVideo, nullptr);
}
SPU2setupRecording(m_capturingVideo, nullptr);
}
if (GetMainFramePtr() && needsMainFrameEnable)
@ -884,8 +881,7 @@ void MainEmuFrame::VideoCaptureUpdate()
// stop recording
if (GSsetupRecording)
GSsetupRecording(m_capturingVideo);
if (SPU2setupRecording)
SPU2setupRecording(m_capturingVideo, nullptr);
SPU2setupRecording(m_capturingVideo, nullptr);
}
if (m_capturingVideo)

View File

@ -20,6 +20,7 @@
#include "Sio.h"
#include "CDVD/CdRom.h"
#include "FW.h"
#include "SPU2/spu2.h"
#include "ps2/pgif.h"
#include "Mdec.h"

View File

@ -19,6 +19,7 @@
#include "Sio.h"
#include "FW.h"
#include "CDVD/CdRom.h"
#include "SPU2/spu2.h"
#include "ps2/pgif.h"
#include "Mdec.h"