WASAPI microphone capture stream and endpoint notification state.
More...
|
| int | init (std::uint32_t sample_rate, std::uint32_t frame_size, std::uint32_t channels_out, bool continuous) |
| | Initialize WASAPI capture for the selected audio endpoint.
|
| |
| capture_e | sample (std::vector< float > &sample_out) override |
| | Deliver a captured audio sample to Sunshine's audio pipeline.
|
| |
|
|
audio_capture_t | audio_capture |
| | WASAPI capture client used to read sample packets.
|
| |
|
audio_client_t | audio_client |
| | WASAPI audio client configured for shared-mode capture.
|
| |
|
handle_t | audio_event |
| | Event signaled by WASAPI when captured audio is available.
|
| |
|
int | channels |
| | Number of channels in the capture format.
|
| |
|
bool | continuous_audio |
| | Whether audio packets continue during silence.
|
| |
|
std::optional< std::function< void()> > | default_endpt_changed_cb |
| | Callback invoked when the default endpoint changes.
|
| |
|
REFERENCE_TIME | default_latency_ms |
| | WASAPI default device period used as capture latency.
|
| |
|
device_t | device |
| | WASAPI endpoint device selected for capture.
|
| |
|
device_enum_t | device_enum |
| | Device enum.
|
| |
|
audio_notification_t | endpt_notification |
| | Endpoint notification callback registered with Windows.
|
| |
|
HANDLE | mmcss_task_handle = nullptr |
| | MMCSS task handle for the audio capture thread.
|
| |
|
util::buffer_t< float > | sample_buf |
| | Floating-point sample buffer filled from WASAPI packets.
|
| |
|
float * | sample_buf_pos |
| | Current write position in sample_buf.
|
| |
WASAPI microphone capture stream and endpoint notification state.
◆ init()
| int platf::audio::mic_wasapi_t::init |
( |
std::uint32_t | sample_rate, |
|
|
std::uint32_t | frame_size, |
|
|
std::uint32_t | channels_out, |
|
|
bool | continuous ) |
|
inline |
Initialize WASAPI capture for the selected audio endpoint.
- Parameters
-
| sample_rate | Audio sample rate in hertz. |
| frame_size | Number of samples captured per audio frame. |
| channels_out | Channels out. |
| continuous | Whether silent audio should continue to be emitted. |
- Returns
- 0 on success; nonzero or negative platform status on failure.
◆ sample()
| capture_e platf::audio::mic_wasapi_t::sample |
( |
std::vector< float > & | sample_out | ) |
|
|
inlineoverridevirtual |
Deliver a captured audio sample to Sunshine's audio pipeline.
- Parameters
-
- Returns
- Capture status reported to the streaming pipeline.
Implements platf::mic_t.
The documentation for this class was generated from the following file: