mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-12 13:43:15 +00:00
Libs: libSceVoice stubs (#3022)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
* voice lib stubs Primarily for GTA V * Clang
This commit is contained in:
parent
b1af1334c9
commit
6bdd83684b
6 changed files with 265 additions and 0 deletions
|
@ -296,6 +296,8 @@ set(AJM_LIB src/core/libraries/ajm/ajm.cpp
|
|||
|
||||
set(AUDIO_LIB src/core/libraries/audio/audioin.cpp
|
||||
src/core/libraries/audio/audioin.h
|
||||
src/core/libraries/voice/voice.cpp
|
||||
src/core/libraries/voice/voice.h
|
||||
src/core/libraries/audio/audioout.cpp
|
||||
src/core/libraries/audio/audioout.h
|
||||
src/core/libraries/audio/audioout_backend.h
|
||||
|
|
|
@ -141,6 +141,7 @@ bool ParseFilterRule(Filter& instance, Iterator begin, Iterator end) {
|
|||
SUB(Lib, Camera) \
|
||||
SUB(Lib, CompanionHttpd) \
|
||||
SUB(Lib, CompanionUtil) \
|
||||
SUB(Lib, Voice) \
|
||||
CLS(Frontend) \
|
||||
CLS(Render) \
|
||||
SUB(Render, Vulkan) \
|
||||
|
|
|
@ -98,6 +98,7 @@ enum class Class : u8 {
|
|||
Lib_Fiber, ///< The LibSceFiber implementation.
|
||||
Lib_Vdec2, ///< The LibSceVideodec2 implementation.
|
||||
Lib_Videodec, ///< The LibSceVideodec implementation.
|
||||
Lib_Voice, ///< The LibSceVoice implementation.
|
||||
Lib_RazorCpu, ///< The LibRazorCpu implementation.
|
||||
Lib_Mouse, ///< The LibSceMouse implementation
|
||||
Lib_WebBrowserDialog, ///< The LibSceWebBrowserDialog implementation
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
#include "core/libraries/videodec/videodec.h"
|
||||
#include "core/libraries/videodec/videodec2.h"
|
||||
#include "core/libraries/videoout/video_out.h"
|
||||
#include "core/libraries/voice/voice.h"
|
||||
#include "core/libraries/web_browser_dialog/webbrowserdialog.h"
|
||||
#include "core/libraries/zlib/zlib_sce.h"
|
||||
#include "fiber/fiber.h"
|
||||
|
@ -128,6 +129,7 @@ void InitHLELibs(Core::Loader::SymbolsResolver* sym) {
|
|||
Libraries::Camera::RegisterlibSceCamera(sym);
|
||||
Libraries::CompanionHttpd::RegisterlibSceCompanionHttpd(sym);
|
||||
Libraries::CompanionUtil::RegisterlibSceCompanionUtil(sym);
|
||||
Libraries::Voice::RegisterlibSceVoice(sym);
|
||||
}
|
||||
|
||||
} // namespace Libraries
|
||||
|
|
203
src/core/libraries/voice/voice.cpp
Normal file
203
src/core/libraries/voice/voice.cpp
Normal file
|
@ -0,0 +1,203 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "common/logging/log.h"
|
||||
#include "core/libraries/error_codes.h"
|
||||
#include "core/libraries/libs.h"
|
||||
#include "core/libraries/voice/voice.h"
|
||||
|
||||
namespace Libraries::Voice {
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceConnectIPortToOPort() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceCreatePort() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceDeletePort() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceDisconnectIPortFromOPort() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceEnd() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceGetBitRate(u32 port_id, u32* bitrate) {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
*bitrate = 48000;
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceGetMuteFlag() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceGetPortAttr() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceGetPortInfo(u32 port_id, OrbisVoicePortInfo* info) {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
info->port_type = 0;
|
||||
info->state = 3;
|
||||
info->byte_count = 0;
|
||||
info->frame_size = 1;
|
||||
info->edge_count = 0;
|
||||
info->reserved = 0;
|
||||
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceGetResourceInfo() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceGetVolume() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceInit() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceInitHQ() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoicePausePort() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoicePausePortAll() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceReadFromOPort() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceResetPort() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceResumePort() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceResumePortAll() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceSetBitRate() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceSetMuteFlag() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceSetMuteFlagAll() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceSetThreadsParams() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceSetVolume() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceStart() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceStop() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceUpdatePort() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceVADAdjustment() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceVADSetVersion() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceWriteToIPort() {
|
||||
LOG_ERROR(Lib_Voice, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
void RegisterlibSceVoice(Core::Loader::SymbolsResolver* sym) {
|
||||
LIB_FUNCTION("oV9GAdJ23Gw", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceConnectIPortToOPort);
|
||||
LIB_FUNCTION("nXpje5yNpaE", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceCreatePort);
|
||||
LIB_FUNCTION("b7kJI+nx2hg", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceDeletePort);
|
||||
LIB_FUNCTION("ajVj3QG2um4", "libSceVoice", 1, "libSceVoice", 0, 0,
|
||||
sceVoiceDisconnectIPortFromOPort);
|
||||
LIB_FUNCTION("Oo0S5PH7FIQ", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceEnd);
|
||||
LIB_FUNCTION("cJLufzou6bc", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceGetBitRate);
|
||||
LIB_FUNCTION("Pc4z1QjForU", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceGetMuteFlag);
|
||||
LIB_FUNCTION("elcxZTEfHZM", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceGetPortAttr);
|
||||
LIB_FUNCTION("CrLqDwWLoXM", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceGetPortInfo);
|
||||
LIB_FUNCTION("Z6QV6j7igvE", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceGetResourceInfo);
|
||||
LIB_FUNCTION("jjkCjneOYSs", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceGetVolume);
|
||||
LIB_FUNCTION("9TrhuGzberQ", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceInit);
|
||||
LIB_FUNCTION("IPHvnM5+g04", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceInitHQ);
|
||||
LIB_FUNCTION("x0slGBQW+wY", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoicePausePort);
|
||||
LIB_FUNCTION("Dinob0yMRl8", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoicePausePortAll);
|
||||
LIB_FUNCTION("cQ6DGsQEjV4", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceReadFromOPort);
|
||||
LIB_FUNCTION("udAxvCePkUs", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceResetPort);
|
||||
LIB_FUNCTION("gAgN+HkiEzY", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceResumePort);
|
||||
LIB_FUNCTION("jbkJFmOZ9U0", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceResumePortAll);
|
||||
LIB_FUNCTION("TexwmOHQsDg", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceSetBitRate);
|
||||
LIB_FUNCTION("gwUynkEgNFY", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceSetMuteFlag);
|
||||
LIB_FUNCTION("oUha0S-Ij9Q", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceSetMuteFlagAll);
|
||||
LIB_FUNCTION("clyKUyi3RYU", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceSetThreadsParams);
|
||||
LIB_FUNCTION("QBFoAIjJoXQ", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceSetVolume);
|
||||
LIB_FUNCTION("54phPH2LZls", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceStart);
|
||||
LIB_FUNCTION("Ao2YNSA7-Qo", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceStop);
|
||||
LIB_FUNCTION("jSZNP7xJrcw", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceUpdatePort);
|
||||
LIB_FUNCTION("hg9T73LlRiU", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceVADAdjustment);
|
||||
LIB_FUNCTION("wFeAxEeEi-8", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceVADSetVersion);
|
||||
LIB_FUNCTION("YeJl6yDlhW0", "libSceVoice", 1, "libSceVoice", 0, 0, sceVoiceWriteToIPort);
|
||||
};
|
||||
|
||||
} // namespace Libraries::Voice
|
56
src/core/libraries/voice/voice.h
Normal file
56
src/core/libraries/voice/voice.h
Normal file
|
@ -0,0 +1,56 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common/types.h"
|
||||
|
||||
namespace Core::Loader {
|
||||
class SymbolsResolver;
|
||||
}
|
||||
|
||||
namespace Libraries::Voice {
|
||||
|
||||
struct OrbisVoicePortInfo {
|
||||
s32 port_type;
|
||||
s32 state;
|
||||
u32* edge;
|
||||
u32 byte_count;
|
||||
u32 frame_size;
|
||||
u16 edge_count;
|
||||
u16 reserved;
|
||||
};
|
||||
|
||||
s32 PS4_SYSV_ABI sceVoiceConnectIPortToOPort();
|
||||
s32 PS4_SYSV_ABI sceVoiceCreatePort();
|
||||
s32 PS4_SYSV_ABI sceVoiceDeletePort();
|
||||
s32 PS4_SYSV_ABI sceVoiceDisconnectIPortFromOPort();
|
||||
s32 PS4_SYSV_ABI sceVoiceEnd();
|
||||
s32 PS4_SYSV_ABI sceVoiceGetBitRate(u32 port_id, u32* bitrate);
|
||||
s32 PS4_SYSV_ABI sceVoiceGetMuteFlag();
|
||||
s32 PS4_SYSV_ABI sceVoiceGetPortAttr();
|
||||
s32 PS4_SYSV_ABI sceVoiceGetPortInfo(u32 port_id, OrbisVoicePortInfo* info);
|
||||
s32 PS4_SYSV_ABI sceVoiceGetResourceInfo();
|
||||
s32 PS4_SYSV_ABI sceVoiceGetVolume();
|
||||
s32 PS4_SYSV_ABI sceVoiceInit();
|
||||
s32 PS4_SYSV_ABI sceVoiceInitHQ();
|
||||
s32 PS4_SYSV_ABI sceVoicePausePort();
|
||||
s32 PS4_SYSV_ABI sceVoicePausePortAll();
|
||||
s32 PS4_SYSV_ABI sceVoiceReadFromOPort();
|
||||
s32 PS4_SYSV_ABI sceVoiceResetPort();
|
||||
s32 PS4_SYSV_ABI sceVoiceResumePort();
|
||||
s32 PS4_SYSV_ABI sceVoiceResumePortAll();
|
||||
s32 PS4_SYSV_ABI sceVoiceSetBitRate();
|
||||
s32 PS4_SYSV_ABI sceVoiceSetMuteFlag();
|
||||
s32 PS4_SYSV_ABI sceVoiceSetMuteFlagAll();
|
||||
s32 PS4_SYSV_ABI sceVoiceSetThreadsParams();
|
||||
s32 PS4_SYSV_ABI sceVoiceSetVolume();
|
||||
s32 PS4_SYSV_ABI sceVoiceStart();
|
||||
s32 PS4_SYSV_ABI sceVoiceStop();
|
||||
s32 PS4_SYSV_ABI sceVoiceUpdatePort();
|
||||
s32 PS4_SYSV_ABI sceVoiceVADAdjustment();
|
||||
s32 PS4_SYSV_ABI sceVoiceVADSetVersion();
|
||||
s32 PS4_SYSV_ABI sceVoiceWriteToIPort();
|
||||
|
||||
void RegisterlibSceVoice(Core::Loader::SymbolsResolver* sym);
|
||||
} // namespace Libraries::Voice
|
Loading…
Add table
Add a link
Reference in a new issue