Merge pull request #107989 from Jojo-1000/docs-add-required-qualifier
Documentation: Add missing required qualifier for various classes
This commit is contained in:
@ -33,23 +33,15 @@
|
||||
#include "core/config/project_settings.h"
|
||||
|
||||
void AudioStreamPlayback::start(double p_from_pos) {
|
||||
if (GDVIRTUAL_CALL(_start, p_from_pos)) {
|
||||
return;
|
||||
}
|
||||
ERR_FAIL_MSG("AudioStreamPlayback::start unimplemented!");
|
||||
GDVIRTUAL_CALL(_start, p_from_pos);
|
||||
}
|
||||
void AudioStreamPlayback::stop() {
|
||||
if (GDVIRTUAL_CALL(_stop)) {
|
||||
return;
|
||||
}
|
||||
ERR_FAIL_MSG("AudioStreamPlayback::stop unimplemented!");
|
||||
GDVIRTUAL_CALL(_stop);
|
||||
}
|
||||
bool AudioStreamPlayback::is_playing() const {
|
||||
bool ret;
|
||||
if (GDVIRTUAL_CALL(_is_playing, ret)) {
|
||||
return ret;
|
||||
}
|
||||
ERR_FAIL_V_MSG(false, "AudioStreamPlayback::is_playing unimplemented!");
|
||||
bool ret = false;
|
||||
GDVIRTUAL_CALL(_is_playing, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int AudioStreamPlayback::get_loop_count() const {
|
||||
@ -59,11 +51,9 @@ int AudioStreamPlayback::get_loop_count() const {
|
||||
}
|
||||
|
||||
double AudioStreamPlayback::get_playback_position() const {
|
||||
double ret;
|
||||
if (GDVIRTUAL_CALL(_get_playback_position, ret)) {
|
||||
return ret;
|
||||
}
|
||||
ERR_FAIL_V_MSG(0, "AudioStreamPlayback::get_playback_position unimplemented!");
|
||||
double ret = 0.0;
|
||||
GDVIRTUAL_CALL(_get_playback_position, ret);
|
||||
return ret;
|
||||
}
|
||||
void AudioStreamPlayback::seek(double p_time) {
|
||||
GDVIRTUAL_CALL(_seek, p_time);
|
||||
@ -250,10 +240,8 @@ int AudioStreamPlaybackResampled::mix(AudioFrame *p_buffer, float p_rate_scale,
|
||||
|
||||
Ref<AudioStreamPlayback> AudioStream::instantiate_playback() {
|
||||
Ref<AudioStreamPlayback> ret;
|
||||
if (GDVIRTUAL_CALL(_instantiate_playback, ret)) {
|
||||
return ret;
|
||||
}
|
||||
ERR_FAIL_V_MSG(Ref<AudioStreamPlayback>(), "Method must be implemented!");
|
||||
GDVIRTUAL_CALL(_instantiate_playback, ret);
|
||||
return ret;
|
||||
}
|
||||
String AudioStream::get_stream_name() const {
|
||||
String ret;
|
||||
|
||||
@ -81,11 +81,11 @@ class AudioStreamPlayback : public RefCounted {
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
PackedVector2Array _mix_audio_bind(float p_rate_scale, int p_frames);
|
||||
GDVIRTUAL1(_start, double)
|
||||
GDVIRTUAL0(_stop)
|
||||
GDVIRTUAL0RC(bool, _is_playing)
|
||||
GDVIRTUAL1_REQUIRED(_start, double)
|
||||
GDVIRTUAL0_REQUIRED(_stop)
|
||||
GDVIRTUAL0RC_REQUIRED(bool, _is_playing)
|
||||
GDVIRTUAL0RC(int, _get_loop_count)
|
||||
GDVIRTUAL0RC(double, _get_playback_position)
|
||||
GDVIRTUAL0RC_REQUIRED(double, _get_playback_position)
|
||||
GDVIRTUAL1(_seek, double)
|
||||
GDVIRTUAL3R_REQUIRED(int, _mix, GDExtensionPtr<AudioFrame>, float, int)
|
||||
GDVIRTUAL0(_tag_used_streams)
|
||||
@ -170,7 +170,7 @@ class AudioStream : public Resource {
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
||||
GDVIRTUAL0RC(Ref<AudioStreamPlayback>, _instantiate_playback)
|
||||
GDVIRTUAL0RC_REQUIRED(Ref<AudioStreamPlayback>, _instantiate_playback)
|
||||
GDVIRTUAL0RC(String, _get_stream_name)
|
||||
GDVIRTUAL0RC(double, _get_length)
|
||||
GDVIRTUAL0RC(bool, _is_monophonic)
|
||||
|
||||
Reference in New Issue
Block a user