Chunk

D class that wraps Mix_Chunk storing an audio chunk for playback

Constructors

this
this(Mix_Chunk* mixChunk, bool isOwner, void* userRef)

Constructs a dsdl2.mixer.Chunk from a vanilla Mix_Chunk* from bindbc-sdl

Destructor

~this
~this()
Undocumented in source.

Members

Functions

buffer
inout(void[]) buffer()

Gets the raw PCM audio data buffer for the dsdl2.mixer.Chunk

fadeIn
const(Channel) fadeIn(uint loops, uint fadeMs, uint ms)

Wraps Mix_FadeInChannelTimed which plays the chunk on the first available free channel with a fade-in effect

opEquals
bool opEquals(Chunk rhs)

Equality operator overload

play
const(Channel) play(uint loops, uint ms)

Wraps Mix_PlayChannelTimed which plays the chunk on the first available free channel

toHash
hash_t toHash()

Gets the hash of the dsdl2.mixer.Chunk

toString
string toString()

Formats the dsdl2.mixer.Chunk into its construction representation: "dsdl2.mixer.Chunk(<mixChunk>)"

volume
ubyte volume()

Wraps Mix_VolumeChunk which gets the volume of the chunk

volume
void volume(ubyte newVolume)

Wraps Mix_VolumeChunk which sets the volume of the chunk

Static functions

decoders
string[] decoders()

Wraps Mix_GetNumChunkDecoders and Mix_GetChunkDecoder which return a list of chunk decoders

hasDecoder
bool hasDecoder(string decoder)

Wraps Mix_HasChunkDecoder (from SDL_mixer 2.0.2) which checks whether a chunk decoder is available

Variables

mixChunk
Mix_Chunk* mixChunk;

Internal Mix_Chunk pointer

Meta