Reads data from the AudioStream.
Arguments
| Name | Type | Default | Description |
| count | number | nil |
The number of frames to read. When nil, reads all of the data in the stream.
|
Returns
| Name | Type | Description |
| table | {number} |
A table of audio samples.
|
Arguments
| Name | Type | Default | Description |
| count | number | nil |
The number of frames to read. When nil, reads all of the data in the stream.
|
| sound | Sound | |
A Sound to write the audio to.
|
| offset | number | 0 |
An offset to start writing into the destination (frames for Sounds, bytes for Blobs).
|
Returns
| Name | Type | Description |
| n | number |
The number of audio frames that were actually read.
|
Arguments
| Name | Type | Default | Description |
| count | number | nil |
The number of frames to read. When nil, reads all of the data in the stream.
|
| blob | Blob | |
A Blob to write the audio to.
|
| offset | number | 0 |
An offset to start writing into the destination (frames for Sounds, bytes for Blobs).
|
Returns
| Name | Type | Description |
| n | number |
The number of audio frames that were actually read.
|
When writing to a Blob or Sound, count is clamped, using the size of the destination and the offset parameter.
Only one thread can read from the stream at a time.
See also