blob: 2a0d202a78c653d323f6af58706c346814645e46 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
// Copyright 2016 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 Sink;
enum class SinkType : u32 {
Auto = 0,
Null = 1,
Cubeb = 2,
OpenAL = 3,
SDL2 = 4,
};
struct SinkDetails {
using FactoryFn = std::unique_ptr<Sink> (*)(std::string_view);
using ListDevicesFn = std::vector<std::string> (*)();
/// Type of this sink.
SinkType type;
/// Name for this sink.
std::string_view name;
/// A method to call to construct an instance of this type of sink.
FactoryFn create_sink;
/// A method to call to list available devices.
ListDevicesFn list_devices;
};
/// Lists all available sink types.
std::vector<SinkDetails> ListSinks();
/// Gets the details of an sink type.
const SinkDetails& GetSinkDetails(SinkType input_type);
} // namespace AudioCore
|