2013-04-17 22:43:11 -04:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2011-01-28 18:39:30 +00:00
|
|
|
|
2011-02-14 02:18:03 +00:00
|
|
|
#ifndef _DSPEMULATOR_H_
|
|
|
|
#define _DSPEMULATOR_H_
|
2011-01-28 18:39:30 +00:00
|
|
|
|
|
|
|
#include "ChunkFile.h"
|
2011-03-22 07:27:23 +00:00
|
|
|
#include "SoundStream.h"
|
2011-01-28 18:39:30 +00:00
|
|
|
|
2011-02-02 16:34:12 +00:00
|
|
|
class DSPEmulator
|
2011-01-28 18:39:30 +00:00
|
|
|
{
|
|
|
|
public:
|
2011-02-02 16:34:12 +00:00
|
|
|
virtual ~DSPEmulator() {}
|
2011-01-28 18:39:30 +00:00
|
|
|
|
|
|
|
virtual bool IsLLE() = 0;
|
|
|
|
|
2013-11-07 09:24:56 -08:00
|
|
|
virtual bool Initialize(void *hWnd, bool bWii, bool bDSPThread) = 0;
|
2011-01-28 18:39:30 +00:00
|
|
|
virtual void Shutdown() = 0;
|
|
|
|
|
|
|
|
virtual void DoState(PointerWrap &p) = 0;
|
2011-12-30 20:16:12 -08:00
|
|
|
virtual void PauseAndLock(bool doLock, bool unpauseOnUnlock=true) = 0;
|
2011-01-28 18:39:30 +00:00
|
|
|
|
|
|
|
virtual void DSP_WriteMailBoxHigh(bool _CPUMailbox, unsigned short) = 0;
|
|
|
|
virtual void DSP_WriteMailBoxLow(bool _CPUMailbox, unsigned short) = 0;
|
|
|
|
virtual unsigned short DSP_ReadMailBoxHigh(bool _CPUMailbox) = 0;
|
|
|
|
virtual unsigned short DSP_ReadMailBoxLow(bool _CPUMailbox) = 0;
|
|
|
|
virtual unsigned short DSP_ReadControlRegister() = 0;
|
|
|
|
virtual unsigned short DSP_WriteControlRegister(unsigned short) = 0;
|
|
|
|
virtual void DSP_SendAIBuffer(unsigned int address, unsigned int num_samples) = 0;
|
|
|
|
virtual void DSP_Update(int cycles) = 0;
|
|
|
|
virtual void DSP_StopSoundStream() = 0;
|
|
|
|
virtual void DSP_ClearAudioBuffer(bool mute) = 0;
|
2013-04-12 12:08:05 +10:00
|
|
|
virtual u32 DSP_UpdateRate() = 0;
|
2011-03-22 07:27:23 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
SoundStream *soundStream;
|
2013-11-07 09:24:56 -08:00
|
|
|
void *m_hWnd;
|
2011-01-28 18:39:30 +00:00
|
|
|
};
|
|
|
|
|
2013-04-23 07:21:48 -04:00
|
|
|
DSPEmulator *CreateDSPEmulator(bool HLE);
|
2011-01-28 18:39:30 +00:00
|
|
|
|
2011-02-14 02:18:03 +00:00
|
|
|
#endif // _DSPEMULATOR_H_
|