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, device_t capture_device) |
| | 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.
|
| void | select_capture_device (device_t capture_device) |
| | Select the endpoint used by this capture stream.
|
|
|
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.
|
|
bool | follows_default_device |
| | Whether capture follows the default render device rather than an explicit sink.
|
|
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, |
|
|
device_t | capture_device ) |
|
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. |
| capture_device | Endpoint device to capture from; the default render device is used when empty. |
- 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.
◆ select_capture_device()
| void platf::audio::mic_wasapi_t::select_capture_device |
( |
device_t | capture_device | ) |
|
|
inline |
Select the endpoint used by this capture stream.
- Parameters
-
| capture_device | Explicit endpoint to capture, or an empty pointer to follow the default endpoint. |
The documentation for this class was generated from the following file: