|
Ring Daemon
|
#include <corelayer.h>


Public Member Functions | |
| void | bindCallbacks () |
| CoreLayer (const AudioPreference &pref) | |
| CoreLayer (const AudioPreference &pref) | |
| void | destroyAudioLayer () |
| void | destroyAudioLayer () |
| virtual int | getAudioDeviceIndex (const std::string &name, AudioDeviceType type) const |
| virtual int | getAudioDeviceIndex (const std::string &name, AudioDeviceType type) const |
| virtual std::string | getAudioDeviceName (int index, AudioDeviceType type) const |
| virtual std::string | getAudioDeviceName (int index, AudioDeviceType type) const |
| virtual std::vector< std::string > | getCaptureDeviceList () const |
| Scan the sound card available on the system. | |
| virtual std::vector< std::string > | getCaptureDeviceList () const |
| Scan the sound card available on the system. | |
| virtual int | getIndexCapture () const |
| Get the index of the audio card for capture. | |
| virtual int | getIndexCapture () const |
| Get the index of the audio card for capture. | |
| virtual int | getIndexPlayback () const |
| Get the index of the audio card for playback. | |
| virtual int | getIndexPlayback () const |
| Get the index of the audio card for playback. | |
| virtual int | getIndexRingtone () const |
| Get the index of the audio card for ringtone (could be differnet from playback) | |
| virtual int | getIndexRingtone () const |
| Get the index of the audio card for ringtone (could be differnet from playback) | |
| virtual std::vector< std::string > | getPlaybackDeviceList () const |
| virtual std::vector< std::string > | getPlaybackDeviceList () const |
| bool | initAudioLayerIO (AudioDeviceType stream) |
| Configure the AudioUnit. | |
| void | initAudioLayerIO (AudioDeviceType stream) |
| Configure the AudioUnit. | |
| int | initAudioStreams (AudioUnit *audioUnit) |
| void | setupInputBus () |
| void | setupOutputBus () |
| virtual void | startStream (AudioDeviceType stream) |
| Start the capture stream and prepare the playback stream. | |
| virtual void | startStream (AudioDeviceType stream=AudioDeviceType::ALL) |
| Start the capture stream and prepare the playback stream. | |
| virtual void | stopStream (AudioDeviceType stream=AudioDeviceType::ALL) |
| Stop the playback and capture streams. | |
| virtual void | stopStream (AudioDeviceType stream=AudioDeviceType::ALL) |
| Stop the playback and capture streams. | |
| ~CoreLayer () | |
| ~CoreLayer () | |
Public Member Functions inherited from jami::AudioLayer | |
| AudioLayer (const AudioPreference &) | |
| void | flushMain () |
| Flush main buffer. | |
| void | flushUrgent () |
| Flush urgent buffer. | |
| double | getCaptureGain () const |
| Get capture stream gain (microphone) | |
| AudioFormat | getFormat () const |
| Get the audio format of the layer (sample rate & channel number). | |
| double | getPlaybackGain () const |
| Get playback stream gain (speaker) | |
| unsigned int | getSampleRate () const |
| Get the sample rate of the audio layer. | |
| bool | isCaptureMuted () const |
| bool | isPlaybackMuted () const |
| bool | isRingtoneMuted () const |
| bool | isStarted () const |
| Determine whether or not the audio layer is active (i.e. | |
| void | muteCapture (bool muted) |
| Mute capture (microphone) | |
| void | mutePlayback (bool muted) |
| Mute playback. | |
| void | muteRingtone (bool muted) |
| void | notifyIncomingCall () |
| Emit an audio notification (beep) on incoming calls. | |
| void | playIncomingCallNotification (bool play) |
| Start/Stop playing the incoming call notification sound (beep) while playing back audio (typically during an ongoing call). | |
| void | putUrgent (std::shared_ptr< AudioFrame > buffer) |
| Send a chunk of data to the hardware buffer to start the playback Copy data in the urgent buffer. | |
| void | setCaptureGain (double gain) |
| Set capture stream gain (microphone) Range should be [-1.0, 1.0]. | |
| void | setPlaybackGain (double gain) |
| Set playback stream gain (speaker) Range should be [-1.0, 1.0]. | |
| virtual void | startCaptureStream (const std::string &id) |
| Start a capture stream on the given device (eg. | |
| virtual void | stopCaptureStream (const std::string &id) |
| Stop an ongoing capture stream on the given device. | |
| template<class Rep , class Period > | |
| bool | waitForStart (const std::chrono::duration< Rep, Period > &rel_time) const |
| virtual | ~AudioLayer () |
Additional Inherited Members | |
Protected Types inherited from jami::AudioLayer | |
| enum class | Status : uint8_t { Idle , Starting , Started } |
Protected Member Functions inherited from jami::AudioLayer | |
| void | devicesChanged () |
| void | flush () |
| std::shared_ptr< AudioFrame > | getPlayback (AudioFormat format, size_t samples) |
| std::shared_ptr< AudioFrame > | getToPlay (AudioFormat format, size_t writableSamples) |
| std::shared_ptr< AudioFrame > | getToRing (AudioFormat format, size_t writableSamples) |
| void | hardwareFormatAvailable (AudioFormat playback, size_t bufSize=0) |
| Callback to be called by derived classes when the audio output is opened. | |
| void | hardwareInputFormatAvailable (AudioFormat capture) |
| Set the input format on necessary objects. | |
| void | playbackChanged (bool started) |
| void | putRecorded (std::shared_ptr< AudioFrame > &&frame) |
| void | recordChanged (bool started) |
| void | setHasNativeAEC (bool hasEAC) |
| void | setHasNativeNS (bool hasNS) |
Protected Attributes inherited from jami::AudioLayer | |
| AudioFormat | audioFormat_ |
| Sample Rate that should be sent to the sound card. | |
| AudioFormat | audioInputFormat_ |
| Sample Rate for input. | |
| double | captureGain_ |
| Gain applied to mic signal. | |
| bool | hasNativeAEC_ {true} |
| bool | hasNativeNS_ {false} |
| bool | isCaptureMuted_ |
| True if capture is not to be used. | |
| bool | isPlaybackMuted_ |
| True if playback is not to be used. | |
| bool | isRingtoneMuted_ {false} |
| True if ringtone should be muted. | |
| std::shared_ptr< RingBuffer > | mainRingBuffer_ |
| Buffers for audio processing. | |
| std::mutex | mutex_ {} |
| Lock for the entire audio layer. | |
| size_t | nativeFrameSize_ {0} |
| double | playbackGain_ |
| Gain applied to playback signal. | |
| std::unique_ptr< AudioFrameResizer > | playbackQueue_ |
| bool | playbackStarted_ {false} |
| const AudioPreference & | pref_ |
| bool | recordStarted_ {false} |
| std::unique_ptr< Resampler > | resampler_ |
| Manage sampling rate conversion. | |
| std::condition_variable | startedCv_ |
| std::atomic< Status > | status_ {Status::Idle} |
| Whether or not the audio layer's playback stream is started. | |
| RingBuffer | urgentRingBuffer_ |
| Urgent ring buffer used for ringtones. | |
Definition at line 38 of file ios/corelayer.h.
| jami::CoreLayer::CoreLayer | ( | const AudioPreference & | pref | ) |
| jami::CoreLayer::~CoreLayer | ( | ) |
| jami::CoreLayer::CoreLayer | ( | const AudioPreference & | pref | ) |
| jami::CoreLayer::~CoreLayer | ( | ) |
| void jami::CoreLayer::bindCallbacks | ( | ) |
| void jami::CoreLayer::destroyAudioLayer | ( | ) |
| void jami::CoreLayer::destroyAudioLayer | ( | ) |
|
virtual |
Implements jami::AudioLayer.
|
virtual |
Implements jami::AudioLayer.
|
virtual |
Implements jami::AudioLayer.
|
virtual |
Implements jami::AudioLayer.
|
virtual |
Scan the sound card available on the system.
Implements jami::AudioLayer.
|
virtual |
Scan the sound card available on the system.
Implements jami::AudioLayer.
Get the index of the audio card for capture.
Implements jami::AudioLayer.
Definition at line 58 of file ios/corelayer.h.
Get the index of the audio card for capture.
Implements jami::AudioLayer.
Definition at line 61 of file osx/corelayer.h.
Get the index of the audio card for playback.
Implements jami::AudioLayer.
Definition at line 64 of file ios/corelayer.h.
Get the index of the audio card for playback.
Implements jami::AudioLayer.
Definition at line 67 of file osx/corelayer.h.
Get the index of the audio card for ringtone (could be differnet from playback)
Implements jami::AudioLayer.
Definition at line 70 of file ios/corelayer.h.
Get the index of the audio card for ringtone (could be differnet from playback)
Implements jami::AudioLayer.
Definition at line 73 of file osx/corelayer.h.
|
virtual |
Implements jami::AudioLayer.
|
virtual |
Implements jami::AudioLayer.
| bool jami::CoreLayer::initAudioLayerIO | ( | AudioDeviceType | stream | ) |
Configure the AudioUnit.
| void jami::CoreLayer::initAudioLayerIO | ( | AudioDeviceType | stream | ) |
Configure the AudioUnit.
| void jami::CoreLayer::setupInputBus | ( | ) |
| void jami::CoreLayer::setupOutputBus | ( | ) |
|
virtual |
Start the capture stream and prepare the playback stream.
The playback starts accordingly to its threshold CoreAudio Library API
Implements jami::AudioLayer.
|
virtual |
Start the capture stream and prepare the playback stream.
The playback starts accordingly to its threshold CoreAudio Library API
Implements jami::AudioLayer.
|
virtual |
Stop the playback and capture streams.
Drops the pending frames and put the capture and playback handles to PREPARED state CoreAudio Library API
Implements jami::AudioLayer.
|
virtual |
Stop the playback and capture streams.
Drops the pending frames and put the capture and playback handles to PREPARED state CoreAudio Library API
Implements jami::AudioLayer.