![]() |
Sunshine latest
Self-hosted game stream host for Moonlight.
|
Definitions for audio capture and encoding. More...
#include <thread>
#include <opus/opus_multistream.h>
#include "audio.h"
#include "config.h"
#include "globals.h"
#include "logging.h"
#include "platform/common.h"
#include "thread_safe.h"
#include "utility.h"
Typedefs | |
using | audio::opus_t = util::safe_ptr<OpusMSEncoder, opus_multistream_encoder_destroy> |
using | audio::sample_queue_t = std::shared_ptr<safe::queue_t<std::vector<float>>> |
Functions | |
void | audio::capture (safe::mail_t mail, config_t config, void *channel_data) |
void | audio::encodeThread (sample_queue_t samples, config_t config, void *channel_data) |
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. | |
int | audio::map_stream (int channels, bool quality) |
Variables | |
constexpr auto | audio::SAMPLE_RATE = 48000 |
opus_stream_config_t | audio::stream_configs [MAX_STREAM_CONFIG] |
Definitions for audio capture and encoding.
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