diff options
| author | 2021-07-03 00:24:33 -0700 | |
|---|---|---|
| committer | 2021-07-03 00:24:33 -0700 | |
| commit | 2fc0a760f09c4557d476204ef558743e6f42bd71 (patch) | |
| tree | 87be7a47b82b30d3a2805f47a77b72ef28805af6 /src/core | |
| parent | Merge pull request #6459 from lat9nq/ubuntu-fixes (diff) | |
| parent | Fix XC2/VOEZ crashing, add audio looping and a few misc fixes (diff) | |
| download | yuzu-2fc0a760f09c4557d476204ef558743e6f42bd71.tar.gz yuzu-2fc0a760f09c4557d476204ef558743e6f42bd71.tar.xz yuzu-2fc0a760f09c4557d476204ef558743e6f42bd71.zip | |
Merge pull request #6498 from Kelebek1/Audio
[audio_core] Decouple audio update and processing, and process at variable rate
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/hle/service/audio/audren_u.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp index 800feba6e..7583d68b2 100644 --- a/src/core/hle/service/audio/audren_u.cpp +++ b/src/core/hle/service/audio/audren_u.cpp | |||
| @@ -96,7 +96,7 @@ private: | |||
| 96 | void RequestUpdateImpl(Kernel::HLERequestContext& ctx) { | 96 | void RequestUpdateImpl(Kernel::HLERequestContext& ctx) { |
| 97 | LOG_DEBUG(Service_Audio, "(STUBBED) called"); | 97 | LOG_DEBUG(Service_Audio, "(STUBBED) called"); |
| 98 | 98 | ||
| 99 | std::vector<u8> output_params(ctx.GetWriteBufferSize()); | 99 | std::vector<u8> output_params(ctx.GetWriteBufferSize(), 0); |
| 100 | auto result = renderer->UpdateAudioRenderer(ctx.ReadBuffer(), output_params); | 100 | auto result = renderer->UpdateAudioRenderer(ctx.ReadBuffer(), output_params); |
| 101 | 101 | ||
| 102 | if (result.IsSuccess()) { | 102 | if (result.IsSuccess()) { |
| @@ -110,17 +110,19 @@ private: | |||
| 110 | void Start(Kernel::HLERequestContext& ctx) { | 110 | void Start(Kernel::HLERequestContext& ctx) { |
| 111 | LOG_WARNING(Service_Audio, "(STUBBED) called"); | 111 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 112 | 112 | ||
| 113 | IPC::ResponseBuilder rb{ctx, 2}; | 113 | const auto result = renderer->Start(); |
| 114 | 114 | ||
| 115 | rb.Push(ResultSuccess); | 115 | IPC::ResponseBuilder rb{ctx, 2}; |
| 116 | rb.Push(result); | ||
| 116 | } | 117 | } |
| 117 | 118 | ||
| 118 | void Stop(Kernel::HLERequestContext& ctx) { | 119 | void Stop(Kernel::HLERequestContext& ctx) { |
| 119 | LOG_WARNING(Service_Audio, "(STUBBED) called"); | 120 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 120 | 121 | ||
| 121 | IPC::ResponseBuilder rb{ctx, 2}; | 122 | const auto result = renderer->Stop(); |
| 122 | 123 | ||
| 123 | rb.Push(ResultSuccess); | 124 | IPC::ResponseBuilder rb{ctx, 2}; |
| 125 | rb.Push(result); | ||
| 124 | } | 126 | } |
| 125 | 127 | ||
| 126 | void QuerySystemEvent(Kernel::HLERequestContext& ctx) { | 128 | void QuerySystemEvent(Kernel::HLERequestContext& ctx) { |