mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Have the AudioUnit callback drive the internal mixer directly instead
of going through an intermediate thread and buffer. This seems to be how Core Audio is meant to be used, although I still haven't read the manual. Indeed, sound on OS X works perfectly now. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5555 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -31,10 +31,12 @@
|
||||
class CoreAudioSound : public SoundStream
|
||||
{
|
||||
#if defined(__APPLE__)
|
||||
Common::Thread *thread;
|
||||
Common::Event soundSyncEvent;
|
||||
Common::CriticalSection soundCriticalSection;
|
||||
|
||||
Common::Thread *thread;
|
||||
Common::CriticalSection soundCriticalSection;
|
||||
Common::Event soundSyncEvent;
|
||||
ComponentDescription desc;
|
||||
AudioUnit audioUnit;
|
||||
|
||||
public:
|
||||
CoreAudioSound(CMixer *mixer);
|
||||
@ -42,19 +44,18 @@ public:
|
||||
|
||||
virtual bool Start();
|
||||
virtual void SoundLoop();
|
||||
virtual void Stop();
|
||||
virtual void Stop();
|
||||
|
||||
static bool isValid() {
|
||||
return true;
|
||||
}
|
||||
virtual bool usesMixer() const {
|
||||
return true;
|
||||
virtual bool usesMixer() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void Update();
|
||||
|
||||
private:
|
||||
bool CoreAudioInit();
|
||||
|
||||
void RenderSamples(void *target, UInt32 size);
|
||||
#else
|
||||
public:
|
||||
CoreAudioSound(CMixer *mixer) : SoundStream(mixer) {}
|
||||
@ -62,4 +63,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user