2017-09-12 20:42:36 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
2019-04-01 10:33:56 +00:00
|
|
|
<class name="AudioStreamSample" inherits="AudioStream" category="Core" version="3.2">
|
2017-09-12 20:42:36 +00:00
|
|
|
<brief_description>
|
2017-09-16 21:12:52 +00:00
|
|
|
Plays audio.
|
2017-09-12 20:42:36 +00:00
|
|
|
</brief_description>
|
|
|
|
<description>
|
2017-09-16 21:12:52 +00:00
|
|
|
Plays audio, can loop.
|
2017-09-12 20:42:36 +00:00
|
|
|
</description>
|
|
|
|
<tutorials>
|
|
|
|
</tutorials>
|
|
|
|
<demos>
|
|
|
|
</demos>
|
|
|
|
<methods>
|
2018-08-20 22:35:30 +00:00
|
|
|
<method name="save_to_wav">
|
2019-03-12 14:48:52 +00:00
|
|
|
<return type="int" enum="Error">
|
2018-08-20 22:35:30 +00:00
|
|
|
</return>
|
|
|
|
<argument index="0" name="path" type="String">
|
|
|
|
</argument>
|
|
|
|
<description>
|
2019-03-12 14:48:52 +00:00
|
|
|
Saves the AudioStreamSample as a WAV file to [code]path[/code]. Samples with IMA ADPCM format can't be saved.
|
|
|
|
Note that a [code].wav[/code] extension is automatically appended to [code]path[/code] if it is missing.
|
2018-08-20 22:35:30 +00:00
|
|
|
</description>
|
|
|
|
</method>
|
2017-09-12 20:42:36 +00:00
|
|
|
</methods>
|
|
|
|
<members>
|
2018-04-25 19:04:03 +00:00
|
|
|
<member name="data" type="PoolByteArray" setter="set_data" getter="get_data">
|
|
|
|
Contains the audio data in bytes.
|
|
|
|
</member>
|
2017-09-13 06:49:40 +00:00
|
|
|
<member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format">
|
2017-09-16 21:12:52 +00:00
|
|
|
Audio format. See FORMAT_* constants for values.
|
2017-09-12 20:42:36 +00:00
|
|
|
</member>
|
2017-09-13 06:49:40 +00:00
|
|
|
<member name="loop_begin" type="int" setter="set_loop_begin" getter="get_loop_begin">
|
2017-09-16 21:12:52 +00:00
|
|
|
Loop start in bytes.
|
2017-09-12 20:42:36 +00:00
|
|
|
</member>
|
2017-09-13 06:49:40 +00:00
|
|
|
<member name="loop_end" type="int" setter="set_loop_end" getter="get_loop_end">
|
2017-09-16 21:12:52 +00:00
|
|
|
Loop end in bytes.
|
2017-09-12 20:42:36 +00:00
|
|
|
</member>
|
2017-09-13 06:49:40 +00:00
|
|
|
<member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" enum="AudioStreamSample.LoopMode">
|
2017-09-16 21:12:52 +00:00
|
|
|
Loop mode. See LOOP_* constants for values.
|
2017-09-12 20:42:36 +00:00
|
|
|
</member>
|
2017-09-13 06:49:40 +00:00
|
|
|
<member name="mix_rate" type="int" setter="set_mix_rate" getter="get_mix_rate">
|
2017-09-16 21:12:52 +00:00
|
|
|
The sample rate for mixing this audio.
|
2017-09-12 20:42:36 +00:00
|
|
|
</member>
|
2017-09-13 06:49:40 +00:00
|
|
|
<member name="stereo" type="bool" setter="set_stereo" getter="is_stereo">
|
2017-09-16 21:12:52 +00:00
|
|
|
If [code]true[/code], audio is stereo. Default value: [code]false[/code].
|
2017-09-12 20:42:36 +00:00
|
|
|
</member>
|
|
|
|
</members>
|
|
|
|
<constants>
|
2017-11-24 22:16:30 +00:00
|
|
|
<constant name="FORMAT_8_BITS" value="0" enum="Format">
|
2017-09-16 21:12:52 +00:00
|
|
|
Audio codec 8 bit.
|
2017-09-15 23:46:14 +00:00
|
|
|
</constant>
|
2017-11-24 22:16:30 +00:00
|
|
|
<constant name="FORMAT_16_BITS" value="1" enum="Format">
|
2017-09-16 21:12:52 +00:00
|
|
|
Audio codec 16 bit.
|
2017-09-15 23:46:14 +00:00
|
|
|
</constant>
|
2017-11-24 22:16:30 +00:00
|
|
|
<constant name="FORMAT_IMA_ADPCM" value="2" enum="Format">
|
2017-09-16 21:12:52 +00:00
|
|
|
Audio codec IMA ADPCM.
|
2017-09-15 23:46:14 +00:00
|
|
|
</constant>
|
2017-11-24 22:16:30 +00:00
|
|
|
<constant name="LOOP_DISABLED" value="0" enum="LoopMode">
|
2017-09-16 21:12:52 +00:00
|
|
|
Audio does not loop.
|
2017-09-15 23:46:14 +00:00
|
|
|
</constant>
|
2017-11-24 22:16:30 +00:00
|
|
|
<constant name="LOOP_FORWARD" value="1" enum="LoopMode">
|
2017-09-16 21:12:52 +00:00
|
|
|
Audio loops the data between loop_begin and loop_end playing forward only.
|
2017-09-15 23:46:14 +00:00
|
|
|
</constant>
|
2017-11-24 22:16:30 +00:00
|
|
|
<constant name="LOOP_PING_PONG" value="2" enum="LoopMode">
|
2017-09-16 21:12:52 +00:00
|
|
|
Audio loops the data between loop_begin and loop_end playing back and forth.
|
2017-09-15 23:46:14 +00:00
|
|
|
</constant>
|
2018-10-28 18:37:14 +00:00
|
|
|
<constant name="LOOP_BACKWARD" value="3" enum="LoopMode">
|
|
|
|
Audio loops the data between loop_begin and loop_end playing backward only.
|
|
|
|
</constant>
|
2017-09-12 20:42:36 +00:00
|
|
|
</constants>
|
|
|
|
</class>
|