summaryrefslogtreecommitdiffstats
path: root/src/audio_core
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2022-12-03 18:09:21 +0100
committerGitHub <noreply@github.com>2022-12-03 18:09:21 +0100
commit22aff09b33941cdf907e474cb86117fef838abba (patch)
tree73a747be44fd2ba994c3d40c8f6ea18633c0f880 /src/audio_core
parentMerge pull request #9353 from vonchenplus/draw_indexed (diff)
parentgeneral: fix compile for Apple Clang (diff)
downloadyuzu-22aff09b33941cdf907e474cb86117fef838abba.tar
yuzu-22aff09b33941cdf907e474cb86117fef838abba.tar.gz
yuzu-22aff09b33941cdf907e474cb86117fef838abba.tar.bz2
yuzu-22aff09b33941cdf907e474cb86117fef838abba.tar.lz
yuzu-22aff09b33941cdf907e474cb86117fef838abba.tar.xz
yuzu-22aff09b33941cdf907e474cb86117fef838abba.tar.zst
yuzu-22aff09b33941cdf907e474cb86117fef838abba.zip
Diffstat (limited to 'src/audio_core')
-rw-r--r--src/audio_core/audio_event.cpp1
-rw-r--r--src/audio_core/audio_manager.h2
-rw-r--r--src/audio_core/audio_render_manager.h2
-rw-r--r--src/audio_core/common/feature_support.h1
-rw-r--r--src/audio_core/renderer/command/effect/i3dl2_reverb.cpp1
-rw-r--r--src/audio_core/renderer/command/effect/reverb.cpp1
-rw-r--r--src/audio_core/renderer/mix/mix_context.cpp1
-rw-r--r--src/audio_core/renderer/voice/voice_context.cpp1
-rw-r--r--src/audio_core/sink/sink_stream.cpp8
9 files changed, 14 insertions, 4 deletions
diff --git a/src/audio_core/audio_event.cpp b/src/audio_core/audio_event.cpp
index 424049c7a..d15568e1f 100644
--- a/src/audio_core/audio_event.cpp
+++ b/src/audio_core/audio_event.cpp
@@ -3,6 +3,7 @@
#include "audio_core/audio_event.h"
#include "common/assert.h"
+#include "common/polyfill_ranges.h"
namespace AudioCore {
diff --git a/src/audio_core/audio_manager.h b/src/audio_core/audio_manager.h
index abf077de4..02270242a 100644
--- a/src/audio_core/audio_manager.h
+++ b/src/audio_core/audio_manager.h
@@ -9,6 +9,8 @@
#include <mutex>
#include <thread>
+#include "common/polyfill_thread.h"
+
#include "audio_core/audio_event.h"
union Result;
diff --git a/src/audio_core/audio_render_manager.h b/src/audio_core/audio_render_manager.h
index bf4837190..fffa5944d 100644
--- a/src/audio_core/audio_render_manager.h
+++ b/src/audio_core/audio_render_manager.h
@@ -7,6 +7,8 @@
#include <memory>
#include <mutex>
+#include "common/polyfill_thread.h"
+
#include "audio_core/common/common.h"
#include "audio_core/renderer/system_manager.h"
#include "core/hle/service/audio/errors.h"
diff --git a/src/audio_core/common/feature_support.h b/src/audio_core/common/feature_support.h
index 55c9e690d..e71905ae8 100644
--- a/src/audio_core/common/feature_support.h
+++ b/src/audio_core/common/feature_support.h
@@ -10,6 +10,7 @@
#include "common/assert.h"
#include "common/common_funcs.h"
#include "common/common_types.h"
+#include "common/polyfill_ranges.h"
namespace AudioCore {
constexpr u32 CurrentRevision = 11;
diff --git a/src/audio_core/renderer/command/effect/i3dl2_reverb.cpp b/src/audio_core/renderer/command/effect/i3dl2_reverb.cpp
index c4bf3943a..2187d8a65 100644
--- a/src/audio_core/renderer/command/effect/i3dl2_reverb.cpp
+++ b/src/audio_core/renderer/command/effect/i3dl2_reverb.cpp
@@ -5,6 +5,7 @@
#include "audio_core/renderer/adsp/command_list_processor.h"
#include "audio_core/renderer/command/effect/i3dl2_reverb.h"
+#include "common/polyfill_ranges.h"
namespace AudioCore::AudioRenderer {
diff --git a/src/audio_core/renderer/command/effect/reverb.cpp b/src/audio_core/renderer/command/effect/reverb.cpp
index fe2b1eb43..427489214 100644
--- a/src/audio_core/renderer/command/effect/reverb.cpp
+++ b/src/audio_core/renderer/command/effect/reverb.cpp
@@ -6,6 +6,7 @@
#include "audio_core/renderer/adsp/command_list_processor.h"
#include "audio_core/renderer/command/effect/reverb.h"
+#include "common/polyfill_ranges.h"
namespace AudioCore::AudioRenderer {
diff --git a/src/audio_core/renderer/mix/mix_context.cpp b/src/audio_core/renderer/mix/mix_context.cpp
index 2427c83ed..35b748ede 100644
--- a/src/audio_core/renderer/mix/mix_context.cpp
+++ b/src/audio_core/renderer/mix/mix_context.cpp
@@ -5,6 +5,7 @@
#include "audio_core/renderer/mix/mix_context.h"
#include "audio_core/renderer/splitter/splitter_context.h"
+#include "common/polyfill_ranges.h"
namespace AudioCore::AudioRenderer {
diff --git a/src/audio_core/renderer/voice/voice_context.cpp b/src/audio_core/renderer/voice/voice_context.cpp
index a501a677d..16a3e839d 100644
--- a/src/audio_core/renderer/voice/voice_context.cpp
+++ b/src/audio_core/renderer/voice/voice_context.cpp
@@ -4,6 +4,7 @@
#include <ranges>
#include "audio_core/renderer/voice/voice_context.h"
+#include "common/polyfill_ranges.h"
namespace AudioCore::AudioRenderer {
diff --git a/src/audio_core/sink/sink_stream.cpp b/src/audio_core/sink/sink_stream.cpp
index 67e194e3c..06c2a876e 100644
--- a/src/audio_core/sink/sink_stream.cpp
+++ b/src/audio_core/sink/sink_stream.cpp
@@ -170,8 +170,8 @@ void SinkStream::ProcessAudioIn(std::span<const s16> input_buffer, std::size_t n
// Get the minimum frames available between the currently playing buffer, and the
// amount we have left to fill
- size_t frames_available{std::min(playing_buffer.frames - playing_buffer.frames_played,
- num_frames - frames_written)};
+ size_t frames_available{std::min<u64>(playing_buffer.frames - playing_buffer.frames_played,
+ num_frames - frames_written)};
samples_buffer.Push(&input_buffer[frames_written * frame_size],
frames_available * frame_size);
@@ -241,8 +241,8 @@ void SinkStream::ProcessAudioOutAndRender(std::span<s16> output_buffer, std::siz
// Get the minimum frames available between the currently playing buffer, and the
// amount we have left to fill
- size_t frames_available{std::min(playing_buffer.frames - playing_buffer.frames_played,
- num_frames - frames_written)};
+ size_t frames_available{std::min<u64>(playing_buffer.frames - playing_buffer.frames_played,
+ num_frames - frames_written)};
samples_buffer.Pop(&output_buffer[frames_written * frame_size],
frames_available * frame_size);