summaryrefslogtreecommitdiff
path: root/modules/stb_vorbis
diff options
context:
space:
mode:
Diffstat (limited to 'modules/stb_vorbis')
-rw-r--r--modules/stb_vorbis/SCsub8
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.cpp5
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.h7
3 files changed, 8 insertions, 12 deletions
diff --git a/modules/stb_vorbis/SCsub b/modules/stb_vorbis/SCsub
index 897d05961c..d14939a3b1 100644
--- a/modules/stb_vorbis/SCsub
+++ b/modules/stb_vorbis/SCsub
@@ -3,8 +3,14 @@
Import('env')
Import('env_modules')
+env_stb_vorbis = env_modules.Clone()
+
# Thirdparty source files
+thirdparty_sources = ["#thirdparty/misc/stb_vorbis.c"]
-env_stb_vorbis = env_modules.Clone()
+env_thirdparty = env_stb_vorbis.Clone()
+env_thirdparty.disable_warnings()
+env_thirdparty.add_source_files(env.modules_sources, thirdparty_sources)
+# Godot's own source files
env_stb_vorbis.add_source_files(env.modules_sources, "*.cpp")
diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
index 57b6b5343e..5dbe0b4b00 100644
--- a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
+++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
@@ -32,11 +32,6 @@
#include "core/os/file_access.h"
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
-#include "thirdparty/misc/stb_vorbis.c"
-#pragma GCC diagnostic pop
-
void AudioStreamPlaybackOGGVorbis::_mix_internal(AudioFrame *p_buffer, int p_frames) {
ERR_FAIL_COND(!active);
diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.h b/modules/stb_vorbis/audio_stream_ogg_vorbis.h
index 71a957a6af..8b42111847 100644
--- a/modules/stb_vorbis/audio_stream_ogg_vorbis.h
+++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.h
@@ -34,12 +34,7 @@
#include "core/io/resource_loader.h"
#include "servers/audio/audio_stream.h"
-#define STB_VORBIS_HEADER_ONLY
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
-#include "thirdparty/misc/stb_vorbis.c"
-#pragma GCC diagnostic pop
-#undef STB_VORBIS_HEADER_ONLY
+#include "thirdparty/misc/stb_vorbis.h"
class AudioStreamOGGVorbis;