Platform audio controller that manages sinks and microphone capture.
More...
#include <src/platform/common.h>
|
| virtual bool | is_sink_available (const std::string &sink)=0 |
| | Check if the audio sink is available in the system.
|
| virtual std::unique_ptr< mic_t > | microphone (const std::uint8_t *mapping, int channels, std::uint32_t sample_rate, std::uint32_t frame_size, bool continuous, bool host_audio_enabled)=0 |
| | Create a microphone capture stream for the requested layout.
|
| virtual int | set_sink (const std::string &sink)=0 |
| | Update the sink value on the backend.
|
| virtual std::optional< sink_t > | sink_info ()=0 |
| | Query host and virtual sink names available to Sunshine.
|
| virtual | ~audio_control_t ()=default |
| | Destroy the audio control.
|
Platform audio controller that manages sinks and microphone capture.
◆ ~audio_control_t()
| virtual platf::audio_control_t::~audio_control_t |
( |
| ) |
|
|
virtualdefault |
◆ is_sink_available()
| virtual bool platf::audio_control_t::is_sink_available |
( |
const std::string & | sink | ) |
|
|
pure virtual |
◆ microphone()
| virtual std::unique_ptr< mic_t > platf::audio_control_t::microphone |
( |
const std::uint8_t * | mapping, |
|
|
int | channels, |
|
|
std::uint32_t | sample_rate, |
|
|
std::uint32_t | frame_size, |
|
|
bool | continuous, |
|
|
bool | host_audio_enabled ) |
|
pure virtual |
Create a microphone capture stream for the requested layout.
- Parameters
-
| mapping | Opus channel mapping table for the requested layout. |
| channels | Number of audio channels in the stream. |
| sample_rate | Audio sample rate in hertz. |
| frame_size | Number of samples captured per audio frame. |
| continuous | Whether silent audio should continue to be emitted. |
| host_audio_enabled | Whether host playback should remain enabled during capture. |
- Returns
- Microphone capture object for the requested audio layout.
Implemented in platf::audio::audio_control_t, platf::macos_audio_control_t, and platf::pa::server_t.
◆ set_sink()
| virtual int platf::audio_control_t::set_sink |
( |
const std::string & | sink | ) |
|
|
pure virtual |
◆ sink_info()
| virtual std::optional< sink_t > platf::audio_control_t::sink_info |
( |
| ) |
|
|
pure virtual |
The documentation for this class was generated from the following file: