Channel

D class that acts as a proxy for a mixer audio channel from a channel ID

Constructors

this
this()
Undocumented in source.

Members

Functions

chunk
Chunk chunk()

Wraps Mix_GetChunk which gets the currently-playing dsdl2.mixer.Chunk in the channel

distance
void distance(ubyte newDistance)

Wraps Mix_SetDistance which sets the simulated distance for the channel playing from the listener

expire
void expire(uint ms)

Wraps Mix_ExpireChannel which halts the channel after a specified delay

fadeIn
void fadeIn(Chunk chunk, uint loops, uint fadeMs, uint ms)

Wraps Mix_FadeInChannelTimed which plays a dsdl2.mixer.Chunk in the channel with a fade-in effect

fadeOut
void fadeOut(uint fadeMs)

Wraps Mix_FadeOutChannel which performs fade-out for whatever chunk is playing in the channel

fading
Fading fading()

Wraps Mix_FadingChannel which gets the fading stage of the channel

halt
void halt()

Wraps Mix_HaltChannel which halts the channel

opEquals
bool opEquals(Channel rhs)

Equality operator overload

panning
void panning(ubyte[2] newLR)

Wraps Mix_SetPanning which sets the panning volume of the left and right channels for the track channel

pause
void pause()

Wraps Mix_Pause which pauses the channel

paused
bool paused()

Wraps Mix_Paused which checks whether the channel is paused

play
void play(Chunk chunk, uint loops, uint ms)

Wraps Mix_PlayChannelTimed which plays a dsdl2.mixer.Chunk in the channel

playing
bool playing()

Wraps Mix_Playing which checks whether the channel is playing

position
void position(Tuple!(short, ubyte) newAngleDistance)

Wraps Mix_SetPosition which sets the simulated angle and distance of the channel playing from the listener

resume
void resume()

Wraps Mix_Resume which resumes the channel

reverseStereo
void reverseStereo(bool newReverse)

Wraps Mix_SetReverseStereo which sets whether the left and right channels are flipped in the channel

toHash
hash_t toHash()

Gets the hash of the dsdl2.mixer.Channel

toString
string toString()

Formats the dsdl2.mixer.Channel showing its internal information: "dsdl2.mixer.Channel(<mixChannel>)"

volume
ubyte volume()

Wraps Mix_Volume which gets the volume of the channel

volume
void volume(ubyte newVolume)

Wraps Mix_Volume which sets the volume of the channel

Static functions

allDistance
void allDistance(ubyte newDistance)

Acts as Mix_SetDistance(MIX_CHANNEL_POST, newDistance) which sets the simulated distance for all channels as posteffect

allPanning
void allPanning(ubyte[2] newLR)

Wraps Mix_SetPanning which sets the panning volume of the left and right channels as posteffect for all channels

allPosition
void allPosition(Tuple!(short, ubyte) newAngleDistance)

Acts as Mix_SetPosition(MIX_CHANNEL_POST, newAngleDistance[0], newAngleDistance[1]) which sets the simulated angle and distance for all channels as posteffect

allReverseStereo
void allReverseStereo(bool newReverse)

Acts as Mix_SetReverseStereo(MIX_CHANNEL_POST, newReverse) which sets whether the left and right channels are flipped for all channels as posteffect

allVolume
ubyte allVolume()

Acts as Mix_Volume(-1, -1) which gets the volume of all channels

allVolume
void allVolume(ubyte newVolume)

Acts as Mix_Volume(-1, newVolume) which sets the volume of all channels

expireAll
void expireAll(uint ms)

Acts as Mix_ExpireChannel(-1, ms) which halts all channels after a specified delay

fadeOutAll
void fadeOutAll(uint fadeMs)

Acts as Mix_FadeOutChannel(-1, fadeMs) which performs fade-out for whatever chunks are playing in all channels

haltAll
void haltAll()

Acts as Mix_HaltChannel(-1) which halts all channels

pauseAll
void pauseAll()

Acts as Mix_Pause(-1) which pauses all channels

resumeAll
void resumeAll()

Acts as Mix_Resume(-1) which resumes all channels

Variables

mixChannel
uint mixChannel;

Channel ID from SDL_mixer

Meta