Cauldron2D.GameMaker.Sound (Cauldron2D.GameMaker v0.2.1)

Copy Markdown View Source

A sound (a SOND entry).

audio is the index of the sound's bytes in the AUDO chunk of its audio group's file, nil when the sound is a file of its own beside the game, named file. Group 0 is the main data file; group n is audiogroupn.dat beside it. volume is 0.0–1.0.

Summary

Functions

Every stored sound in the AUDO chunk at at, as the bytes of a WAVE or Ogg file.

The sound at at.

Types

t()

@type t() :: %Cauldron2D.GameMaker.Sound{
  audio: non_neg_integer() | nil,
  file: String.t() | nil,
  flags: non_neg_integer(),
  group: non_neg_integer(),
  kind: String.t() | nil,
  name: String.t(),
  pitch: number(),
  volume: number()
}

Functions

audio(data, at)

@spec audio(binary(), non_neg_integer()) :: [binary()]

Every stored sound in the AUDO chunk at at, as the bytes of a WAVE or Ogg file.

read(data, at)

@spec read(binary(), non_neg_integer()) :: t()

The sound at at.