early-access version 2919
This commit is contained in:
parent
9220ce43e4
commit
ff1775218e
2 changed files with 22 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 2918.
|
This is the source code for early-access 2919.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ public:
|
||||||
{7, &IAudioRenderer::QuerySystemEvent, "QuerySystemEvent"},
|
{7, &IAudioRenderer::QuerySystemEvent, "QuerySystemEvent"},
|
||||||
{8, &IAudioRenderer::SetRenderingTimeLimit, "SetRenderingTimeLimit"},
|
{8, &IAudioRenderer::SetRenderingTimeLimit, "SetRenderingTimeLimit"},
|
||||||
{9, &IAudioRenderer::GetRenderingTimeLimit, "GetRenderingTimeLimit"},
|
{9, &IAudioRenderer::GetRenderingTimeLimit, "GetRenderingTimeLimit"},
|
||||||
{10, nullptr, "RequestUpdateAuto"},
|
{10, &IAudioRenderer::RequestUpdate, "RequestUpdateAuto"},
|
||||||
{11, nullptr, "ExecuteAudioRendererRendering"},
|
{11, nullptr, "ExecuteAudioRendererRendering"},
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
@ -113,15 +113,30 @@ private:
|
||||||
|
|
||||||
// These buffers are written manually to avoid an issue with WriteBuffer throwing errors for
|
// These buffers are written manually to avoid an issue with WriteBuffer throwing errors for
|
||||||
// checking size 0. Performance size is 0 for most games.
|
// checking size 0. Performance size is 0 for most games.
|
||||||
const auto buffers{ctx.BufferDescriptorB()};
|
|
||||||
std::vector<u8> output(buffers[0].Size(), 0);
|
std::vector<u8> output{};
|
||||||
std::vector<u8> performance(buffers[1].Size(), 0);
|
std::vector<u8> performance{};
|
||||||
|
auto is_buffer_b{ctx.BufferDescriptorB()[0].Size() != 0};
|
||||||
|
if (is_buffer_b) {
|
||||||
|
const auto buffersB{ctx.BufferDescriptorB()};
|
||||||
|
output.resize(buffersB[0].Size(), 0);
|
||||||
|
performance.resize(buffersB[1].Size(), 0);
|
||||||
|
} else {
|
||||||
|
const auto buffersC{ctx.BufferDescriptorC()};
|
||||||
|
output.resize(buffersC[0].Size(), 0);
|
||||||
|
performance.resize(buffersC[1].Size(), 0);
|
||||||
|
}
|
||||||
|
|
||||||
auto result = impl->RequestUpdate(input, performance, output);
|
auto result = impl->RequestUpdate(input, performance, output);
|
||||||
|
|
||||||
if (result.IsSuccess()) {
|
if (result.IsSuccess()) {
|
||||||
ctx.WriteBufferB(output.data(), output.size(), 0);
|
if (is_buffer_b) {
|
||||||
ctx.WriteBufferB(performance.data(), performance.size(), 1);
|
ctx.WriteBufferB(output.data(), output.size(), 0);
|
||||||
|
ctx.WriteBufferB(performance.data(), performance.size(), 1);
|
||||||
|
} else {
|
||||||
|
ctx.WriteBufferC(output.data(), output.size(), 0);
|
||||||
|
ctx.WriteBufferC(performance.data(), performance.size(), 1);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(Service_Audio, "RequestUpdate failed error 0x{:02X}!", result.description);
|
LOG_ERROR(Service_Audio, "RequestUpdate failed error 0x{:02X}!", result.description);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue