Etterna 0.74.4
Loading...
Searching...
No Matches
RageSoundDriver_AU.h
1#ifndef RAGE_SOUND_DRIVER_AU_H
2#define RAGE_SOUND_DRIVER_AU_H
3
4#include "RageSoundDriver.h"
5#include "RageUtil/Misc/RageThreads.h"
6#include <AudioUnit/AudioUnit.h>
7
9{
10 public:
12 std::string Init();
14 float GetPlayLatency() const;
15 int GetSampleRate() const { return m_iSampleRate; }
16 int64_t GetPosition() const;
17
18 protected:
19 void SetupDecodingThread();
20
21 private:
22 static OSStatus Render(void* inRefCon,
23 AudioUnitRenderActionFlags* ioActionFlags,
24 const AudioTimeStamp* inTimeStamp,
25 UInt32 inBusNumber,
26 UInt32 inNumberFrames,
27 AudioBufferList* ioData);
28 static void NameHALThread(CFRunLoopObserverRef,
29 CFRunLoopActivity activity,
30 void* inRefCon);
31
32 double m_TimeScale;
33 AudioUnit m_OutputUnit;
34 int m_iSampleRate;
35 bool m_bDone;
36 bool m_bStarted;
37 RageThreadRegister* m_pIOThread;
38 RageThreadRegister* m_pNotificationThread;
39 RageSemaphore m_Semaphore;
40};
41
42#endif
Definition RageThreads.h:334
Definition RageSoundDriver_AU.h:9
Definition RageSoundDriver.h:15
Register a thread created outside of RageThread.
Definition RageThreads.h:211