mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Proofread and improve the whole class reference
- Document a few more properties and methods - Add more information to many classes - Fix lots of typos and gramar mistakes - Use [code] tags for parameters consistently - Use [b] and [i] tags consistently - Put "Warning:" and "Note:" on their own line to be more visible, and make them always bold - Tweak formatting in code examples to be more readable - Use double quotes consistently - Add more links to third-party technologies
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AudioStreamSample" inherits="AudioStream" category="Core" version="3.2">
|
||||
<brief_description>
|
||||
Stores audio data loaded from [code].wav[/code] files.
|
||||
Stores audio data loaded from WAV files.
|
||||
</brief_description>
|
||||
<description>
|
||||
AudioStreamSample stores sound samples loaded from [code].wav[/code] files. To play the stored sound use an [AudioStreamPlayer] (for background music) or [AudioStreamPlayer2D]/[AudioStreamPlayer3D] (for positional audio). The sound can be looped.
|
||||
This class can also be used to store dynamically generated PCM audio data.
|
||||
AudioStreamSample stores sound samples loaded from WAV files. To play the stored sound, use an [AudioStreamPlayer] (for non-positional audio) or [AudioStreamPlayer2D]/[AudioStreamPlayer3D] (for positional audio). The sound can be looped.
|
||||
This class can also be used to store dynamically-generated PCM audio data.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
@@ -17,7 +17,7 @@
|
||||
</argument>
|
||||
<description>
|
||||
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.
|
||||
[b]Note:[/b] A [code].wav[/code] extension is automatically appended to [code]path[/code] if it is missing.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
@@ -26,7 +26,7 @@
|
||||
Contains the audio data in bytes.
|
||||
</member>
|
||||
<member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format">
|
||||
Audio format. See FORMAT_* constants for values.
|
||||
Audio format. See [code]FORMAT_*[/code] constants for values.
|
||||
</member>
|
||||
<member name="loop_begin" type="int" setter="set_loop_begin" getter="get_loop_begin">
|
||||
Loop start in bytes.
|
||||
@@ -35,7 +35,7 @@
|
||||
Loop end in bytes.
|
||||
</member>
|
||||
<member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" enum="AudioStreamSample.LoopMode">
|
||||
Loop mode. See LOOP_* constants for values.
|
||||
Loop mode. See [code]LOOP_*[/code] constants for values.
|
||||
</member>
|
||||
<member name="mix_rate" type="int" setter="set_mix_rate" getter="get_mix_rate">
|
||||
The sample rate for mixing this audio.
|
||||
@@ -46,25 +46,25 @@
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="FORMAT_8_BITS" value="0" enum="Format">
|
||||
Audio codec 8 bit.
|
||||
8-bit audio codec.
|
||||
</constant>
|
||||
<constant name="FORMAT_16_BITS" value="1" enum="Format">
|
||||
Audio codec 16 bit.
|
||||
16-bit audio codec.
|
||||
</constant>
|
||||
<constant name="FORMAT_IMA_ADPCM" value="2" enum="Format">
|
||||
Audio codec IMA ADPCM.
|
||||
Audio is compressed using IMA ADPCM.
|
||||
</constant>
|
||||
<constant name="LOOP_DISABLED" value="0" enum="LoopMode">
|
||||
Audio does not loop.
|
||||
</constant>
|
||||
<constant name="LOOP_FORWARD" value="1" enum="LoopMode">
|
||||
Audio loops the data between loop_begin and loop_end playing forward only.
|
||||
Audio loops the data between [member loop_begin] and [member loop_end] playing forward only.
|
||||
</constant>
|
||||
<constant name="LOOP_PING_PONG" value="2" enum="LoopMode">
|
||||
Audio loops the data between loop_begin and loop_end playing back and forth.
|
||||
Audio loops the data between [member loop_begin] and [member loop_end] playing back and forth.
|
||||
</constant>
|
||||
<constant name="LOOP_BACKWARD" value="3" enum="LoopMode">
|
||||
Audio loops the data between loop_begin and loop_end playing backward only.
|
||||
Audio loops the data between [member loop_begin] and [member loop_end] playing backward only.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
||||
|
||||
Reference in New Issue
Block a user