diff options
Diffstat (limited to 'modules/vorbis')
-rw-r--r-- | modules/vorbis/audio_stream_ogg_vorbis.cpp | 6 | ||||
-rw-r--r-- | modules/vorbis/doc_classes/AudioStreamOggVorbis.xml | 1 | ||||
-rw-r--r-- | modules/vorbis/register_types.cpp | 5 | ||||
-rw-r--r-- | modules/vorbis/resource_importer_ogg_vorbis.cpp | 2 |
4 files changed, 10 insertions, 4 deletions
diff --git a/modules/vorbis/audio_stream_ogg_vorbis.cpp b/modules/vorbis/audio_stream_ogg_vorbis.cpp index 8a265ffaf3..7ec0b697bf 100644 --- a/modules/vorbis/audio_stream_ogg_vorbis.cpp +++ b/modules/vorbis/audio_stream_ogg_vorbis.cpp @@ -144,7 +144,7 @@ int AudioStreamPlaybackOggVorbis::_mix_internal(AudioFrame *p_buffer, int p_fram } int AudioStreamPlaybackOggVorbis::_mix_frames_vorbis(AudioFrame *p_buffer, int p_frames) { - ERR_FAIL_COND_V(!ready, 0); + ERR_FAIL_COND_V(!ready, p_frames); if (!have_samples_left) { ogg_packet *packet = nullptr; int err; @@ -156,10 +156,10 @@ int AudioStreamPlaybackOggVorbis::_mix_frames_vorbis(AudioFrame *p_buffer, int p } err = vorbis_synthesis(&block, packet); - ERR_FAIL_COND_V_MSG(err != 0, 0, "Error during vorbis synthesis " + itos(err)); + ERR_FAIL_COND_V_MSG(err != 0, p_frames, "Error during vorbis synthesis " + itos(err)); err = vorbis_synthesis_blockin(&dsp_state, &block); - ERR_FAIL_COND_V_MSG(err != 0, 0, "Error during vorbis block processing " + itos(err)); + ERR_FAIL_COND_V_MSG(err != 0, p_frames, "Error during vorbis block processing " + itos(err)); have_packets_left = !packet->e_o_s; } diff --git a/modules/vorbis/doc_classes/AudioStreamOggVorbis.xml b/modules/vorbis/doc_classes/AudioStreamOggVorbis.xml index 7e3af6688a..d2f6745e2f 100644 --- a/modules/vorbis/doc_classes/AudioStreamOggVorbis.xml +++ b/modules/vorbis/doc_classes/AudioStreamOggVorbis.xml @@ -7,6 +7,7 @@ The AudioStreamOggVorbis class is a specialized [AudioStream] for handling Ogg Vorbis file formats. It offers functionality for loading and playing back Ogg Vorbis files, as well as managing looping and other playback properties. This class is part of the audio stream system, which also supports WAV files through the [AudioStreamWAV] class. </description> <tutorials> + <link title="Runtime file loading and saving">$DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html</link> </tutorials> <methods> <method name="load_from_buffer" qualifiers="static"> diff --git a/modules/vorbis/register_types.cpp b/modules/vorbis/register_types.cpp index 26af912999..def34220ea 100644 --- a/modules/vorbis/register_types.cpp +++ b/modules/vorbis/register_types.cpp @@ -48,8 +48,13 @@ void initialize_vorbis_module(ModuleInitializationLevel p_level) { ResourceFormatImporter::get_singleton()->add_importer(ogg_vorbis_importer); } + ClassDB::APIType prev_api = ClassDB::get_current_api(); + ClassDB::set_current_api(ClassDB::API_EDITOR); + // Required to document import options in the class reference. GDREGISTER_CLASS(ResourceImporterOggVorbis); + + ClassDB::set_current_api(prev_api); #endif GDREGISTER_CLASS(AudioStreamOggVorbis); diff --git a/modules/vorbis/resource_importer_ogg_vorbis.cpp b/modules/vorbis/resource_importer_ogg_vorbis.cpp index a8c92f06f6..bf5d964d39 100644 --- a/modules/vorbis/resource_importer_ogg_vorbis.cpp +++ b/modules/vorbis/resource_importer_ogg_vorbis.cpp @@ -90,7 +90,7 @@ bool ResourceImporterOggVorbis::has_advanced_options() const { void ResourceImporterOggVorbis::show_advanced_options(const String &p_path) { Ref<AudioStreamOggVorbis> ogg_stream = load_from_file(p_path); if (ogg_stream.is_valid()) { - AudioStreamImportSettings::get_singleton()->edit(p_path, "oggvorbisstr", ogg_stream); + AudioStreamImportSettingsDialog::get_singleton()->edit(p_path, "oggvorbisstr", ogg_stream); } } #endif |