|
Sunshine master
Self-hosted game stream host for Moonlight.
|
Declarations for audio capture and encoding. More...
Go to the source code of this file.
Classes | |
| struct | audio::audio_ctx_t |
| Shared audio device state used while streams are active. More... | |
| struct | audio::config_t |
| Audio capture and encoder settings for a stream. More... | |
| struct | audio::opus_stream_config_t |
| Static Opus encoder layout for one advertised audio mode. More... | |
| struct | audio::stream_params_t |
| Custom Opus channel layout supplied by configuration. More... | |
Typedefs | |
| using | audio::audio_ctx_ref_t = safe::shared_t<audio_ctx_t>::ptr_t |
| Shared mailbox reference to the global audio context. | |
| using | audio::buffer_t = util::buffer_t<std::uint8_t> |
| Byte buffer used for encoded audio packet payloads. | |
| using | audio::packet_t = std::pair<void *, buffer_t> |
| Encoded audio packet paired with platform channel metadata. | |
Enumerations | |
| enum | audio::stream_config_e : int { audio::STEREO , audio::HIGH_STEREO , audio::SURROUND51 , audio::HIGH_SURROUND51 , audio::SURROUND71 , audio::HIGH_SURROUND71 , audio::MAX_STREAM_CONFIG } |
| Supported Opus channel layouts advertised to Moonlight clients. More... | |
Functions | |
| void | audio::capture (safe::mail_t mail, config_t config, void *channel_data) |
| Run the capture loop for this backend. | |
| audio_ctx_ref_t | audio::get_audio_ctx_ref () |
| Get the reference to the audio context. | |
| bool | audio::is_audio_ctx_sink_available (const audio_ctx_t &ctx) |
| Check if the audio sink held by audio context is available. | |
Declarations for audio capture and encoding.
| enum audio::stream_config_e : int |
| void audio::capture | ( | safe::mail_t | mail, |
| config_t | config, | ||
| void * | channel_data ) |
Run the capture loop for this backend.
Capture, encode, and publish audio packets for a stream.
| Mailbox used to publish encoded audio packets. | |
| config | Audio capture and encoder settings. |
| channel_data | Platform-specific capture channel pointer. |
| audio_ctx_ref_t audio::get_audio_ctx_ref | ( | ) |
Get the reference to the audio context.
*Examples**
| bool audio::is_audio_ctx_sink_available | ( | const audio_ctx_t & | ctx | ) |
Check if the audio sink held by audio context is available.
*Examples**
| ctx | Native context object used by the operation or callback. |