summaryrefslogtreecommitdiffstats
path: root/src/audio_core
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio_core')
-rw-r--r--src/audio_core/CMakeLists.txt15
-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/precompiled_headers.h6
-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
11 files changed, 28 insertions, 11 deletions
diff --git a/src/audio_core/CMakeLists.txt b/src/audio_core/CMakeLists.txt
index 75416c53a..420ba62e0 100644
--- a/src/audio_core/CMakeLists.txt
+++ b/src/audio_core/CMakeLists.txt
@@ -31,6 +31,7 @@ add_library(audio_core STATIC
out/audio_out.h
out/audio_out_system.cpp
out/audio_out_system.h
+ precompiled_headers.h
renderer/adsp/adsp.cpp
renderer/adsp/adsp.h
renderer/adsp/audio_renderer.cpp
@@ -218,18 +219,18 @@ endif()
target_link_libraries(audio_core PUBLIC common core)
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
- target_link_libraries(audio_core PRIVATE dynarmic)
+ target_link_libraries(audio_core PRIVATE dynarmic::dynarmic)
endif()
if(ENABLE_CUBEB)
- target_link_libraries(audio_core PRIVATE cubeb)
+ target_link_libraries(audio_core PRIVATE cubeb::cubeb)
target_compile_definitions(audio_core PRIVATE -DHAVE_CUBEB=1)
endif()
if(ENABLE_SDL2)
- if (YUZU_USE_EXTERNAL_SDL2)
- target_link_libraries(audio_core PRIVATE SDL2-static)
- else()
- target_link_libraries(audio_core PRIVATE SDL2)
- endif()
+ target_link_libraries(audio_core PRIVATE SDL2::SDL2)
target_compile_definitions(audio_core PRIVATE HAVE_SDL2)
endif()
+
+if (YUZU_USE_PRECOMPILED_HEADERS)
+ target_precompile_headers(audio_core PRIVATE precompiled_headers.h)
+endif()
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/precompiled_headers.h b/src/audio_core/precompiled_headers.h
new file mode 100644
index 000000000..aabae730b
--- /dev/null
+++ b/src/audio_core/precompiled_headers.h
@@ -0,0 +1,6 @@
+// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include "common/common_precompiled_headers.h"
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);