mirror of
https://github.com/starr-dusT/citra.git
synced 2024-10-02 10:26:17 -07:00

* misc: Improve backend defaults for macOS. * audio_core: Improve handling of missing audio backends.
48 lines
1.1 KiB
C++
48 lines
1.1 KiB
C++
// Copyright 2023 Citra Emulator Project
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
#include <string_view>
|
|
#include <vector>
|
|
#include "common/common_types.h"
|
|
|
|
namespace AudioCore {
|
|
|
|
class Input;
|
|
|
|
enum class InputType : u32 {
|
|
Auto = 0,
|
|
Null = 1,
|
|
Static = 2,
|
|
Cubeb = 3,
|
|
OpenAL = 4,
|
|
};
|
|
|
|
struct InputDetails {
|
|
using FactoryFn = std::unique_ptr<Input> (*)(std::string_view device_id);
|
|
using ListDevicesFn = std::vector<std::string> (*)();
|
|
|
|
/// Type of this input.
|
|
InputType type;
|
|
/// Name for this input.
|
|
std::string_view name;
|
|
/// Whether the input is backed by real devices.
|
|
bool real;
|
|
/// A method to call to construct an instance of this type of input.
|
|
FactoryFn create_input;
|
|
/// A method to call to list available devices.
|
|
ListDevicesFn list_devices;
|
|
};
|
|
|
|
/// Lists all available input types.
|
|
std::vector<InputDetails> ListInputs();
|
|
|
|
/// Gets the details of an input type.
|
|
const InputDetails& GetInputDetails(InputType input_type);
|
|
|
|
} // namespace AudioCore
|