2022-07-16 15:48:45 -07:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2023-06-10 20:40:39 -07:00
|
|
|
#include <memory>
|
2022-07-16 15:48:45 -07:00
|
|
|
#include <string>
|
|
|
|
#include <string_view>
|
|
|
|
#include <vector>
|
2023-06-10 20:40:39 -07:00
|
|
|
#include "common/settings_enums.h"
|
2022-07-16 15:48:45 -07:00
|
|
|
|
|
|
|
namespace AudioCore {
|
|
|
|
class AudioManager;
|
|
|
|
|
|
|
|
namespace Sink {
|
|
|
|
|
|
|
|
class Sink;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Retrieves the IDs for all available audio sinks.
|
|
|
|
*
|
|
|
|
* @return Vector of available sink names.
|
|
|
|
*/
|
2023-05-18 14:54:22 -07:00
|
|
|
std::vector<Settings::AudioEngine> GetSinkIDs();
|
2022-07-16 15:48:45 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the list of devices for a particular sink identified by the given ID.
|
|
|
|
*
|
|
|
|
* @param sink_id - Id of the sink to get devices from.
|
|
|
|
* @param capture - Get capture (input) devices, or output devices?
|
|
|
|
* @return Vector of device names.
|
|
|
|
*/
|
2023-05-18 14:54:22 -07:00
|
|
|
std::vector<std::string> GetDeviceListForSink(Settings::AudioEngine sink_id, bool capture);
|
2022-07-16 15:48:45 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates an audio sink identified by the given device ID.
|
|
|
|
*
|
|
|
|
* @param sink_id - Id of the sink to create.
|
|
|
|
* @param device_id - Name of the device to create.
|
|
|
|
* @return Pointer to the created sink.
|
|
|
|
*/
|
2023-05-18 14:54:22 -07:00
|
|
|
std::unique_ptr<Sink> CreateSinkFromID(Settings::AudioEngine sink_id, std::string_view device_id);
|
2022-07-16 15:48:45 -07:00
|
|
|
|
|
|
|
} // namespace Sink
|
|
|
|
} // namespace AudioCore
|