diff options
Diffstat (limited to 'modules/opus')
-rw-r--r-- | modules/opus/SCsub | 43 | ||||
-rw-r--r-- | modules/opus/audio_stream_opus.cpp | 379 | ||||
-rw-r--r-- | modules/opus/audio_stream_opus.h | 142 | ||||
-rw-r--r-- | modules/opus/config.py | 9 | ||||
-rw-r--r-- | modules/opus/register_types.cpp | 21 | ||||
-rw-r--r-- | modules/opus/register_types.h | 5 | ||||
-rw-r--r-- | modules/opus/stub/register_types.cpp | 37 | ||||
-rw-r--r-- | modules/opus/stub/register_types.h | 32 |
8 files changed, 27 insertions, 641 deletions
diff --git a/modules/opus/SCsub b/modules/opus/SCsub index 1db5b0987e..e51590d808 100644 --- a/modules/opus/SCsub +++ b/modules/opus/SCsub @@ -1,18 +1,19 @@ #!/usr/bin/env python -Import('env') -Import('env_modules') +Import("env") +Import("env_modules") -stub = True +# Only kept to build the thirdparty library used by the webm module. +# AudioStreamOpus was dropped in 3.0 due to incompatibility with the new audio +# engine. If you want to port it, fetch it from the Git history. env_opus = env_modules.Clone() # Thirdparty source files -if env['builtin_opus']: +if env["builtin_opus"]: thirdparty_dir = "#thirdparty/opus/" thirdparty_sources = [ - # Sync with opus_sources.mk "opus.c", "opus_decoder.c", @@ -21,17 +22,14 @@ if env['builtin_opus']: "opus_multistream_encoder.c", "opus_multistream_decoder.c", "repacketizer.c", - "analysis.c", "mlp.c", "mlp_data.c", - # Sync with libopusfile Makefile.am "info.c", "internal.c", "opusfile.c", "stream.c", - # Sync with celt_sources.mk "celt/bands.c", "celt/celt.c", @@ -51,12 +49,11 @@ if env['builtin_opus']: "celt/quant_bands.c", "celt/rate.c", "celt/vq.c", - #"celt/arm/arm_celt_map.c", - #"celt/arm/armcpu.c", - #"celt/arm/celt_ne10_fft.c", - #"celt/arm/celt_ne10_mdct.c", - #"celt/arm/celt_neon_intr.c", - + # "celt/arm/arm_celt_map.c", + # "celt/arm/armcpu.c", + # "celt/arm/celt_ne10_fft.c", + # "celt/arm/celt_ne10_mdct.c", + # "celt/arm/celt_neon_intr.c", # Sync with silk_sources.mk "silk/CNG.c", "silk/code_signs.c", @@ -205,7 +202,7 @@ if env['builtin_opus']: thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources + opus_sources_silk] # also requires libogg - if env['builtin_libogg']: + if env["builtin_libogg"]: env_opus.Prepend(CPPPATH=["#thirdparty/libogg"]) env_opus.Append(CPPDEFINES=["HAVE_CONFIG_H"]) @@ -221,23 +218,19 @@ if env['builtin_opus']: env_opus.Prepend(CPPPATH=[thirdparty_dir + "/" + dir for dir in thirdparty_include_paths]) if env["platform"] == "android": - if ("android_arch" in env and env["android_arch"] == "armv7"): + if "android_arch" in env and env["android_arch"] == "armv7": env_opus.Append(CPPDEFINES=["OPUS_ARM_OPT"]) - elif ("android_arch" in env and env["android_arch"] == "arm64v8"): + elif "android_arch" in env and env["android_arch"] == "arm64v8": env_opus.Append(CPPDEFINES=["OPUS_ARM64_OPT"]) elif env["platform"] == "iphone": - if ("arch" in env and env["arch"] == "arm"): + if "arch" in env and env["arch"] == "arm": env_opus.Append(CPPDEFINES=["OPUS_ARM_OPT"]) - elif ("arch" in env and env["arch"] == "arm64"): + elif "arch" in env and env["arch"] == "arm64": env_opus.Append(CPPDEFINES=["OPUS_ARM64_OPT"]) env_thirdparty = env_opus.Clone() env_thirdparty.disable_warnings() env_thirdparty.add_source_files(env.modules_sources, thirdparty_sources) -if not stub: - # Module files - env_opus.add_source_files(env.modules_sources, "*.cpp") -else: - # Module files - env_opus.add_source_files(env.modules_sources, "stub/register_types.cpp") +# Module files +env_opus.add_source_files(env.modules_sources, "register_types.cpp") diff --git a/modules/opus/audio_stream_opus.cpp b/modules/opus/audio_stream_opus.cpp deleted file mode 100644 index a983edee91..0000000000 --- a/modules/opus/audio_stream_opus.cpp +++ /dev/null @@ -1,379 +0,0 @@ -/*************************************************************************/ -/* audio_stream_opus.cpp */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************************************************************************/ - -#include "audio_stream_opus.h" - -/** - @author George Marques <george@gmarqu.es> -*/ - -const float AudioStreamPlaybackOpus::osrate = 48000.0f; - -int AudioStreamPlaybackOpus::_op_read_func(void *_stream, unsigned char *_ptr, int _nbytes) { - FileAccess *fa = (FileAccess *)_stream; - - if (fa->eof_reached()) - return 0; - - uint8_t *dst = (uint8_t *)_ptr; - - int read = fa->get_buffer(dst, _nbytes); - - return read; -} - -int AudioStreamPlaybackOpus::_op_seek_func(void *_stream, opus_int64 _offset, int _whence) { - -#ifdef SEEK_SET - FileAccess *fa = (FileAccess *)_stream; - - switch (_whence) { - case SEEK_SET: { - fa->seek(_offset); - } break; - case SEEK_CUR: { - fa->seek(fa->get_position() + _offset); - } break; - case SEEK_END: { - fa->seek_end(_offset); - } break; - default: { - ERR_PRINT("Opus seek function failure: Unexpected value in _whence\n"); - } - } - int ret = fa->eof_reached() ? -1 : 0; - return ret; -#else - return -1; // no seeking -#endif -} - -int AudioStreamPlaybackOpus::_op_close_func(void *_stream) { - if (!_stream) - return 0; - FileAccess *fa = (FileAccess *)_stream; - if (fa->is_open()) - fa->close(); - return 0; -} - -opus_int64 AudioStreamPlaybackOpus::_op_tell_func(void *_stream) { - FileAccess *_fa = (FileAccess *)_stream; - return (opus_int64)_fa->get_position(); -} - -void AudioStreamPlaybackOpus::_clear_stream() { - if (!stream_loaded) - return; - - op_free(opus_file); - _close_file(); - - stream_loaded = false; - stream_channels = 1; - playing = false; -} - -void AudioStreamPlaybackOpus::_close_file() { - if (f) { - memdelete(f); - f = NULL; - } -} - -Error AudioStreamPlaybackOpus::_load_stream() { - - ERR_FAIL_COND_V(!stream_valid, ERR_UNCONFIGURED); - - _clear_stream(); - if (file == "") - return ERR_INVALID_DATA; - - Error err; - f = FileAccess::open(file, FileAccess::READ, &err); - - ERR_FAIL_COND_V_MSG(err, err, "Cannot open file '" + file + "'."); - - int _err = 0; - - opus_file = op_open_callbacks(f, &_op_callbacks, NULL, 0, &_err); - - switch (_err) { - case OP_EREAD: { // - Can't read the file. - memdelete(f); - f = NULL; - ERR_FAIL_V(ERR_FILE_CANT_READ); - } break; - case OP_EVERSION: // - Unrecognized version number. - case OP_ENOTFORMAT: // - Stream is not Opus data. - case OP_EIMPL: { // - Stream used non-implemented feature. - memdelete(f); - f = NULL; - ERR_FAIL_V(ERR_FILE_UNRECOGNIZED); - } break; - case OP_EBADLINK: // - Failed to find old data after seeking. - case OP_EBADTIMESTAMP: // - Timestamp failed the validity checks. - case OP_EBADHEADER: { // - Invalid or missing Opus bitstream header. - memdelete(f); - f = NULL; - ERR_FAIL_V(ERR_FILE_CORRUPT); - } break; - case OP_EFAULT: { // - Internal logic fault; indicates a bug or heap/stack corruption. - memdelete(f); - f = NULL; - ERR_FAIL_V(ERR_BUG); - } break; - } - repeats = 0; - stream_loaded = true; - - return OK; -} - -AudioStreamPlaybackOpus::AudioStreamPlaybackOpus() { - loops = false; - playing = false; - f = NULL; - stream_loaded = false; - stream_valid = false; - repeats = 0; - paused = true; - stream_channels = 0; - current_section = 0; - length = 0; - loop_restart_time = 0; - pre_skip = 0; - - _op_callbacks.read = _op_read_func; - _op_callbacks.seek = _op_seek_func; - _op_callbacks.tell = _op_tell_func; - _op_callbacks.close = _op_close_func; -} - -Error AudioStreamPlaybackOpus::set_file(const String &p_file) { - file = p_file; - stream_valid = false; - Error err; - f = FileAccess::open(file, FileAccess::READ, &err); - - ERR_FAIL_COND_V_MSG(err, err, "Cannot open file '" + file + "'."); - - int _err; - - opus_file = op_open_callbacks(f, &_op_callbacks, NULL, 0, &_err); - - switch (_err) { - case OP_EREAD: { // - Can't read the file. - memdelete(f); - f = NULL; - ERR_FAIL_V(ERR_FILE_CANT_READ); - } break; - case OP_EVERSION: // - Unrecognized version number. - case OP_ENOTFORMAT: // - Stream is not Opus data. - case OP_EIMPL: { // - Stream used non-implemented feature. - memdelete(f); - f = NULL; - ERR_FAIL_V(ERR_FILE_UNRECOGNIZED); - } break; - case OP_EBADLINK: // - Failed to find old data after seeking. - case OP_EBADTIMESTAMP: // - Timestamp failed the validity checks. - case OP_EBADHEADER: { // - Invalid or missing Opus bitstream header. - memdelete(f); - f = NULL; - ERR_FAIL_V(ERR_FILE_CORRUPT); - } break; - case OP_EFAULT: { // - Internal logic fault; indicates a bug or heap/stack corruption. - memdelete(f); - f = NULL; - ERR_FAIL_V(ERR_BUG); - } break; - } - - const OpusHead *oinfo = op_head(opus_file, -1); - - stream_channels = oinfo->channel_count; - pre_skip = oinfo->pre_skip; - frames_mixed = pre_skip; - ogg_int64_t len = op_pcm_total(opus_file, -1); - if (len < 0) { - length = 0; - } else { - length = (len / osrate); - } - - op_free(opus_file); - memdelete(f); - f = NULL; - stream_valid = true; - - return OK; -} - -void AudioStreamPlaybackOpus::play(float p_from) { - if (playing) - stop(); - - if (_load_stream() != OK) - return; - - frames_mixed = pre_skip; - playing = true; - if (p_from > 0) { - seek(p_from); - } -} - -void AudioStreamPlaybackOpus::stop() { - _clear_stream(); - playing = false; -} - -void AudioStreamPlaybackOpus::seek(float p_time) { - if (!playing) return; - ogg_int64_t pcm_offset = (ogg_int64_t)(p_time * osrate); - bool ok = op_pcm_seek(opus_file, pcm_offset) == 0; - if (!ok) { - ERR_PRINT("Seek time over stream size."); - return; - } - frames_mixed = osrate * p_time; -} - -int AudioStreamPlaybackOpus::mix(int16_t *p_buffer, int p_frames) { - if (!playing) - return 0; - - int total = p_frames; - - while (true) { - - int todo = p_frames; - - if (todo < MIN_MIX) { - break; - } - - int ret = op_read(opus_file, (opus_int16 *)p_buffer, todo * stream_channels, ¤t_section); - if (ret < 0) { - playing = false; - ERR_BREAK_MSG(ret < 0, "Error reading Opus file: " + file + "."); - } else if (ret == 0) { // end of song, reload? - op_free(opus_file); - - _close_file(); - - f = FileAccess::open(file, FileAccess::READ); - - int errv = 0; - opus_file = op_open_callbacks(f, &_op_callbacks, NULL, 0, &errv); - if (errv != 0) { - playing = false; - break; // :( - } - - if (!has_loop()) { - playing = false; - repeats = 1; - break; - } - - if (loop_restart_time) { - bool ok = op_pcm_seek(opus_file, (loop_restart_time * osrate) + pre_skip) == 0; - if (!ok) { - playing = false; - ERR_PRINT("Loop restart time rejected"); - } - - frames_mixed = (loop_restart_time * osrate) + pre_skip; - } else { - frames_mixed = pre_skip; - } - repeats++; - continue; - } - - stream_channels = op_head(opus_file, current_section)->channel_count; - - frames_mixed += ret; - - p_buffer += ret * stream_channels; - p_frames -= ret; - } - - return total - p_frames; -} - -float AudioStreamPlaybackOpus::get_length() const { - if (!stream_loaded) { - if (const_cast<AudioStreamPlaybackOpus *>(this)->_load_stream() != OK) - return 0; - } - return length; -} - -float AudioStreamPlaybackOpus::get_playback_position() const { - - int32_t frames = int32_t(frames_mixed); - if (frames < 0) - frames = 0; - return double(frames) / osrate; -} - -int AudioStreamPlaybackOpus::get_minimum_buffer_size() const { - return MIN_MIX; -} - -AudioStreamPlaybackOpus::~AudioStreamPlaybackOpus() { - _clear_stream(); -} - -RES ResourceFormatLoaderAudioStreamOpus::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress) { - if (r_error) - *r_error = OK; - - AudioStreamOpus *opus_stream = memnew(AudioStreamOpus); - opus_stream->set_file(p_path); - return Ref<AudioStreamOpus>(opus_stream); -} - -void ResourceFormatLoaderAudioStreamOpus::get_recognized_extensions(List<String> *p_extensions) const { - - p_extensions->push_back("opus"); -} -String ResourceFormatLoaderAudioStreamOpus::get_resource_type(const String &p_path) const { - - if (p_path.get_extension().to_lower() == "opus") - return "AudioStreamOpus"; - return ""; -} - -bool ResourceFormatLoaderAudioStreamOpus::handles_type(const String &p_type) const { - return (p_type == "AudioStream" || p_type == "AudioStreamOpus"); -} diff --git a/modules/opus/audio_stream_opus.h b/modules/opus/audio_stream_opus.h deleted file mode 100644 index 343cbc6b83..0000000000 --- a/modules/opus/audio_stream_opus.h +++ /dev/null @@ -1,142 +0,0 @@ -/*************************************************************************/ -/* audio_stream_opus.h */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************************************************************************/ - -#ifndef AUDIO_STREAM_OPUS_H -#define AUDIO_STREAM_OPUS_H - -#include "core/io/resource_loader.h" -#include "core/os/file_access.h" -#include "scene/resources/audio_stream.h" - -#include <opus/opusfile.h> - -/** - @author George Marques <george@gmarqu.es> -*/ - -class AudioStreamPlaybackOpus : public AudioStreamPlayback { - - GDCLASS(AudioStreamPlaybackOpus, AudioStreamPlayback); - - enum { - MIN_MIX = 1024 - }; - - FileAccess *f; - - OpusFileCallbacks _op_callbacks; - float length; - static int _op_read_func(void *_stream, unsigned char *_ptr, int _nbytes); - static int _op_seek_func(void *_stream, opus_int64 _offset, int _whence); - static int _op_close_func(void *_stream); - static opus_int64 _op_tell_func(void *_stream); - static const float osrate; - - String file; - int64_t frames_mixed; - - bool stream_loaded; - volatile bool playing; - OggOpusFile *opus_file; - int stream_channels; - int current_section; - int pre_skip; - - bool paused; - bool loops; - int repeats; - - Error _load_stream(); - void _clear_stream(); - void _close_file(); - - bool stream_valid; - float loop_restart_time; - -public: - Error set_file(const String &p_file); - - virtual void play(float p_from = 0); - virtual void stop(); - virtual bool is_playing() const { return playing; } - - virtual void set_loop_restart_time(float p_time) { loop_restart_time = p_time; } - - virtual void set_paused(bool p_paused) { paused = p_paused; } - virtual bool is_paused() const { return paused; } - - virtual void set_loop(bool p_enable) { loops = p_enable; } - virtual bool has_loop() const { return loops; } - - virtual float get_length() const; - - virtual String get_stream_name() const { return ""; } - - virtual int get_loop_count() const { return repeats; } - - virtual float get_playback_position() const; - virtual void seek(float p_time); - - virtual int get_channels() const { return stream_channels; } - virtual int get_mix_rate() const { return osrate; } - - virtual int get_minimum_buffer_size() const; - - virtual int mix(int16_t *p_buffer, int p_frames); - - AudioStreamPlaybackOpus(); - ~AudioStreamPlaybackOpus(); -}; - -class AudioStreamOpus : public AudioStream { - - GDCLASS(AudioStreamOpus, AudioStream); - - String file; - -public: - Ref<AudioStreamPlayback> instance_playback() { - Ref<AudioStreamPlaybackOpus> pb = memnew(AudioStreamPlaybackOpus); - pb->set_file(file); - return pb; - } - - void set_file(const String &p_file) { file = p_file; } -}; - -class ResourceFormatLoaderAudioStreamOpus : public ResourceFormatLoader { -public: - virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr); - virtual void get_recognized_extensions(List<String> *p_extensions) const; - virtual bool handles_type(const String &p_type) const; - virtual String get_resource_type(const String &p_path) const; -}; - -#endif // AUDIO_STREAM_OPUS_H diff --git a/modules/opus/config.py b/modules/opus/config.py index a1cde10ea0..d22f9454ed 100644 --- a/modules/opus/config.py +++ b/modules/opus/config.py @@ -1,13 +1,6 @@ def can_build(env, platform): return True + def configure(env): pass - -def get_doc_classes(): - return [ - "AudioStreamOpus", - ] - -def get_doc_path(): - return "doc_classes" diff --git a/modules/opus/register_types.cpp b/modules/opus/register_types.cpp index dff309b49c..a4329e142c 100644 --- a/modules/opus/register_types.cpp +++ b/modules/opus/register_types.cpp @@ -30,23 +30,8 @@ #include "register_types.h" -#include "audio_stream_opus.h" +// Dummy module as libvorbis is needed by other modules (theora ...) -static Ref<ResourceFormatLoaderAudioStreamOpus> opus_stream_loader; +void register_opus_types() {} -void register_opus_types() { - // Sorry guys, do not enable this unless you can figure out a way - // to get Opus to not do any memory allocation or system calls - // in the audio thread. - // Currently the implementation even reads files from the audio thread, - // and this is not how audio programming works. - - //opus_stream_loader = memnew(ResourceFormatLoaderAudioStreamOpus); - //ResourceLoader::add_resource_format_loader(opus_stream_loader); - //ClassDB::register_class<AudioStreamOpus>(); -} - -void unregister_opus_types() { - - //memdelete(opus_stream_loader); -} +void unregister_opus_types() {} diff --git a/modules/opus/register_types.h b/modules/opus/register_types.h index 445be4e166..ad6e083c82 100644 --- a/modules/opus/register_types.h +++ b/modules/opus/register_types.h @@ -28,5 +28,10 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ +#ifndef OPUS_REGISTER_TYPES_H +#define OPUS_REGISTER_TYPES_H + void register_opus_types(); void unregister_opus_types(); + +#endif // OPUS_REGISTER_TYPES_H diff --git a/modules/opus/stub/register_types.cpp b/modules/opus/stub/register_types.cpp deleted file mode 100644 index a4329e142c..0000000000 --- a/modules/opus/stub/register_types.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/*************************************************************************/ -/* register_types.cpp */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************************************************************************/ - -#include "register_types.h" - -// Dummy module as libvorbis is needed by other modules (theora ...) - -void register_opus_types() {} - -void unregister_opus_types() {} diff --git a/modules/opus/stub/register_types.h b/modules/opus/stub/register_types.h deleted file mode 100644 index 445be4e166..0000000000 --- a/modules/opus/stub/register_types.h +++ /dev/null @@ -1,32 +0,0 @@ -/*************************************************************************/ -/* register_types.h */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************************************************************************/ - -void register_opus_types(); -void unregister_opus_types(); |