22#include <AudioToolbox/AudioToolbox.h>
24#define checkErr(err) \
26 JAMI_ERR("CoreAudio Error: %ld", static_cast<long>(err)); \
102 void initAudioFormat();
150 UInt32 inChannelsPerFrame_;
152 UInt32 outChannelsPerFrame_;
154 std::condition_variable readyCv_ {};
virtual int getAudioDeviceIndex(const std::string &name, AudioDeviceType type) const
virtual std::vector< std::string > getCaptureDeviceList() const
Scan the sound card available on the system.
virtual std::vector< std::string > getPlaybackDeviceList() const
virtual int getIndexCapture() const
Get the index of the audio card for capture.
virtual std::string getAudioDeviceName(int index, AudioDeviceType type) const
int initAudioStreams(AudioUnit *audioUnit)
virtual void stopStream(AudioDeviceType stream=AudioDeviceType::ALL)
Stop the playback and capture streams.
virtual int getIndexPlayback() const
Get the index of the audio card for playback.
virtual void startStream(AudioDeviceType stream=AudioDeviceType::ALL)
Start the capture stream and prepare the playback stream.
virtual int getIndexRingtone() const
Get the index of the audio card for ringtone (could be differnet from playback)
CoreLayer(const AudioPreference &pref)
bool initAudioLayerIO(AudioDeviceType stream)
Configure the AudioUnit.
void emitSignal(Args... args)
#define NON_COPYABLE(ClassName)