summaryrefslogtreecommitdiffstats
path: root/src/audio_core/opus/hardware_opus.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2024-02-23 17:34:21 +0100
committerGitHub <noreply@github.com>2024-02-23 17:34:21 +0100
commit215e887be088ed572da999e9ec7fd8559198524b (patch)
tree793415b72d36bb07d0174dfcf731f81235008936 /src/audio_core/opus/hardware_opus.cpp
parentMerge pull request #13073 from FearlessTobi/fsp-srv-ipc (diff)
parentoboe_sink: handle temporary stream creation failure (diff)
downloadyuzu-215e887be088ed572da999e9ec7fd8559198524b.tar
yuzu-215e887be088ed572da999e9ec7fd8559198524b.tar.gz
yuzu-215e887be088ed572da999e9ec7fd8559198524b.tar.bz2
yuzu-215e887be088ed572da999e9ec7fd8559198524b.tar.lz
yuzu-215e887be088ed572da999e9ec7fd8559198524b.tar.xz
yuzu-215e887be088ed572da999e9ec7fd8559198524b.tar.zst
yuzu-215e887be088ed572da999e9ec7fd8559198524b.zip
Diffstat (limited to 'src/audio_core/opus/hardware_opus.cpp')
-rw-r--r--src/audio_core/opus/hardware_opus.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/audio_core/opus/hardware_opus.cpp b/src/audio_core/opus/hardware_opus.cpp
index 5ff71ab2d..30805f4a3 100644
--- a/src/audio_core/opus/hardware_opus.cpp
+++ b/src/audio_core/opus/hardware_opus.cpp
@@ -42,7 +42,7 @@ HardwareOpus::HardwareOpus(Core::System& system_)
opus_decoder.SetSharedMemory(shared_memory);
}
-u64 HardwareOpus::GetWorkBufferSize(u32 channel) {
+u32 HardwareOpus::GetWorkBufferSize(u32 channel) {
if (!opus_decoder.IsRunning()) {
return 0;
}
@@ -55,10 +55,10 @@ u64 HardwareOpus::GetWorkBufferSize(u32 channel) {
ADSP::OpusDecoder::Message::GetWorkBufferSizeOK, msg);
return 0;
}
- return shared_memory.dsp_return_data[0];
+ return static_cast<u32>(shared_memory.dsp_return_data[0]);
}
-u64 HardwareOpus::GetWorkBufferSizeForMultiStream(u32 total_stream_count, u32 stereo_stream_count) {
+u32 HardwareOpus::GetWorkBufferSizeForMultiStream(u32 total_stream_count, u32 stereo_stream_count) {
std::scoped_lock l{mutex};
shared_memory.host_send_data[0] = total_stream_count;
shared_memory.host_send_data[1] = stereo_stream_count;
@@ -70,7 +70,7 @@ u64 HardwareOpus::GetWorkBufferSizeForMultiStream(u32 total_stream_count, u32 st
ADSP::OpusDecoder::Message::GetWorkBufferSizeForMultiStreamOK, msg);
return 0;
}
- return shared_memory.dsp_return_data[0];
+ return static_cast<u32>(shared_memory.dsp_return_data[0]);
}
Result HardwareOpus::InitializeDecodeObject(u32 sample_rate, u32 channel_count, void* buffer,
@@ -94,8 +94,9 @@ Result HardwareOpus::InitializeDecodeObject(u32 sample_rate, u32 channel_count,
Result HardwareOpus::InitializeMultiStreamDecodeObject(u32 sample_rate, u32 channel_count,
u32 total_stream_count,
- u32 stereo_stream_count, void* mappings,
- void* buffer, u64 buffer_size) {
+ u32 stereo_stream_count,
+ const void* mappings, void* buffer,
+ u64 buffer_size) {
std::scoped_lock l{mutex};
shared_memory.host_send_data[0] = (u64)buffer;
shared_memory.host_send_data[1] = buffer_size;