Improve AudioStreamSample and AudioStreamGenerator documentation

- Add a link to the audio generator demo in AudioStreamGenerator
  and AudioStreamGeneratorPlayback.
- Mention that signed PCM8 data is expected in AudioStreamSample
  (and how to convert unsigned PCM8 to signed PCM8).
This commit is contained in:
Hugo Locurcio 2019-08-31 20:14:58 +02:00
parent b17b51d970
commit b0c8d12a63
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C
3 changed files with 3 additions and 0 deletions

View file

@ -5,6 +5,7 @@
<description>
</description>
<tutorials>
<link>https://github.com/godotengine/godot-demo-projects/tree/master/audio/generator</link>
</tutorials>
<methods>
</methods>

View file

@ -5,6 +5,7 @@
<description>
</description>
<tutorials>
<link>https://github.com/godotengine/godot-demo-projects/tree/master/audio/generator</link>
</tutorials>
<methods>
<method name="can_push_buffer" qualifiers="const">

View file

@ -24,6 +24,7 @@
<members>
<member name="data" type="PoolByteArray" setter="set_data" getter="get_data" default="PoolByteArray( )">
Contains the audio data in bytes.
[b]Note:[/b] This property expects signed PCM8 data. To convert unsigned PCM8 to signed PCM8, subtract 128 from each byte.
</member>
<member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format" default="0">
Audio format. See [code]FORMAT_*[/code] constants for values.