mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-03-21 17:49:58 -05:00
Added Platform checks, Incremented state ID Removed semicolon from PR version comment Riveting change Changed Remote Names and References Updated Wii remote Audio routing to only show enabled when not using passthrough adapter, enabling speaker data, and Cubeb audio backend, and show enable/disable per Remote when supported
46 lines
1021 B
C++
46 lines
1021 B
C++
// Copyright 2017 Dolphin Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <functional>
|
|
#include <memory>
|
|
#include <string>
|
|
#include <string_view>
|
|
#include <utility>
|
|
#include <vector>
|
|
|
|
#ifdef _WIN32
|
|
#include "Common/WorkQueueThread.h"
|
|
#endif
|
|
|
|
struct cubeb;
|
|
|
|
namespace CubebUtils
|
|
{
|
|
std::shared_ptr<cubeb> GetContext();
|
|
std::vector<std::pair<std::string, std::string>> ListInputDevices();
|
|
const void* GetInputDeviceById(std::string_view id);
|
|
std::vector<std::pair<std::string, std::string>> ListOutputDevices();
|
|
const void* GetOutputDeviceById(std::string_view id);
|
|
|
|
// Helper used to handle Windows COM library for cubeb WASAPI backend
|
|
class CoInitSyncWorker
|
|
{
|
|
public:
|
|
using FunctionType = std::function<void()>;
|
|
|
|
CoInitSyncWorker(std::string worker_name);
|
|
~CoInitSyncWorker();
|
|
|
|
bool Execute(FunctionType f);
|
|
|
|
#ifdef _WIN32
|
|
private:
|
|
Common::AsyncWorkThread m_work_queue;
|
|
bool m_coinit_success = false;
|
|
bool m_should_couninit = false;
|
|
#endif
|
|
};
|
|
} // namespace CubebUtils
|