mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-23 13:01:50 +01:00
Zero-Fill IAudioRenderer::RequestUpdate
Output Buffer
Some titles don't clear the output buffer prior to submission, as the service is expected to fill all of it in, our audren implementation is incomplete and doesn't end up doing this leaving the contents of the buffer to be undefined leading to UB in the form of SEGFAULTs or the application throwing a fatal error. This has been patched over by 0-filling the buffer which is a sane default value for the fields that aren't filled in albeit not a replacement for a proper audren implementation.
This commit is contained in:
parent
1f3519e6e3
commit
df64ff5d14
@ -94,6 +94,7 @@ namespace skyline::service::audio::IAudioRenderer {
|
||||
outputHeader.elapsedFrameCountInfoSize;
|
||||
|
||||
auto output{request.outputBuf.at(0).data()};
|
||||
std::memset(output, 0, request.outputBuf.at(0).size());
|
||||
|
||||
*reinterpret_cast<UpdateDataHeader *>(output) = outputHeader;
|
||||
output += sizeof(UpdateDataHeader);
|
||||
|
Loading…
Reference in New Issue
Block a user