#include <icy/av/audiocapture.h>Inherits:
MediaCapture
Cross-platform audio capture device backed by FFmpeg input devices.
| 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()Construct without opening a device. Call openAudio() before start().
AudioCapture(const std::string & device, const av::AudioCodec & params)Construct and immediately open the given audio device using an AudioCodec params struct.
device The platform audio device identifier.
params The desired capture parameters (channels, sample rate, format).
AudioCapture(const std::string & device, int channels, int sampleRate, const std::string & sampleFmt)Construct and immediately open the given audio device with individual parameters.
device The platform audio device identifier.
channels The desired number of channels, or -1 for device default.
sampleRate The desired sample rate in Hz, or -1 for device default.
sampleFmt The desired sample format string, or "" for device default.
virtual
virtual void openAudio(const std::string & device, const av::AudioCodec & params)Open the given audio device using an AudioCodec params struct.
device The platform audio device identifier.
params The desired capture parameters.
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.
device The platform audio device identifier.
channels The desired number of channels, or -1 for device default.
sampleRate The desired sample rate in Hz, or -1 for device default.
sampleFmt The desired sample format string, or "" for device default.
| Name | Description |
|---|---|
Ptr |
std::shared_ptr< AudioCapture > Ptr()