AudioStreamSample
Category: Core
Stores audio data loaded from files.
Properties
save_to_wav ( path ) |
Enumerations
enum Format:
- FORMAT_8_BITS = 0 — Audio codec 8 bit.
- FORMAT_16_BITS = 1 — Audio codec 16 bit.
- FORMAT_IMA_ADPCM = 2 — Audio codec IMA ADPCM.
enum LoopMode:
- LOOP_DISABLED = 0 — Audio does not loop.
- LOOP_FORWARD = 1 — Audio loops the data between loop_begin and loop_end playing forward only.
- LOOP_PING_PONG = 2 — Audio loops the data between loop_begin and loop_end playing back and forth.
This class can also be used to store dynamically generated PCM audio data.
Property Descriptions
- PoolByteArray data
Setter | set_data(value) |
Getter | get_data() |
Contains the audio data in bytes.
- format
Audio format. See FORMAT_* constants for values.
- int loop_begin
Setter | set_loop_begin(value) |
Getter | get_loop_begin() |
Loop start in bytes.
- loop_end
Setter | set_loop_end(value) |
Getter | get_loop_end() |
- LoopMode loop_mode
Loop mode. See LOOP_* constants for values.
- mix_rate
Setter | set_mix_rate(value) |
Getter | get_mix_rate() |
The sample rate for mixing this audio.
Setter | set_stereo(value) |
Getter | is_stereo() |
If , audio is stereo. Default value: false
.
- Error save_to_wav ( path )
Saves the AudioStreamSample as a WAV file to . Samples with IMA ADPCM format can’t be saved.