diff options
Diffstat (limited to 'servers/audio')
-rw-r--r-- | servers/audio/effects/audio_effect_record.cpp | 9 | ||||
-rw-r--r-- | servers/audio/effects/audio_effect_record.h | 1 |
2 files changed, 9 insertions, 1 deletions
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<AudioStreamSample> AudioEffectRecord::get_recording() const { Vector<uint8_t> bleft; Vector<uint8_t> 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" |