summaryrefslogtreecommitdiff
path: root/scene/animation
diff options
context:
space:
mode:
authorSilc Renew <tokage.it.lab@gmail.com>2023-01-29 00:24:52 +0900
committerSilc Renew <tokage.it.lab@gmail.com>2023-01-29 08:00:42 +0900
commitfa198c482eb0fd64442c60afd7cdfdc9aca0ae8f (patch)
tree31c3289853c0a5c9048f8d398ba4300b1384a0df /scene/animation
parent218bef90af2091afde3b1be816c87286c194a2a8 (diff)
Fix AnimatedSprite play() don't redraw immediately
Diffstat (limited to 'scene/animation')
-rw-r--r--scene/animation/animation_player.h2
-rw-r--r--scene/animation/animation_tree.h6
2 files changed, 5 insertions, 3 deletions
diff --git a/scene/animation/animation_player.h b/scene/animation/animation_player.h
index 25de278f97..b0975fbead 100644
--- a/scene/animation/animation_player.h
+++ b/scene/animation/animation_player.h
@@ -149,7 +149,7 @@ private:
HashMap<StringName, BezierAnim> bezier_anim;
struct PlayingAudioStreamInfo {
- int64_t index = -1;
+ AudioStreamPlaybackPolyphonic::ID index = -1;
double start = 0.0;
double len = 0.0;
};
diff --git a/scene/animation/animation_tree.h b/scene/animation/animation_tree.h
index 394a3a2237..c54493828f 100644
--- a/scene/animation/animation_tree.h
+++ b/scene/animation/animation_tree.h
@@ -253,12 +253,14 @@ private:
}
};
+ // Audio stream information for each audio stream placed on the track.
struct PlayingAudioStreamInfo {
- int64_t index = -1;
+ AudioStreamPlaybackPolyphonic::ID index = -1; // ID retrieved from AudioStreamPlaybackPolyphonic.
double start = 0.0;
double len = 0.0;
};
+ // Audio track information for mixng and ending.
struct PlayingAudioTrackInfo {
HashMap<int, PlayingAudioStreamInfo> stream_info;
double length = 0.0;
@@ -272,7 +274,7 @@ private:
struct TrackCacheAudio : public TrackCache {
Ref<AudioStreamPolyphonic> audio_stream;
Ref<AudioStreamPlaybackPolyphonic> audio_stream_playback;
- HashMap<ObjectID, PlayingAudioTrackInfo> playing_streams; // Animation resource RID & AudioTrack key index: PlayingAudioStreamInfo.
+ HashMap<ObjectID, PlayingAudioTrackInfo> playing_streams; // Key is Animation resource ObjectID.
TrackCacheAudio() {
type = Animation::TYPE_AUDIO;