summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/audio_stream_sample.cpp6
-rw-r--r--scene/resources/audio_stream_sample.h4
-rw-r--r--scene/resources/video_stream.h2
3 files changed, 9 insertions, 3 deletions
diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_sample.cpp
index 30c222bdff..dcd36284d4 100644
--- a/scene/resources/audio_stream_sample.cpp
+++ b/scene/resources/audio_stream_sample.cpp
@@ -406,6 +406,10 @@ int AudioStreamPlaybackSample::mix(AudioFrame *p_buffer, float p_rate_scale, int
return p_frames;
}
+void AudioStreamPlaybackSample::tag_used_streams() {
+ base->tag_used(get_playback_position());
+}
+
AudioStreamPlaybackSample::AudioStreamPlaybackSample() {}
/////////////////////
@@ -599,7 +603,7 @@ Error AudioStreamSample::save_to_wav(const String &p_path) {
return OK;
}
-Ref<AudioStreamPlayback> AudioStreamSample::instance_playback() {
+Ref<AudioStreamPlayback> AudioStreamSample::instantiate_playback() {
Ref<AudioStreamPlaybackSample> sample;
sample.instantiate();
sample->base = Ref<AudioStreamSample>(this);
diff --git a/scene/resources/audio_stream_sample.h b/scene/resources/audio_stream_sample.h
index 357febc27a..2e694cffe2 100644
--- a/scene/resources/audio_stream_sample.h
+++ b/scene/resources/audio_stream_sample.h
@@ -75,6 +75,8 @@ public:
virtual int mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) override;
+ virtual void tag_used_streams() override;
+
AudioStreamPlaybackSample();
};
@@ -144,7 +146,7 @@ public:
Error save_to_wav(const String &p_path);
- virtual Ref<AudioStreamPlayback> instance_playback() override;
+ virtual Ref<AudioStreamPlayback> instantiate_playback() override;
virtual String get_stream_name() const override;
AudioStreamSample();
diff --git a/scene/resources/video_stream.h b/scene/resources/video_stream.h
index 3e154d539b..e368ffc030 100644
--- a/scene/resources/video_stream.h
+++ b/scene/resources/video_stream.h
@@ -72,7 +72,7 @@ class VideoStream : public Resource {
public:
virtual void set_audio_track(int p_track) = 0;
- virtual Ref<VideoStreamPlayback> instance_playback() = 0;
+ virtual Ref<VideoStreamPlayback> instantiate_playback() = 0;
};
#endif