From 0e3cab41ebac855fbf13b4c409e42d2661c5842b Mon Sep 17 00:00:00 2001 From: Ellen Poe Date: Fri, 27 Aug 2021 21:51:03 -0700 Subject: Add polyphony to Audio Stream Player nodes --- scene/resources/audio_stream_sample.cpp | 4 ++++ scene/resources/audio_stream_sample.h | 2 ++ 2 files changed, 6 insertions(+) (limited to 'scene/resources') diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_sample.cpp index 2ab9b7b5a4..d018103e64 100644 --- a/scene/resources/audio_stream_sample.cpp +++ b/scene/resources/audio_stream_sample.cpp @@ -480,6 +480,10 @@ float AudioStreamSample::get_length() const { return float(len) / mix_rate; } +bool AudioStreamSample::is_monophonic() const { + return false; +} + void AudioStreamSample::set_data(const Vector &p_data) { AudioServer::get_singleton()->lock(); if (data) { diff --git a/scene/resources/audio_stream_sample.h b/scene/resources/audio_stream_sample.h index 8bf3d29123..24198e3c98 100644 --- a/scene/resources/audio_stream_sample.h +++ b/scene/resources/audio_stream_sample.h @@ -136,6 +136,8 @@ public: virtual float get_length() const override; //if supported, otherwise return 0 + virtual bool is_monophonic() const override; + void set_data(const Vector &p_data); Vector get_data() const; -- cgit v1.2.3