From 45ec0e31c31b625ee8a56f6d2315af455172acc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 28 Mar 2022 15:39:24 +0200 Subject: Remove last editor code dependencies in template build SConstruct change also makes it possible to outright delete the `editor` folder in a `tools=no` build, which we use in CI to ensure no invalid cross-dependencies are added. --- servers/audio/effects/audio_effect_record.cpp | 9 +++++++++ servers/audio/effects/audio_effect_record.h | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'servers/audio') diff --git a/servers/audio/effects/audio_effect_record.cpp b/servers/audio/effects/audio_effect_record.cpp index a5866bb380..0069f6ad85 100644 --- a/servers/audio/effects/audio_effect_record.cpp +++ b/servers/audio/effects/audio_effect_record.cpp @@ -30,6 +30,11 @@ #include "audio_effect_record.h" +#ifdef TOOLS_ENABLED +// FIXME: This file shouldn't depend on editor stuff. +#include "editor/import/resource_importer_wav.h" +#endif + void AudioEffectRecordInstance::process(const AudioFrame *p_src_frames, AudioFrame *p_dst_frames, int p_frame_count) { if (!is_recording) { for (int i = 0; i < p_frame_count; i++) { @@ -250,8 +255,12 @@ Ref AudioEffectRecord::get_recording() const { Vector bleft; Vector bright; +#ifdef TOOLS_ENABLED ResourceImporterWAV::_compress_ima_adpcm(left, bleft); ResourceImporterWAV::_compress_ima_adpcm(right, bright); +#else + ERR_PRINT("AudioEffectRecord cannot do IMA ADPCM compression at runtime."); +#endif int dl = bleft.size(); dst_data.resize(dl * 2); diff --git a/servers/audio/effects/audio_effect_record.h b/servers/audio/effects/audio_effect_record.h index 18b5d4d83c..305484d1cb 100644 --- a/servers/audio/effects/audio_effect_record.h +++ b/servers/audio/effects/audio_effect_record.h @@ -35,7 +35,6 @@ #include "core/io/marshalls.h" #include "core/os/os.h" #include "core/os/thread.h" -#include "editor/import/resource_importer_wav.h" #include "scene/resources/audio_stream_sample.h" #include "servers/audio/audio_effect.h" #include "servers/audio_server.h" -- cgit v1.2.3