Class Music

D class that wraps Mix_Music storing music for playback

class Music ;

Constructors

NameDescription
this (mixMusic, isOwner, userRef) Constructs a Music from a vanilla Mix_Music* from bindbc-sdl

Fields

NameTypeDescription
mixMusic sdl_mixer.Mix_Music*Internal Mix_Music pointer

Properties

NameTypeDescription
albumTag[get] stringWraps Mix_GetMusicAlbum (from SDL_mixer 2.6) which gets the album of the music
artistTag[get] stringWraps Mix_GetMusicArtist (from SDL_mixer 2.6) which gets the artist of the music
command[set] stringWraps Mix_SetMusicCMD which sets a command to be called when a new music is played
copyrightTag[get] stringWraps Mix_GetMusicCopyright (from SDL_mixer 2.6) which gets the copyright of the music
decoders[get] string[]Wraps Mix_GetNumMusicDecoders and Mix_GetMusicDecoder which return a list of music decoders
duration[get] doubleWraps Mix_MusicDuration (from SDL_mixer 2.6) which gets the duration of the music in seconds
fading[get] FadingWraps Mix_FadingMusic which gets the fading stage of the music
loopEndTime[get] doubleWraps Mix_GetMusicLoopEndTime (from SDL_mixer 2.6) which gets the loop end time of the music
loopLengthTime[get] doubleWraps Mix_GetMusicLoopLengthTime (from SDL_mixer 2.6) which gets the loop length time of the music
loopStartTime[get] doubleWraps Mix_GetMusicLoopStartTime (from SDL_mixer 2.6) which gets the loop start time of the music
position[get] doubleWraps Mix_GetMusicPosition (from SDL_mixer 2.6) which gets the timestamp of the music in seconds
position[set] doubleWraps Mix_SetMusicPosition which sets the timestamp position of the currently playing music
title[get] stringWraps Mix_GetMusicTitle (from SDL_mixer 2.6) which gets the title of the music
titleTag[get] stringWraps Mix_GetMusicTitleTag (from SDL_mixer 2.6) which gets the title tag of the music
type[get] MusicTypeWraps Mix_GetMusicType which gets the format type of the Music
volume[get] ubyteWraps Mix_GetMusicVolume (from SDL_mixer 2.6) which gets the volume of the music
volume[get] ubyteWraps Mix_VolumeMusic which gets the volume for music
volume[set] ubyteWraps Mix_VolumeMusic which sets the volume for music

Methods

NameDescription
fadeIn (loops, fadeMs, position) Wraps Mix_FadeInMusicPos which plays the Music with a fade-in effect
fadeOut (fadeMs) Wraps Mix_FadeOutMusic which performs fade-out for the current music playing
halt () Wraps Mix_HaltMusic which halts the playing music
hasDecoder (decoder) Wraps Mix_HasMusicDecoder (from SDL_mixer 2.6) which checks whether a music decoder is available
opEquals (rhs) Equality operator overload
pause () Wraps Mix_PauseMusic which pauses music playback
paused () Wraps Mix_PausedMusic which checks whether music is paused
play (loops) Wraps Mix_PlayMusic which plays the Music
playing () Wraps Mix_PlayingMusic which checks whether music is playing
resume () Wraps Mix_ResumeMusic which resumes music playback
rewind () Wraps Mix_RewindMusic which rewinds music playback
toHash () Gets the hash of the Music
toString () Formats the Music into its construction representation: "dsdl2.mixer.Music(<mixMusic>)"