Skip to content

voice: Return ORBIS_FAIL in sceVoiceReadFromOPort to fix BO3 hang - #4792

Open
Modified17 wants to merge 1 commit into
shadps4-emu:mainfrom
Modified17:main
Open

voice: Return ORBIS_FAIL in sceVoiceReadFromOPort to fix BO3 hang#4792
Modified17 wants to merge 1 commit into
shadps4-emu:mainfrom
Modified17:main

Conversation

@Modified17

Copy link
Copy Markdown

Fixes a startup hang in BO3 where the game gets stuck polling for microphone input. Returning ORBIS_FAIL bypasses the loop.

With this fix, BO3 successfully reaches in-game (tested via null gpu).

s32 PS4_SYSV_ABI sceVoiceReadFromOPort() {
LOG_ERROR(Lib_Voice, "(STUBBED) called");
return ORBIS_OK;
return ORBIS_FAIL;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's probably a better error code to use here, libraries don't usually return the value ORBIS_FAIL.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe test this 0x804e0801 = The voice library has not been initialized.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd argue a not-initialized error is probably just as inaccurate. For a stub error code, probably best to do 0x804E0803 (ORBIS_VOICE_ERROR_GENERAL) or 0x804E0808 (ORBIS_VOICE_ERROR_RESOURCE_INSUFFICIENT).
Best solution would be testing the function to see how it behaves when there's no data to read, and stubbing whatever that behavior is. I can do that myself if needed.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

int sceVoiceReadFromOPort(
uint32_t ops,
void *data,
uint32_t *size
); maybe you can just *size=0;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants