Sounds
object Sounds
Content copied to clipboard
Generates Gdx Sound objects from UncivSound ones on demand, only once per key (two UncivSound custom instances with the same filename are considered equal).
Gdx asks Sound usage to respect the Disposable contract, but since we're only caching a handful of them in memory we should be able to get away with keeping them alive for the app lifetime - and we do dispose them when the app is disposed.
Types
GetSoundResult
Link copied to clipboard
Holds a Gdx Sound and a flag indicating the sound is freshly loaded and not from cache
SupportedExtensions
Link copied to clipboard
Functions
checkCache
Link copied to clipboard
private fun checkCache()
Content copied to clipboard
Ensure cache is not outdated
clearCache
Link copied to clipboard
fun clearCache()
Content copied to clipboard
Release cached Sound resources
get
Link copied to clipboard
Retrieve (if not cached create from resources) a Gdx Sound from an UncivSound
getFolders
Link copied to clipboard
Build list of folders to look for sounds
play
Link copied to clipboard
Find, cache and play a Sound
Properties
debugMessages
Link copied to clipboard
modListHash
Link copied to clipboard
soundMap
Link copied to clipboard
Sources
jvm source
Link copied to clipboard