diff options
author | ShyRed <ShyRed@users.noreply.github.com> | 2018-03-08 19:11:46 +0100 |
---|---|---|
committer | ShyRed <ShyRed@users.noreply.github.com> | 2018-03-16 15:26:23 +0100 |
commit | bc1522e26865c9b84159ff4b4bcde7896fd73496 (patch) | |
tree | 04dd02043a0354801f451606c7a4d6550c04bf53 /scene/audio/audio_player.h | |
parent | 8ded15b035e9db959b7669ec72b38d1a94a8df30 (diff) |
Use fake audio playing property in editor
It appears that some time ago users were supposed to be able to include the playback of sound effects in their animations by placing keys on the "playing" property. Back then the key frame editor took the value of the checkbox in the property_editor.
Somewhere / Sometime this behaviour changed and the key frame editor is now reading the actual value from the object instead of relying on the property editor.
This commit introduces a fake active field that is returned when reading the playing property in the editor. While the actual active flag is changed when playback is finished the fake one will stay the same thus allowing the user to take their time with setting the key in the animation editor.
Diffstat (limited to 'scene/audio/audio_player.h')
-rw-r--r-- | scene/audio/audio_player.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/audio/audio_player.h b/scene/audio/audio_player.h index 21189aea6d..f2e2684642 100644 --- a/scene/audio/audio_player.h +++ b/scene/audio/audio_player.h @@ -53,6 +53,10 @@ private: volatile float setseek; volatile bool active; +#ifdef TOOLS_ENABLED + volatile bool fake_active; +#endif + float mix_volume_db; float pitch_scale; float volume_db; |