mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-23 06:51:52 +01:00
Extend the IAudioController implementation with volume stubs
This is used by ARMS.
This commit is contained in:
parent
4cd7502df2
commit
3734599615
@ -5,5 +5,21 @@
|
||||
|
||||
namespace skyline::service::am {
|
||||
IAudioController::IAudioController(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager, Service::am_IAudioController, "am:IAudioController", {
|
||||
{0x0, SFUNC(IAudioController::SetExpectedMasterVolume)},
|
||||
{0x1, SFUNC(IAudioController::GetMainAppletExpectedMasterVolume)},
|
||||
{0x2, SFUNC(IAudioController::GetLibraryAppletExpectedMasterVolume)}
|
||||
}) {}
|
||||
|
||||
void IAudioController::SetExpectedMasterVolume(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
mainAppletVolume = request.Pop<float>();
|
||||
libraryAppletVolume = request.Pop<float>();
|
||||
}
|
||||
|
||||
void IAudioController::GetMainAppletExpectedMasterVolume(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
response.Push<float>(mainAppletVolume);
|
||||
}
|
||||
|
||||
void IAudioController::GetLibraryAppletExpectedMasterVolume(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
response.Push<float>(libraryAppletVolume);
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,26 @@ namespace skyline::service::am {
|
||||
* @brief This has functions relating to volume control (https://switchbrew.org/wiki/Applet_Manager_services#IAudioController)
|
||||
*/
|
||||
class IAudioController : public BaseService {
|
||||
private:
|
||||
float mainAppletVolume{1.0f}; //!< The volume that is expected to be used for the main applet
|
||||
float libraryAppletVolume{1.0f}; //!< The volume that is expected to be used for the library applet
|
||||
|
||||
public:
|
||||
IAudioController(const DeviceState &state, ServiceManager &manager);
|
||||
|
||||
/**
|
||||
* @brief This sets the expected volumes for an application (https://switchbrew.org/wiki/Applet_Manager_services#SetExpectedMasterVolume)
|
||||
*/
|
||||
void SetExpectedMasterVolume(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
/**
|
||||
* @brief This returns the main applet volume that is expected by the application (https://switchbrew.org/wiki/Applet_Manager_services#GetMainAppletExpectedMasterVolume)
|
||||
*/
|
||||
void GetMainAppletExpectedMasterVolume(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
/**
|
||||
* @brief This returns the library applet volume that is expected by the application (https://switchbrew.org/wiki/Applet_Manager_services#GetLibraryAppletExpectedMasterVolume)
|
||||
*/
|
||||
void GetLibraryAppletExpectedMasterVolume(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user