2020-04-19 23:04:05 +02:00
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
2020-03-27 20:36:02 +01:00
|
|
|
// Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
2023-03-15 18:49:17 +01:00
|
|
|
// Copyright © 2022 yuzu Emulator Project (https://github.com/yuzu-emu/)
|
2020-03-27 20:36:02 +01:00
|
|
|
|
2020-02-17 20:11:59 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <services/serviceman.h>
|
2020-04-17 23:23:38 +02:00
|
|
|
|
2020-03-25 18:59:37 +01:00
|
|
|
namespace skyline {
|
2020-02-17 20:11:59 +01:00
|
|
|
namespace constant {
|
2020-09-26 07:17:57 +02:00
|
|
|
constexpr std::string_view DefaultAudioOutName{"DeviceOut"}; //!< The default audio output device name
|
2021-02-06 13:36:58 +01:00
|
|
|
}
|
2020-02-17 20:11:59 +01:00
|
|
|
|
2020-03-25 18:59:37 +01:00
|
|
|
namespace service::audio {
|
2020-02-17 20:11:59 +01:00
|
|
|
/**
|
2020-09-28 12:05:17 +02:00
|
|
|
* @brief IAudioOutManager or audout:u is used to manage audio outputs
|
|
|
|
* @url https://switchbrew.org/wiki/Audio_services#audout:u
|
2020-02-17 20:11:59 +01:00
|
|
|
*/
|
2020-03-25 18:59:37 +01:00
|
|
|
class IAudioOutManager : public BaseService {
|
|
|
|
public:
|
|
|
|
IAudioOutManager(const DeviceState &state, ServiceManager &manager);
|
2020-02-17 20:11:59 +01:00
|
|
|
|
2020-03-25 18:59:37 +01:00
|
|
|
/**
|
2020-09-28 12:05:17 +02:00
|
|
|
* @brief Returns a list of all available audio outputs
|
|
|
|
* @url https://switchbrew.org/wiki/Audio_services#ListAudioOuts
|
2020-03-25 18:59:37 +01:00
|
|
|
*/
|
2020-09-03 20:43:52 +02:00
|
|
|
Result ListAudioOuts(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
2020-03-25 18:59:37 +01:00
|
|
|
|
|
|
|
/**
|
2020-09-28 12:05:17 +02:00
|
|
|
* @brief Creates a new audoutU::IAudioOut object and returns a handle to it
|
|
|
|
* @url https://switchbrew.org/wiki/Audio_services#OpenAudioOut
|
2020-03-25 18:59:37 +01:00
|
|
|
*/
|
2020-09-03 20:43:52 +02:00
|
|
|
Result OpenAudioOut(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
2020-09-21 12:04:26 +02:00
|
|
|
|
|
|
|
SERVICE_DECL(
|
|
|
|
SFUNC(0x0, IAudioOutManager, ListAudioOuts),
|
|
|
|
SFUNC(0x1, IAudioOutManager, OpenAudioOut),
|
|
|
|
SFUNC(0x2, IAudioOutManager, ListAudioOuts),
|
|
|
|
SFUNC(0x3, IAudioOutManager, OpenAudioOut)
|
|
|
|
)
|
2020-03-25 18:59:37 +01:00
|
|
|
};
|
|
|
|
}
|
2020-02-17 20:11:59 +01:00
|
|
|
}
|