summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2021-09-07 17:38:51 -0300
committerGitHub <noreply@github.com>2021-09-07 17:38:51 -0300
commitca11f8ad3045c280b559adea4e2263c38c2c6df4 (patch)
treea8387f731c0a35abe224bccf8cb82e672193b645 /doc/classes
parent43c896ac6a309bca229619a6d295918a3b656d6a (diff)
parent0e3cab41ebac855fbf13b4c409e42d2661c5842b (diff)
Merge pull request #52237 from ellenhp/polyphony
Add optional polyphonic playback to built-in audio player nodes
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/AudioStream.xml11
-rw-r--r--doc/classes/AudioStreamPlayer.xml3
-rw-r--r--doc/classes/AudioStreamPlayer2D.xml3
-rw-r--r--doc/classes/AudioStreamPlayer3D.xml3
4 files changed, 20 insertions, 0 deletions
diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml
index a954a06117..32e51603ee 100644
--- a/doc/classes/AudioStream.xml
+++ b/doc/classes/AudioStream.xml
@@ -28,12 +28,23 @@
<description>
</description>
</method>
+ <method name="_is_monophonic" qualifiers="virtual const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
<method name="get_length" qualifiers="const">
<return type="float" />
<description>
Returns the length of the audio stream in seconds.
</description>
</method>
+ <method name="is_monophonic" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns true if this audio stream only supports monophonic playback, or false if the audio stream supports polyphony.
+ </description>
+ </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml
index a6c437f875..b692ae858e 100644
--- a/doc/classes/AudioStreamPlayer.xml
+++ b/doc/classes/AudioStreamPlayer.xml
@@ -56,6 +56,9 @@
<member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="&amp;&quot;Master&quot;">
Bus on which this audio is playing.
</member>
+ <member name="max_polyphony" type="int" setter="set_max_polyphony" getter="get_max_polyphony" default="1">
+ The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds.
+ </member>
<member name="mix_target" type="int" setter="set_mix_target" getter="get_mix_target" enum="AudioStreamPlayer.MixTarget" default="0">
If the audio configuration has more than two speakers, this sets the target channels. See [enum MixTarget] constants.
</member>
diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml
index c40c223091..e36a428499 100644
--- a/doc/classes/AudioStreamPlayer2D.xml
+++ b/doc/classes/AudioStreamPlayer2D.xml
@@ -61,6 +61,9 @@
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="2000.0">
Maximum distance from which audio is still hearable.
</member>
+ <member name="max_polyphony" type="int" setter="set_max_polyphony" getter="get_max_polyphony" default="1">
+ The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds.
+ </member>
<member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0">
The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate.
</member>
diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml
index 584f03399c..fa2fa5a8e3 100644
--- a/doc/classes/AudioStreamPlayer3D.xml
+++ b/doc/classes/AudioStreamPlayer3D.xml
@@ -83,6 +83,9 @@
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="0.0">
Sets the distance from which the [member out_of_range_mode] takes effect. Has no effect if set to 0.
</member>
+ <member name="max_polyphony" type="int" setter="set_max_polyphony" getter="get_max_polyphony" default="1">
+ The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds.
+ </member>
<member name="out_of_range_mode" type="int" setter="set_out_of_range_mode" getter="get_out_of_range_mode" enum="AudioStreamPlayer3D.OutOfRangeMode" default="0">
Decides if audio should pause when source is outside of [member max_distance] range.
</member>