Add polyphony to Audio Stream Player nodes
This commit is contained in:
parent
ec70295c01
commit
0e3cab41eb
22 changed files with 428 additions and 242 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -56,6 +56,9 @@
|
|||
<member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="&"Master"">
|
||||
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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue