diff options
author | Saracen <SaracenOne@gmail.com> | 2019-07-16 04:10:26 +0100 |
---|---|---|
committer | Saracen <SaracenOne@gmail.com> | 2019-07-16 04:10:26 +0100 |
commit | 47c558b98abf842910c780294314326662410cdf (patch) | |
tree | 99c2be7d63a56ac997d0f354b7894ae12463fa10 /servers/audio_server.cpp | |
parent | c81ec6f26d40b70283958a4ef3e216fb32cbaf14 (diff) |
Expose audio callbacks as signals.
Diffstat (limited to 'servers/audio_server.cpp')
-rw-r--r-- | servers/audio_server.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index d25c27e102..2cf6a67bef 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -338,6 +338,8 @@ void AudioServer::_mix_step() { E->get().callback(E->get().userdata); } + emit_signal("audio_mix_callback"); + for (int i = buses.size() - 1; i >= 0; i--) { //go bus by bus Bus *bus = buses[i]; @@ -1057,6 +1059,8 @@ void AudioServer::update() { E->get().callback(E->get().userdata); } + + emit_signal("audio_update_callback"); } void AudioServer::load_default_bus_layout() { @@ -1417,6 +1421,8 @@ void AudioServer::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::REAL, "global_rate_scale"), "set_global_rate_scale", "get_global_rate_scale"); ADD_SIGNAL(MethodInfo("bus_layout_changed")); + ADD_SIGNAL(MethodInfo("audio_mix_callback")); + ADD_SIGNAL(MethodInfo("audio_update_callback")); BIND_ENUM_CONSTANT(SPEAKER_MODE_STEREO); BIND_ENUM_CONSTANT(SPEAKER_SURROUND_31); |