summaryrefslogtreecommitdiff
path: root/servers/audio/effects
diff options
context:
space:
mode:
authorEllen Poe <ellenhp@google.com>2021-08-27 21:51:03 -0700
committerEllen Poe <ellenhp@google.com>2021-09-07 09:44:39 -0700
commit0e3cab41ebac855fbf13b4c409e42d2661c5842b (patch)
treef2b0c9bd7ac718ecbf540af24208f43056650ba9 /servers/audio/effects
parentec70295c01839be4d4d2cf8c149ff32c65e75fd9 (diff)
Add polyphony to Audio Stream Player nodes
Diffstat (limited to 'servers/audio/effects')
-rw-r--r--servers/audio/effects/audio_stream_generator.cpp4
-rw-r--r--servers/audio/effects/audio_stream_generator.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/servers/audio/effects/audio_stream_generator.cpp b/servers/audio/effects/audio_stream_generator.cpp
index edb5c6d2dd..447acf53a4 100644
--- a/servers/audio/effects/audio_stream_generator.cpp
+++ b/servers/audio/effects/audio_stream_generator.cpp
@@ -64,6 +64,10 @@ float AudioStreamGenerator::get_length() const {
return 0;
}
+bool AudioStreamGenerator::is_monophonic() const {
+ return true;
+}
+
void AudioStreamGenerator::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_mix_rate", "hz"), &AudioStreamGenerator::set_mix_rate);
ClassDB::bind_method(D_METHOD("get_mix_rate"), &AudioStreamGenerator::get_mix_rate);
diff --git a/servers/audio/effects/audio_stream_generator.h b/servers/audio/effects/audio_stream_generator.h
index 6bec744081..918589f6d0 100644
--- a/servers/audio/effects/audio_stream_generator.h
+++ b/servers/audio/effects/audio_stream_generator.h
@@ -54,6 +54,7 @@ public:
virtual String get_stream_name() const override;
virtual float get_length() const override;
+ virtual bool is_monophonic() const override;
AudioStreamGenerator();
};