audiocommon: sync mixer by fifo instead of estimate values

This commit is contained in:
degasus
2014-02-06 06:55:45 +01:00
parent 2956ffa5be
commit d20dbbc92f
2 changed files with 34 additions and 84 deletions

View File

@ -24,7 +24,6 @@ public:
, m_logAudio(0)
, m_indexW(0)
, m_indexR(0)
, m_AIplaying(true)
{
// AyuanX: The internal (Core & DSP) sample rate is fixed at 32KHz
// So when AI/DAC sample rate differs than 32KHz, we have to do re-sampling
@ -40,7 +39,6 @@ public:
// Called from audio threads
virtual unsigned int Mix(short* samples, unsigned int numSamples);
virtual void Premix(short * /*samples*/, unsigned int /*numSamples*/) {}
unsigned int GetNumSamples();
// Called from main thread
virtual void PushSamples(const short* samples, unsigned int num_samples);
@ -98,7 +96,6 @@ protected:
volatile u32 m_indexW;
volatile u32 m_indexR;
bool m_AIplaying;
std::mutex m_csMixing;
volatile float m_speed; // Current rate of the emulation (1.0 = 100% speed)