diff options
Diffstat (limited to 'scene/audio')
-rw-r--r-- | scene/audio/audio_player.cpp | 10 | ||||
-rw-r--r-- | scene/audio/audio_player.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/scene/audio/audio_player.cpp b/scene/audio/audio_player.cpp index 661d085dfd..11e6c1b2e1 100644 --- a/scene/audio/audio_player.cpp +++ b/scene/audio/audio_player.cpp @@ -193,10 +193,10 @@ bool AudioStreamPlayer::is_playing() const { return false; } -float AudioStreamPlayer::get_pos() { +float AudioStreamPlayer::get_position() { if (stream_playback.is_valid()) { - return stream_playback->get_pos(); + return stream_playback->get_position(); } return 0; @@ -279,12 +279,12 @@ void AudioStreamPlayer::_bind_methods() { ClassDB::bind_method(D_METHOD("set_volume_db", "volume_db"), &AudioStreamPlayer::set_volume_db); ClassDB::bind_method(D_METHOD("get_volume_db"), &AudioStreamPlayer::get_volume_db); - ClassDB::bind_method(D_METHOD("play", "from_pos"), &AudioStreamPlayer::play, DEFVAL(0.0)); - ClassDB::bind_method(D_METHOD("seek", "to_pos"), &AudioStreamPlayer::seek); + ClassDB::bind_method(D_METHOD("play", "from_position"), &AudioStreamPlayer::play, DEFVAL(0.0)); + ClassDB::bind_method(D_METHOD("seek", "to_position"), &AudioStreamPlayer::seek); ClassDB::bind_method(D_METHOD("stop"), &AudioStreamPlayer::stop); ClassDB::bind_method(D_METHOD("is_playing"), &AudioStreamPlayer::is_playing); - ClassDB::bind_method(D_METHOD("get_pos"), &AudioStreamPlayer::get_pos); + ClassDB::bind_method(D_METHOD("get_position"), &AudioStreamPlayer::get_position); ClassDB::bind_method(D_METHOD("set_bus", "bus"), &AudioStreamPlayer::set_bus); ClassDB::bind_method(D_METHOD("get_bus"), &AudioStreamPlayer::get_bus); diff --git a/scene/audio/audio_player.h b/scene/audio/audio_player.h index 4bfa84f766..19b61ea5d8 100644 --- a/scene/audio/audio_player.h +++ b/scene/audio/audio_player.h @@ -83,7 +83,7 @@ public: void seek(float p_seconds); void stop(); bool is_playing() const; - float get_pos(); + float get_position(); void set_bus(const StringName &p_bus); StringName get_bus() const; |