AudioCapture
AudioCapture
#include <icy/av/audiocapture.h>Inherits:
MediaCapture
Cross-platform audio capture device backed by FFmpeg input devices.
Public Methods
| Return | Name | Description |
|---|---|---|
AudioCapture | Construct without opening a device. Call openAudio() before start(). | |
AudioCapture | Construct and immediately open the given audio device using an AudioCodec params struct. | |
AudioCapture | Construct and immediately open the given audio device with individual parameters. | |
void | openAudio virtual | Open the given audio device using an AudioCodec params struct. |
void | openAudio virtual | Open the given audio device with individual parameters. Configures the FFmpeg input format and passes device options via AVDictionary. If the device cannot satisfy the requested parameters, resampling will be applied. |
AudioCapture
AudioCapture()Construct without opening a device. Call openAudio() before start().
AudioCapture
AudioCapture(const std::string & device, const av::AudioCodec & params)Construct and immediately open the given audio device using an AudioCodec params struct.
Parameters
deviceThe platform audio device identifier.paramsThe desired capture parameters (channels, sample rate, format).
AudioCapture
AudioCapture(const std::string & device, int channels, int sampleRate, const std::string & sampleFmt)Construct and immediately open the given audio device with individual parameters.
Parameters
deviceThe platform audio device identifier.channelsThe desired number of channels, or -1 for device default.sampleRateThe desired sample rate in Hz, or -1 for device default.sampleFmtThe desired sample format string, or "" for device default.
openAudio
virtual
virtual void openAudio(const std::string & device, const av::AudioCodec & params)Open the given audio device using an AudioCodec params struct.
Parameters
deviceThe platform audio device identifier.paramsThe desired capture parameters.
openAudio
virtual
virtual void openAudio(const std::string & device, int channels, int sampleRate, const std::string & sampleFmt)Open the given audio device with individual parameters. Configures the FFmpeg input format and passes device options via AVDictionary. If the device cannot satisfy the requested parameters, resampling will be applied.
Parameters
deviceThe platform audio device identifier.channelsThe desired number of channels, or -1 for device default.sampleRateThe desired sample rate in Hz, or -1 for device default.sampleFmtThe desired sample format string, or "" for device default.
Public Types
| Name | Description |
|---|---|
Ptr |
Ptr
std::shared_ptr< AudioCapture > Ptr()