AudioStreamSample

Inherits: AudioStream < Resource < Reference < Object

Category: Core

Brief Description

Plays audio.

Member Functions

PoolByteArray get_data ( ) const
void set_data ( PoolByteArray data )

Member Variables

  • int format - Audio format. See FORMAT_* constants for values.
  • int loop_begin - Loop start in bytes.
  • int loop_end - Loop end in bytes.
  • int loop_mode - Loop mode. See LOOP_* constants for values.
  • int mix_rate - The sample rate for mixing this audio.
  • bool stereo - If true, audio is stereo. Default value: false.

Numeric Constants

  • FORMAT_8_BITS = 0 — Audio codec 8 bit.
  • FORMAT_16_BITS = 1 — Audio codec 16 bit.
  • FORMAT_IMA_ADPCM = 2 — Audio codec IMA ADPCM.
  • 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.

Description

Plays audio, can loop.

Member Function Description