mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-01 03:57:17 +01:00
pspautotests audio/sceaudio/input and audio/sceaudio/routing. - sceAudioInput fails until sceAudioInputInit, then checks that the sample count is a nonzero multiple of 64 before checking the rate (11025, 22050 or 44100 only). A rate of 0 now gets the PSP's error instead of the USB mic's. Init takes about 3ms. - A blocking mic input woke with the byte count rather than the sample count that the non-blocking call returns. - The routing functions are exported by both sceAudio and sceAudioRouting, and the latter had its own copy that ignored the stored modes. Both now share the one in sceAudio, with the ranges checked. SetVolumeMode returns 0, not the previous mode, and both modes start at 0. sceAudio's savestate section goes to version 5 for the input init flag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
34 lines
1.4 KiB
C++
34 lines
1.4 KiB
C++
// Copyright (c) 2012- PPSSPP Project.
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, version 2.0 or later versions.
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
// Official git repository and contact information can be found at
|
|
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
|
|
|
#include "Core/HLE/HLE.h"
|
|
#include "Core/HLE/FunctionWrappers.h"
|
|
#include "Core/HLE/sceAudio.h"
|
|
|
|
const HLEFunction sceAudioRouting[] =
|
|
{
|
|
{0X39240E7D, &WrapI_V<sceAudioRoutingGetMode>, "sceAudioRoutingGetMode", 'i', "" },
|
|
{0X28235C56, &WrapI_V<sceAudioRoutingGetVolumeMode>, "sceAudioRoutingGetVolumeMode", 'i', "" },
|
|
{0X36FD8AA9, &WrapI_I<sceAudioRoutingSetMode>, "sceAudioRoutingSetMode", 'i', "i"},
|
|
{0XBB548475, &WrapI_I<sceAudioRoutingSetVolumeMode>, "sceAudioRoutingSetVolumeMode", 'i', "i"},
|
|
};
|
|
|
|
void Register_sceAudioRouting()
|
|
{
|
|
RegisterHLEModule("sceAudioRouting", ARRAY_SIZE(sceAudioRouting), sceAudioRouting);
|
|
}
|