CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
Path: blob/master/Core/HLE/sceAudioRouting.cpp
Views: 1401
// Copyright (c) 2012- PPSSPP Project.12// This program is free software: you can redistribute it and/or modify3// it under the terms of the GNU General Public License as published by4// the Free Software Foundation, version 2.0 or later versions.56// This program is distributed in the hope that it will be useful,7// but WITHOUT ANY WARRANTY; without even the implied warranty of8// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the9// GNU General Public License 2.0 for more details.1011// A copy of the GPL 2.0 should have been included with the program.12// If not, see http://www.gnu.org/licenses/1314// Official git repository and contact information can be found at15// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.1617#include "Core/HLE/HLE.h"18#include "Core/HLE/FunctionWrappers.h"19#include "Core/HLE/sceAudiocodec.h"2021enum {22AUDIO_ROUTING_SPEAKER_OFF = 0,23AUDIO_ROUTING_SPEAKER_ON = 1,24};2526u32 audioRoutingMode = AUDIO_ROUTING_SPEAKER_ON;27u32 audioRoutineVolumeMode = AUDIO_ROUTING_SPEAKER_ON;2829static int sceAudioRoutingGetMode() {30INFO_LOG(Log::sceAudio, "sceAudioRoutingGetMode");31return 0;32}3334static int sceAudioRoutingSetVolumeMode(int mode) {35INFO_LOG(Log::sceAudio, "sceAudioRoutingSetVolumeMode %d", mode);36int previousMode = audioRoutineVolumeMode;37audioRoutineVolumeMode = audioRoutingMode;38return previousMode;39}4041static int sceAudioRoutingGetVolumeMode() {42INFO_LOG(Log::sceAudio, "sceAudioRoutingGetMode");43return 0;44}4546static int sceAudioRoutingSetMode(int mode) {47INFO_LOG(Log::sceAudio, "sceAudioRoutingSetMode %d", mode);48int previousMode = audioRoutingMode;49audioRoutingMode = mode;50return previousMode;51}5253const HLEFunction sceAudioRouting[] =54{55{0X39240E7D, &WrapI_V<sceAudioRoutingGetMode>, "sceAudioRoutingGetMode", 'i', "" },56{0X28235C56, &WrapI_V<sceAudioRoutingGetVolumeMode>, "sceAudioRoutingGetVolumeMode", 'i', "" },57{0X36FD8AA9, &WrapI_I<sceAudioRoutingSetMode>, "sceAudioRoutingSetMode", 'i', "i"},58{0XBB548475, &WrapI_I<sceAudioRoutingSetVolumeMode>, "sceAudioRoutingSetVolumeMode", 'i', "i"},59};6061void Register_sceAudioRouting()62{63RegisterModule("sceAudioRouting", ARRAY_SIZE(sceAudioRouting), sceAudioRouting);64}656667