Class Chunk

D class that wraps Mix_Chunk storing an audio chunk for playback

class Chunk ;

Constructors

NameDescription
this (mixChunk, isOwner, userRef) Constructs a Chunk from a vanilla Mix_Chunk* from bindbc-sdl

Fields

NameTypeDescription
mixChunk sdl_mixer.Mix_Chunk*Internal Mix_Chunk pointer

Properties

NameTypeDescription
buffer[get] inout(void[])Gets the raw PCM audio data buffer for the Chunk
decoders[get] string[]Wraps Mix_GetNumChunkDecoders and Mix_GetChunkDecoder which return a list of chunk decoders
volume[get] ubyteWraps Mix_VolumeChunk which gets the volume of the chunk
volume[set] ubyteWraps Mix_VolumeChunk which sets the volume of the chunk

Methods

NameDescription
fadeIn (loops, fadeMs, ms) Wraps Mix_FadeInChannelTimed which plays the chunk on the first available free channel with a fade-in effect
hasDecoder (decoder) Wraps Mix_HasChunkDecoder (from SDL_mixer 2.0.2) which checks whether a chunk decoder is available
opEquals (rhs) Equality operator overload
play (loops, ms) Wraps Mix_PlayChannelTimed which plays the chunk on the first available free channel
toHash () Gets the hash of the Chunk
toString () Formats the Chunk into its construction representation: "dsdl2.mixer.Chunk(<mixChunk>)"