diff options
author | Ellen Poe <ellenhp@google.com> | 2021-08-27 21:51:03 -0700 |
---|---|---|
committer | Ellen Poe <ellenhp@google.com> | 2021-09-07 09:44:39 -0700 |
commit | 0e3cab41ebac855fbf13b4c409e42d2661c5842b (patch) | |
tree | f2b0c9bd7ac718ecbf540af24208f43056650ba9 /scene/resources | |
parent | ec70295c01839be4d4d2cf8c149ff32c65e75fd9 (diff) |
Add polyphony to Audio Stream Player nodes
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/audio_stream_sample.cpp | 4 | ||||
-rw-r--r-- | scene/resources/audio_stream_sample.h | 2 |
2 files changed, 6 insertions, 0 deletions
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<uint8_t> &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<uint8_t> &p_data); Vector<uint8_t> get_data() const; |