Ring Daemon 16.0.0
|
Structure to hold sample rate and channel number associated with audio data. More...
#include <audio_format.h>
Public Member Functions | |
constexpr | AudioFormat (unsigned sr, unsigned c, AVSampleFormat f=AV_SAMPLE_FMT_S16) |
size_t | getBandwidth (unsigned delay_ms=1000) const |
Bytes per second (default), or bytes necessary to hold delay_ms milliseconds of audio data. | |
size_t | getBytesPerFrame () const |
Returns bytes necessary to hold one frame of audio data. | |
bool | operator!= (const AudioFormat &b) const |
bool | operator== (const AudioFormat &b) const |
std::string | toString () const |
AudioFormat | withSampleFormat (AVSampleFormat format) |
Static Public Member Functions | |
static const constexpr AudioFormat | DEFAULT () |
static const constexpr AudioFormat | MONO () |
static const constexpr AudioFormat | NONE () |
static const constexpr AudioFormat | STEREO () |
Public Attributes | |
unsigned | nb_channels |
unsigned | sample_rate |
AVSampleFormat | sampleFormat |
Static Public Attributes | |
static const constexpr unsigned | DEFAULT_SAMPLE_RATE = 48000 |
Structure to hold sample rate and channel number associated with audio data.
Definition at line 33 of file audio_format.h.
|
inlineconstexpr |
Definition at line 39 of file audio_format.h.
|
inlinestaticconstexpr |
Definition at line 79 of file audio_format.h.
Bytes per second (default), or bytes necessary to hold delay_ms milliseconds of audio data.
Definition at line 73 of file audio_format.h.
References jami::emitSignal(), getBytesPerFrame(), and sample_rate.
|
inline |
Returns bytes necessary to hold one frame of audio data.
Definition at line 67 of file audio_format.h.
References jami::emitSignal(), nb_channels, and sampleFormat.
Referenced by getBandwidth(), jami::OpenSLLayer::initAudioEngine(), and jami::OpenSLLayer::startAudioCapture().
|
inlinestaticconstexpr |
Definition at line 81 of file audio_format.h.
References DEFAULT_SAMPLE_RATE.
|
inlinestaticconstexpr |
Definition at line 80 of file audio_format.h.
|
inline |
Definition at line 51 of file audio_format.h.
References jami::emitSignal().
|
inline |
Definition at line 45 of file audio_format.h.
References jami::emitSignal(), nb_channels, sample_rate, and sampleFormat.
|
inlinestaticconstexpr |
Definition at line 82 of file audio_format.h.
References DEFAULT_SAMPLE_RATE.
Referenced by jami::LocalRecorder::startRecording().
|
inline |
Definition at line 53 of file audio_format.h.
References jami::emitSignal(), nb_channels, sample_rate, and sampleFormat.
Referenced by jami::AudioFile::AudioFile(), jami::Manager::audioFormatUsed(), jami::opensl::AudioPlayer::AudioPlayer(), jami::AudioFrameResizer::enqueue(), jami::AudioLayer::hardwareFormatAvailable(), jami::AudioLayer::hardwareInputFormatAvailable(), and jami::OpenSLLayer::initAudioEngine().
|
inline |
Definition at line 58 of file audio_format.h.
References nb_channels, and sample_rate.
Definition at line 78 of file audio_format.h.
unsigned jami::AudioFormat::nb_channels |
Definition at line 36 of file audio_format.h.
Referenced by jami::AudioFile::AudioFile(), jami::audioFormatToSampleFormat(), jami::Manager::audioFormatUsed(), jami::opensl::AudioPlayer::AudioPlayer(), jami::opensl::AudioRecorder::AudioRecorder(), jami::opensl::convertToSLSampleFormat(), getBytesPerFrame(), jami::SystemAudioCodecInfo::getCodecSpecifications(), jami::AudioLoop::getNext(), jami::WebRTCAudioProcessor::getProcessed(), jami::NullAudioProcessor::NullAudioProcessor(), operator==(), jami::Resampler::resample(), jami::Resampler::resample(), jami::AudioFrameResizer::setFormat(), jami::SpeexAudioProcessor::SpeexAudioProcessor(), toString(), jami::PulseLayer::updateSinkList(), jami::PulseLayer::updateSourceList(), jami::WebRTCAudioProcessor::WebRTCAudioProcessor(), and withSampleFormat().
unsigned jami::AudioFormat::sample_rate |
Definition at line 35 of file audio_format.h.
Referenced by jami::AudioFile::AudioFile(), jami::audioFormatToSampleFormat(), jami::Manager::audioFormatUsed(), jami::opensl::convertToSLSampleFormat(), getBandwidth(), jami::SystemAudioCodecInfo::getCodecSpecifications(), libjami::AudioFrame::getFormat(), jami::RingBufferPool::getInternalSamplingRate(), jami::WebRTCAudioProcessor::getProcessed(), jami::AudioLayer::getSampleRate(), jami::AudioLayer::getToRing(), operator==(), jami::Resampler::resample(), jami::Resampler::resample(), jami::SystemAudioCodecInfo::setCodecSpecifications(), jami::AudioInput::setFormat(), jami::RingBuffer::setFormat(), jami::RingBufferPool::setInternalSamplingRate(), jami::SpeexAudioProcessor::SpeexAudioProcessor(), toString(), jami::WebRTCAudioProcessor::WebRTCAudioProcessor(), jami::webrtcFrameSize(), and withSampleFormat().
AVSampleFormat jami::AudioFormat::sampleFormat |
Definition at line 37 of file audio_format.h.
Referenced by jami::AudioFile::AudioFile(), jami::Manager::audioFormatUsed(), jami::opensl::AudioPlayer::AudioPlayer(), jami::opensl::AudioRecorder::AudioRecorder(), jami::opensl::convertToSLSampleFormat(), getBytesPerFrame(), jami::AudioLoop::getNext(), jami::AudioLayer::hardwareFormatAvailable(), jami::AudioLayer::notifyIncomingCall(), operator==(), jami::Resampler::resample(), jami::Resampler::resample(), jami::AudioFrameResizer::setFormat(), and toString().