diff options
Diffstat (limited to 'modules/vorbis')
-rw-r--r-- | modules/vorbis/SCsub | 10 | ||||
-rw-r--r-- | modules/vorbis/audio_stream_ogg_vorbis.cpp | 4 | ||||
-rw-r--r-- | modules/vorbis/audio_stream_ogg_vorbis.h | 2 | ||||
-rw-r--r-- | modules/vorbis/config.py | 5 | ||||
-rw-r--r-- | modules/vorbis/stub/register_types.cpp | 36 | ||||
-rw-r--r-- | modules/vorbis/stub/register_types.h | 31 |
6 files changed, 78 insertions, 10 deletions
diff --git a/modules/vorbis/SCsub b/modules/vorbis/SCsub index 9d2d0feb92..55a112585b 100644 --- a/modules/vorbis/SCsub +++ b/modules/vorbis/SCsub @@ -5,6 +5,8 @@ Import('env_modules') env_vorbis = env_modules.Clone() +stub = True + # Thirdparty source files if env['builtin_libvorbis']: thirdparty_dir = "#thirdparty/libvorbis/" @@ -45,5 +47,9 @@ if env['builtin_libvorbis']: if env['builtin_libogg']: env_vorbis.Append(CPPPATH=["#thirdparty/libogg"]) -# Godot source files -env_vorbis.add_source_files(env.modules_sources, "*.cpp") +if not stub: + # Module files + env_vorbis.add_source_files(env.modules_sources, "*.cpp") +else: + # Module files + env_vorbis.add_source_files(env.modules_sources, "stub/register_types.cpp") diff --git a/modules/vorbis/audio_stream_ogg_vorbis.cpp b/modules/vorbis/audio_stream_ogg_vorbis.cpp index 6235799fc2..9fb6fa8197 100644 --- a/modules/vorbis/audio_stream_ogg_vorbis.cpp +++ b/modules/vorbis/audio_stream_ogg_vorbis.cpp @@ -106,8 +106,6 @@ int AudioStreamPlaybackOGGVorbis::mix(int16_t *p_buffer, int p_frames) { break; } -//printf("to mix %i - mix me %i bytes\n",to_mix,to_mix*stream_channels*sizeof(int16_t)); - #ifdef BIG_ENDIAN_ENABLED long ret = ov_read(&vf, (char *)p_buffer, todo * stream_channels * sizeof(int16_t), 1, 2, 1, ¤t_section); #else @@ -359,7 +357,7 @@ void AudioStreamPlaybackOGGVorbis::set_paused(bool p_paused) { paused = p_paused; } -bool AudioStreamPlaybackOGGVorbis::is_paused(bool p_paused) const { +bool AudioStreamPlaybackOGGVorbis::is_paused() const { return paused; } diff --git a/modules/vorbis/audio_stream_ogg_vorbis.h b/modules/vorbis/audio_stream_ogg_vorbis.h index 79eadec56e..5000d03fd4 100644 --- a/modules/vorbis/audio_stream_ogg_vorbis.h +++ b/modules/vorbis/audio_stream_ogg_vorbis.h @@ -85,7 +85,7 @@ public: virtual void set_loop_restart_time(float p_time) { loop_restart_time = p_time; } virtual void set_paused(bool p_paused); - virtual bool is_paused(bool p_paused) const; + virtual bool is_paused() const; virtual void set_loop(bool p_enable); virtual bool has_loop() const; diff --git a/modules/vorbis/config.py b/modules/vorbis/config.py index ef5daca05c..5f133eba90 100644 --- a/modules/vorbis/config.py +++ b/modules/vorbis/config.py @@ -1,8 +1,5 @@ - def can_build(platform): -# return True - return False - + return True def configure(env): pass diff --git a/modules/vorbis/stub/register_types.cpp b/modules/vorbis/stub/register_types.cpp new file mode 100644 index 0000000000..b93d890436 --- /dev/null +++ b/modules/vorbis/stub/register_types.cpp @@ -0,0 +1,36 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 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_vorbis_types() {} + +void unregister_vorbis_types() {} diff --git a/modules/vorbis/stub/register_types.h b/modules/vorbis/stub/register_types.h new file mode 100644 index 0000000000..e7cde7a66c --- /dev/null +++ b/modules/vorbis/stub/register_types.h @@ -0,0 +1,31 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 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_vorbis_types(); +void unregister_vorbis_types(); |