|
Sunshine master
Self-hosted game stream host for Moonlight.
|
Platform audio controller that manages sinks and microphone capture. More...
#include <src/platform/common.h>
Public Member Functions | |
| 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.
|
virtualdefault |
Destroy the audio control.
Reimplemented in platf::audio::audio_control_t.
|
pure virtual |
Check if the audio sink is available in the system.
| sink | Sink to be checked. |
Implemented in platf::audio::audio_control_t, platf::macos_audio_control_t, and platf::pa::server_t.
|
pure virtual |
Create a microphone capture stream for the requested layout.
| 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. |
Implemented in platf::audio::audio_control_t, platf::macos_audio_control_t, and platf::pa::server_t.
|
pure virtual |
Update the sink value on the backend.
| sink | Audio sink name to route or capture. |
Implemented in platf::audio::audio_control_t, platf::macos_audio_control_t, and platf::pa::server_t.
|
pure virtual |
Query host and virtual sink names available to Sunshine.
Implemented in platf::audio::audio_control_t, platf::macos_audio_control_t, and platf::pa::server_t.