Attempt to move mixer to audio common, it's a bit more complicated than I expected

so please check I didn't break anything in hle



git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2756 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee
2009-03-26 09:29:14 +00:00
parent d7038fea17
commit fff663e8c7
35 changed files with 386 additions and 619 deletions

View File

@ -19,32 +19,27 @@
#define __SOUNDSTREAM_H__
#include "Common.h"
typedef void (*StreamCallback)(short* buffer, int numSamples, int bits, int rate, int channels);
#include "Mixer.h"
class SoundStream
{
protected:
int sampleRate;
StreamCallback callback;
CMixer *m_mixer;
// We set this to shut down the sound thread.
// 0=keep playing, 1=stop playing NOW.
volatile int threadData;
public:
SoundStream(int _sampleRate, StreamCallback _callback) :
sampleRate(_sampleRate), callback(_callback), threadData(0) {}
virtual ~SoundStream() {}
SoundStream(CMixer *mixer) : m_mixer(mixer), threadData(0) {}
virtual ~SoundStream() { delete m_mixer;}
static bool isValid() { return false; }
virtual bool usesMixer() const { return false; }
virtual bool Start() { return false; }
virtual void SoundLoop() {}
virtual void Stop() {}
virtual void Update() {}
virtual int GetSampleRate() const { return sampleRate; }
static bool isValid() { return false; }
virtual CMixer *GetMixer() const { return m_mixer; }
virtual bool Start() { return false; }
virtual void SoundLoop() {}
virtual void Stop() {}
virtual void Update() {}
};
#endif