00001
#ifndef RAGE_SOUND_DRIVER_CA_H
00002
#define RAGE_SOUND_DRIVER_CA_H
00003
00004
#include "RageSoundDriver_Generic_Software.h"
00005
00006
struct AudioTimeStamp;
00007
struct AudioBufferList;
00008
struct OpaqueAudioConverter;
00009 typedef struct OpaqueAudioConverter *
AudioConverterRef;
00010 typedef unsigned long UInt32;
00011 typedef UInt32 AudioDeviceID;
00012 typedef UInt32 AudioDevicePropertyID;
00013 typedef unsigned char Boolean;
00014 typedef long OSStatus;
00015
class CAAudioHardwareDevice;
00016
class RageSoundBase;
00017
00018 class RageSound_CA :
public RageSound_Generic_Software
00019 {
00020
private:
00021 int64_t
mDecodePos;
00022 float mLatency;
00023 CAAudioHardwareDevice *
mOutputDevice;
00024 AudioConverterRef mConverter;
00025
00026
static OSStatus GetData(AudioDeviceID inDevice,
00027
const AudioTimeStamp *inNow,
00028
const AudioBufferList *inInputData,
00029
const AudioTimeStamp *inInputTime,
00030 AudioBufferList *outOutputData,
00031
const AudioTimeStamp *inOutputTime,
00032
void *inClientData);
00033
00034
static OSStatus OverloadListener(AudioDeviceID inDevice,
00035 UInt32 inChannel,
00036 Boolean isInput,
00037 AudioDevicePropertyID inPropertyID,
00038
void *inData);
00039
00040
public:
00041
RageSound_CA();
00042
CString Init();
00043
~RageSound_CA();
00044 float GetPlayLatency()
const {
return mLatency; }
00045 int64_t GetPosition(
const RageSoundBase *sound)
const;
00046
void SetupDecodingThread();
00047 };
00048
00049 #define RAGE_SOUND_CA
00050
00051
#endif
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076