summaryrefslogtreecommitdiff
path: root/scene/2d/audio_stream_player_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/audio_stream_player_2d.cpp')
-rw-r--r--scene/2d/audio_stream_player_2d.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp
index 4b108996f0..73e633139b 100644
--- a/scene/2d/audio_stream_player_2d.cpp
+++ b/scene/2d/audio_stream_player_2d.cpp
@@ -113,7 +113,7 @@ void AudioStreamPlayer2D::_notification(int p_what) {
AudioServer::get_singleton()->remove_callback(_mix_audios, this);
}
- if (p_what == NOTIFICATION_INTERNAL_FIXED_PROCESS) {
+ if (p_what == NOTIFICATION_INTERNAL_PHYSICS_PROCESS) {
//update anything related to position first, if possible of course
@@ -145,7 +145,7 @@ void AudioStreamPlayer2D::_notification(int p_what) {
if (!area2d->is_overriding_audio_bus())
continue;
- StringName bus_name = area2d->get_audio_bus();
+ StringName bus_name = area2d->get_audio_bus_name();
bus_index = AudioServer::get_singleton()->thread_find_bus_index(bus_name);
break;
}
@@ -203,7 +203,7 @@ void AudioStreamPlayer2D::_notification(int p_what) {
//stop playing if no longer active
if (!active) {
- set_fixed_process_internal(false);
+ set_physics_process_internal(false);
//do not update, this makes it easier to animate (will shut off otherise)
//_change_notify("playing"); //update property in editor
emit_signal("finished");
@@ -255,7 +255,7 @@ void AudioStreamPlayer2D::play(float p_from_pos) {
if (stream_playback.is_valid()) {
setplay = p_from_pos;
output_ready = false;
- set_fixed_process_internal(true);
+ set_physics_process_internal(true);
}
}
@@ -270,7 +270,7 @@ void AudioStreamPlayer2D::stop() {
if (stream_playback.is_valid()) {
active = false;
- set_fixed_process_internal(false);
+ set_physics_process_internal(false);
setplay = -1;
}
}
@@ -284,10 +284,10 @@ bool AudioStreamPlayer2D::is_playing() const {
return false;
}
-float AudioStreamPlayer2D::get_position() {
+float AudioStreamPlayer2D::get_playback_position() {
if (stream_playback.is_valid()) {
- return stream_playback->get_position();
+ return stream_playback->get_playback_position();
}
return 0;
@@ -395,7 +395,7 @@ void AudioStreamPlayer2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("stop"), &AudioStreamPlayer2D::stop);
ClassDB::bind_method(D_METHOD("is_playing"), &AudioStreamPlayer2D::is_playing);
- ClassDB::bind_method(D_METHOD("get_position"), &AudioStreamPlayer2D::get_position);
+ ClassDB::bind_method(D_METHOD("get_playback_position"), &AudioStreamPlayer2D::get_playback_position);
ClassDB::bind_method(D_METHOD("set_bus", "bus"), &AudioStreamPlayer2D::set_bus);
ClassDB::bind_method(D_METHOD("get_bus"), &AudioStreamPlayer2D::get_bus);