mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 06:26:49 +00:00
[orbis-kernel] AudioOut: refactoring
This commit is contained in:
parent
8f0a90d24b
commit
3d8cc28acd
4 changed files with 249 additions and 276 deletions
|
|
@ -239,7 +239,6 @@ struct StackWriter {
|
|||
};
|
||||
|
||||
static bool g_traceSyscalls = false;
|
||||
static bool g_enableAudio = false;
|
||||
static const char *getSyscallName(orbis::Thread *thread, int sysno) {
|
||||
auto sysvec = thread->tproc->sysent;
|
||||
|
||||
|
|
@ -342,9 +341,6 @@ static int ps4Exec(orbis::Thread *mainThread,
|
|||
rx::vfs::mount("/dev/rng", createRngCharacterDevice());
|
||||
rx::vfs::mount("/dev/sbl_srv", createSblSrvCharacterDevice());
|
||||
rx::vfs::mount("/dev/ajm", createAjmCharacterDevice());
|
||||
if (g_enableAudio) {
|
||||
rx::vfs::mount("/dev/audioHack", createNullCharacterDevice());
|
||||
}
|
||||
|
||||
orbis::Ref<orbis::File> stdinFile;
|
||||
orbis::Ref<orbis::File> stdoutFile;
|
||||
|
|
@ -531,6 +527,8 @@ int main(int argc, const char *argv[]) {
|
|||
setupSigHandlers();
|
||||
rx::vfs::initialize();
|
||||
|
||||
bool enableAudio = false;
|
||||
|
||||
int argIndex = 1;
|
||||
while (argIndex < argc) {
|
||||
if (argv[argIndex] == std::string_view("--mount") ||
|
||||
|
|
@ -575,7 +573,7 @@ int main(int argc, const char *argv[]) {
|
|||
if (argv[argIndex] == std::string_view("--enable-audio") ||
|
||||
argv[argIndex] == std::string_view("-a")) {
|
||||
argIndex++;
|
||||
g_enableAudio = true;
|
||||
enableAudio = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -591,6 +589,10 @@ int main(int argc, const char *argv[]) {
|
|||
rx::vm::initialize();
|
||||
runRpsxGpu();
|
||||
|
||||
if (enableAudio) {
|
||||
orbis::g_context.audioOut = orbis::knew<orbis::AudioOut>();
|
||||
}
|
||||
|
||||
// rx::vm::printHostStats();
|
||||
auto initProcess = orbis::g_context.createProcess(10);
|
||||
pthread_setname_np(pthread_self(), "10.MAINTHREAD");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue