|
Sunshine master
Self-hosted game stream host for Moonlight.
|
Definitions for Windows audio capture. More...
#include <format>#include <Audioclient.h>#include <avrt.h>#include <mmdeviceapi.h>#include <newdev.h>#include <roapi.h>#include <synchapi.h>#include "src/config.h"#include "src/logging.h"#include "src/platform/common.h"#include "utf_utils.h"#include "PolicyConfig.h"Classes | |
| class | platf::audio::audio_control_t |
| Platform audio controller that manages sinks and microphone capture. More... | |
| class | platf::audio::audio_notification_t |
| Windows audio endpoint notification callback registered with MMDevice. More... | |
| class | platf::audio::co_init_t |
| Initializes COM for the current thread and uninitializes it on exit. More... | |
| struct | platf::audio::format_t |
| Windows audio format details selected for capture. More... | |
| class | platf::audio::mic_wasapi_t |
| WASAPI microphone capture stream and endpoint notification state. More... | |
| class | platf::audio::prop_var_t |
| RAII wrapper that initializes and clears a Windows PROPVARIANT. More... | |
Typedefs | |
| using | platf::audio::audio_capture_t = util::safe_ptr<IAudioCaptureClient, Release<IAudioCaptureClient>> |
| COM pointer to the WASAPI capture client interface. | |
| using | platf::audio::audio_client_t = util::safe_ptr<IAudioClient, Release<IAudioClient>> |
| COM pointer to the WASAPI audio client interface. | |
| using | platf::audio::collection_t = util::safe_ptr<IMMDeviceCollection, Release<IMMDeviceCollection>> |
| COM pointer to a collection of Windows audio endpoint devices. | |
| using | platf::audio::device_enum_t = util::safe_ptr<IMMDeviceEnumerator, Release<IMMDeviceEnumerator>> |
| COM device enumerator pointer for WASAPI endpoint discovery. | |
| using | platf::audio::device_t = util::safe_ptr<IMMDevice, Release<IMMDevice>> |
| COM pointer to a Windows audio endpoint device. | |
| using | platf::audio::handle_t = util::safe_ptr_v2<void, BOOL, CloseHandle> |
Windows HANDLE wrapper closed with CloseHandle. | |
| using | platf::audio::policy_t = util::safe_ptr<IPolicyConfig, Release<IPolicyConfig>> |
| COM pointer to the Windows policy configuration interface. | |
| using | platf::audio::prop_t = util::safe_ptr<IPropertyStore, Release<IPropertyStore>> |
| COM pointer to a Windows property store. | |
| using | platf::audio::wave_format_t = util::safe_ptr<WAVEFORMATEX, co_task_free<WAVEFORMATEX>> |
| CoTaskMem-allocated WAVEFORMATEX pointer. | |
| using | platf::audio::wstring_t = util::safe_ptr<WCHAR, co_task_free<WCHAR>> |
| CoTaskMem-allocated wide string pointer. | |
Functions | |
| std::unique_ptr< audio_control_t > | platf::audio_control () |
| Create the platform audio controller. | |
| template<class T > | |
| void | platf::audio::co_task_free (T *p) |
| Free memory allocated by COM task APIs. | |
| device_t | platf::audio::default_device (device_enum_t &device_enum) |
| Query the default Windows render endpoint. | |
| int | platf::dxgi::init () |
| Initialize the Windows audio-control backend. | |
| std::unique_ptr< deinit_t > | platf::init () |
| Initialize the platform-specific high precision timer. | |
| audio_client_t | platf::audio::make_audio_client (device_t &device, const format_t &format) |
| Create audio client. | |
| template<class T > | |
| void | platf::audio::Release (T *p) |
| Release the COM or platform reference owned by the pointer. | |
Variables | |
| const std::array< const format_t, 3 > | platf::audio::formats |
| Formats. | |
| const PROPERTYKEY | PKEY_Device_DeviceDesc |
| Property key for a device description. | |
| const PROPERTYKEY | PKEY_Device_FriendlyName |
| Property key for a device friendly name. | |
| const PROPERTYKEY | PKEY_DeviceInterface_FriendlyName |
| Property key for a device interface friendly name. | |
Definitions for Windows audio capture.
| std::unique_ptr< audio_control_t > platf::audio_control | ( | ) |
Create the platform audio controller.
| void platf::audio::co_task_free | ( | T * | p | ) |
Free memory allocated by COM task APIs.
| p | Pointer passed to the deleter or conversion helper. |
| device_t platf::audio::default_device | ( | device_enum_t & | device_enum | ) |
Query the default Windows render endpoint.
| device_enum | Windows multimedia device enumerator. |
| int platf::dxgi::init | ( | ) |
Initialize the Windows audio-control backend.
Initialize global D3D11 desktop duplication support.
|
nodiscard |
Initialize the platform-specific high precision timer.
Initialize the Linux high-precision timer file descriptor.
Create audio client.
| device | D3D, audio, or platform device used by the operation. |
| format | Pixel, audio, or protocol format being converted. |
| void platf::audio::Release | ( | T * | p | ) |
Release the COM or platform reference owned by the pointer.
| p | Pointer passed to the deleter or conversion helper. |
| const std::array<const format_t, 3> platf::audio::formats |
Formats.