mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
DSP plugin merge - the two DSP plugins are now gone and all the code has been merged into Dolphin.
This WILL temporarily break the Linux and MacOSX builds but should be easy to fix. Things left to do: * The UI on the new Audio tab for the LLE/HLE choice is ugly * At times the code still look "plugin-y" and needs cleanup * The two plugins should be merged further. DSPHLE should use the emulated memory etc of DSPLLE as much as possible, so that simply saving the DSPLLE state is enough. This would also bring the possibility of savestate compatibility between the two plugins. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6947 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -21,6 +21,11 @@
|
||||
#include "AudioCommon.h"
|
||||
#include "CPUDetect.h"
|
||||
|
||||
#include "../../Core/Src/HW/AudioInterface.h"
|
||||
|
||||
// UGLINESS
|
||||
#include "../../Core/Src/PowerPC/PowerPC.h"
|
||||
|
||||
#if _M_SSE >= 0x301 && !(defined __GNUC__ && !defined __SSSE3__)
|
||||
#include <tmmintrin.h>
|
||||
#endif
|
||||
@ -33,14 +38,11 @@ unsigned int CMixer::Mix(short* samples, unsigned int numSamples)
|
||||
if (!samples)
|
||||
return 0;
|
||||
|
||||
if (g_dspInitialize.pEmulatorState)
|
||||
if (PowerPC::GetState() != 0)
|
||||
{
|
||||
if (*g_dspInitialize.pEmulatorState != 0)
|
||||
{
|
||||
// Silence
|
||||
memset(samples, 0, numSamples * 4);
|
||||
return numSamples;
|
||||
}
|
||||
// Silence
|
||||
memset(samples, 0, numSamples * 4);
|
||||
return numSamples;
|
||||
}
|
||||
|
||||
unsigned int numLeft = Common::AtomicLoad(m_numSamples);
|
||||
@ -127,7 +129,7 @@ unsigned int CMixer::Mix(short* samples, unsigned int numSamples)
|
||||
if (m_EnableDTKMusic)
|
||||
{
|
||||
// Re-sampling is done inside
|
||||
g_dspInitialize.pGetAudioStreaming(samples, numSamples, m_sampleRate);
|
||||
AudioInterface::Callback_GetStreaming(samples, numSamples, m_sampleRate);
|
||||
}
|
||||
|
||||
Common::AtomicAdd(m_numSamples, -(s32)numLeft);
|
||||
@ -136,18 +138,15 @@ unsigned int CMixer::Mix(short* samples, unsigned int numSamples)
|
||||
}
|
||||
|
||||
|
||||
void CMixer::PushSamples(short *samples, unsigned int num_samples)
|
||||
void CMixer::PushSamples(const short *samples, unsigned int num_samples)
|
||||
{
|
||||
if (m_throttle)
|
||||
{
|
||||
// The auto throttle function. This loop will put a ceiling on the CPU MHz.
|
||||
while (num_samples + Common::AtomicLoad(m_numSamples) > MAX_SAMPLES)
|
||||
{
|
||||
if (g_dspInitialize.pEmulatorState)
|
||||
{
|
||||
if (*g_dspInitialize.pEmulatorState != 0)
|
||||
break;
|
||||
}
|
||||
if (*PowerPC::GetStatePtr() != 0)
|
||||
break;
|
||||
// Shortcut key for Throttle Skipping
|
||||
#ifdef _WIN32
|
||||
if (GetAsyncKeyState(VK_TAB)) break;;
|
||||
|
Reference in New Issue
Block a user