6#include <AudioToolbox/AudioToolbox.h>
51 void DoPlay(
const uint8_t* buf,
size_t len)
override;
68 static OSStatus CoreAudioRenderCallback(
void* inRefCon, AudioUnitRenderActionFlags* ioActionFlags,
69 const AudioTimeStamp* inTimeStamp, UInt32 inBusNumber,
70 UInt32 inNumberFrames, AudioBufferList* ioData);
75 size_t mRingBufferSize;
76 size_t mRingBufferReadPos;
77 size_t mRingBufferWritePos;
78 pthread_mutex_t mMutex;
Abstract base class for platform-specific audio output backends.
Definition AudioPlayer.h:32
AudioPlayer implementation backed by Apple's Core Audio framework.
Definition CoreAudioAudioPlayer.h:20
CoreAudioAudioPlayer(AudioSettings settings)
Constructs a CoreAudioAudioPlayer with the given audio settings.
int Buffered() override
Returns the number of audio frames currently queued in the ring buffer.
void DoClose() override
Stops and disposes of the Core Audio output unit and frees the ring buffer.
bool DoInit() override
Opens and configures the Core Audio output unit.
void DoPlay(const uint8_t *buf, size_t len) override
Copies interleaved PCM samples into the ring buffer for playback.
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14
Configuration parameters shared by all AudioPlayer backends.
Definition AudioPlayer.h:14