Music

D class that wraps Mix_Music storing music for playback

Constructors

this
this(Mix_Music* mixMusic, bool isOwner, void* userRef)

Constructs a dsdl2.mixer.Music from a vanilla Mix_Music* from bindbc-sdl

Destructor

~this
~this()
Undocumented in source.

Members

Functions

albumTag
string albumTag()

Wraps Mix_GetMusicAlbum (from SDL_mixer 2.6) which gets the album of the music

artistTag
string artistTag()

Wraps Mix_GetMusicArtist (from SDL_mixer 2.6) which gets the artist of the music

copyrightTag
string copyrightTag()

Wraps Mix_GetMusicCopyright (from SDL_mixer 2.6) which gets the copyright of the music

duration
double duration()

Wraps Mix_MusicDuration (from SDL_mixer 2.6) which gets the duration of the music in seconds

fadeIn
void fadeIn(uint loops, uint fadeMs, double position)

Wraps Mix_FadeInMusicPos which plays the dsdl2.mixer.Music with a fade-in effect

loopEndTime
double loopEndTime()

Wraps Mix_GetMusicLoopEndTime (from SDL_mixer 2.6) which gets the loop end time of the music

loopLengthTime
double loopLengthTime()

Wraps Mix_GetMusicLoopLengthTime (from SDL_mixer 2.6) which gets the loop length time of the music

loopStartTime
double loopStartTime()

Wraps Mix_GetMusicLoopStartTime (from SDL_mixer 2.6) which gets the loop start time of the music

opEquals
bool opEquals(Music rhs)

Equality operator overload

play
void play(uint loops)

Wraps Mix_PlayMusic which plays the dsdl2.mixer.Music

position
double position()

Wraps Mix_GetMusicPosition (from SDL_mixer 2.6) which gets the timestamp of the music in seconds

title
string title()

Wraps Mix_GetMusicTitle (from SDL_mixer 2.6) which gets the title of the music

titleTag
string titleTag()

Wraps Mix_GetMusicTitleTag (from SDL_mixer 2.6) which gets the title tag of the music

toHash
hash_t toHash()

Gets the hash of the dsdl2.mixer.Music

toString
string toString()

Formats the dsdl2.mixer.Music into its construction representation: "dsdl2.mixer.Music(<mixMusic>)"

type
MusicType type()

Wraps Mix_GetMusicType which gets the format type of the dsdl2.mixer.Music

volume
ubyte volume()

Wraps Mix_GetMusicVolume (from SDL_mixer 2.6) which gets the volume of the music

Static functions

command
void command(string newCommand)

Wraps Mix_SetMusicCMD which sets a command to be called when a new music is played

decoders
string[] decoders()

Wraps Mix_GetNumMusicDecoders and Mix_GetMusicDecoder which return a list of music decoders

fadeOut
void fadeOut(uint fadeMs)

Wraps Mix_FadeOutMusic which performs fade-out for the current music playing

fading
Fading fading()

Wraps Mix_FadingMusic which gets the fading stage of the music

halt
void halt()

Wraps Mix_HaltMusic which halts the playing music

hasDecoder
bool hasDecoder(string decoder)

Wraps Mix_HasMusicDecoder (from SDL_mixer 2.6) which checks whether a music decoder is available

pause
void pause()

Wraps Mix_PauseMusic which pauses music playback

paused
bool paused()

Wraps Mix_PausedMusic which checks whether music is paused

playing
bool playing()

Wraps Mix_PlayingMusic which checks whether music is playing

position
void position(double newPosition)

Wraps Mix_SetMusicPosition which sets the timestamp position of the currently playing music

resume
void resume()

Wraps Mix_ResumeMusic which resumes music playback

rewind
void rewind()

Wraps Mix_RewindMusic which rewinds music playback

volume
ubyte volume()

Wraps Mix_VolumeMusic which gets the volume for music

volume
void volume(ubyte newVolume)

Wraps Mix_VolumeMusic which sets the volume for music

Variables

mixMusic
Mix_Music* mixMusic;

Internal Mix_Music pointer

Meta