Stub audin:u

This commit is contained in:
Billy Laws 2022-06-04 19:11:57 +01:00
parent 54999957a2
commit 5d6902b3f8
4 changed files with 48 additions and 0 deletions

View File

@ -221,6 +221,7 @@ add_library(skyline SHARED
${source_DIR}/skyline/services/base_service.cpp
${source_DIR}/skyline/services/sm/IUserInterface.cpp
${source_DIR}/skyline/services/fatalsrv/IService.cpp
${source_DIR}/skyline/services/audio/IAudioInManager.cpp
${source_DIR}/skyline/services/audio/IAudioOutManager.cpp
${source_DIR}/skyline/services/audio/IAudioOut.cpp
${source_DIR}/skyline/services/audio/IAudioDevice.cpp

View File

@ -0,0 +1,15 @@
// SPDX-License-Identifier: MPL-2.0
// Copyright © 2022 Skyline Team and Contributors (https://github.com/skyline-emu/)
#include <kernel/types/KProcess.h>
#include "IAudioInManager.h"
namespace skyline::service::audio {
IAudioInManager::IAudioInManager(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager) {}
Result IAudioInManager::ListAudioIns(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
// Stub to return no available audio inputs
response.Push<u32>(0);
return {};
}
}

View File

@ -0,0 +1,30 @@
// SPDX-License-Identifier: MPL-2.0
// Copyright © 2022 Skyline Team and Contributors (https://github.com/skyline-emu/)
#pragma once
#include <services/serviceman.h>
namespace skyline {
namespace service::audio {
/**
* @brief IAudioInManager or audin:u is used to manage audio inputs
* @url https://switchbrew.org/wiki/Audio_services#audin:u
*/
class IAudioInManager : public BaseService {
public:
IAudioInManager(const DeviceState &state, ServiceManager &manager);
/**
* @url https://switchbrew.org/wiki/Audio_services#ListAudioIns
*/
Result ListAudioIns(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
SERVICE_DECL(
SFUNC(0x0, IAudioInManager, ListAudioIns),
SFUNC(0x2, IAudioInManager, ListAudioIns),
SFUNC(0x4, IAudioInManager, ListAudioIns)
)
};
}
}

View File

@ -9,6 +9,7 @@
#include "apm/IManager.h"
#include "am/IApplicationProxyService.h"
#include "am/IAllSystemAppletProxiesService.h"
#include "audio/IAudioInManager.h"
#include "audio/IAudioOutManager.h"
#include "audio/IAudioRendererManager.h"
#include "bcat/IServiceCreator.h"
@ -78,6 +79,7 @@ namespace skyline::service {
SERVICE_CASE(apm::IManager, "apm")
SERVICE_CASE(am::IApplicationProxyService, "appletOE")
SERVICE_CASE(am::IAllSystemAppletProxiesService, "appletAE")
SERVICE_CASE(audio::IAudioInManager, "audin:u")
SERVICE_CASE(audio::IAudioOutManager, "audout:u")
SERVICE_CASE(audio::IAudioRendererManager, "audren:u")
SERVICE_CASE(codec::IHardwareOpusDecoderManager, "hwopus")