MusicController
Play, choose, fade-in/out and generally manage music track playback.
Main methods: chooseTrack, pause, resume, setModList, isPlaying, gracefulShutdown
Constructors
Types
Functions
Choose adequate entry from getAllMusicFiles
Chooses and plays a music track using an adaptable approach - for details see the wiki. Called without parameters it will choose a new ambient music track and start playing it with fade-in/out. Will do nothing when no music files exist or the master volume is zero.
Variant of chooseTrack that tries several moods (suffixes) until a match is chosen
Fade out then shutdown with a given duration in seconds
Get sequence of all existing music files
Get sequence of potential music locations
Soft shutdown of music playback, with fadeout
Determines whether any music tracks are available for the options menu
This tells the music controller about active mods - all are allowed to provide tracks
Forceful shutdown of music playback and timers - see gracefulShutdown
Properties
mirrors GameSettings.musicVolume - use setVolume to update
Pause in seconds between tracks unless chooseTrack is called to force a track change