summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-01-02 12:24:04 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-01-02 12:24:04 -0300
commit9ed3d6d0073d6ace705f6cae6b04d2642a918a25 (patch)
tree75547b1e889e787e9e077a3b3cb0b569627056dd /scene
parent5769f8aaaed70fa28b92562255dd61c1c371acf5 (diff)
added a finished signal to StreamPlayer, closes #2249
Diffstat (limited to 'scene')
-rw-r--r--scene/audio/stream_player.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/audio/stream_player.cpp b/scene/audio/stream_player.cpp
index 74d84b8b08..0180ed4a1d 100644
--- a/scene/audio/stream_player.cpp
+++ b/scene/audio/stream_player.cpp
@@ -170,6 +170,7 @@ void StreamPlayer::stop() {
stop_request=false;
playback->stop();
resampler.flush();
+ emit_signal("finished");
//set_idle_process(false);
}
@@ -378,6 +379,8 @@ void StreamPlayer::_bind_methods() {
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/paused"), _SCS("set_paused"), _SCS("is_paused") );
ADD_PROPERTY( PropertyInfo(Variant::INT, "stream/loop_restart_time"), _SCS("set_loop_restart_time"), _SCS("get_loop_restart_time") );
ADD_PROPERTY( PropertyInfo(Variant::INT, "stream/buffering_ms"), _SCS("set_buffering_msec"), _SCS("get_buffering_msec") );
+
+ ADD_SIGNAL(MethodInfo("finished"));
}