protected class SoundPlayer.LoadedSoundCache extends java.util.LinkedHashMap<java.lang.Integer,SoundPlayer.SoundInfo>
SoundPlayer.LoadedSoundCache keeps track of loaded sounds, mapping sound resource id to loaded
sound id. It keeps track of which sounds have been recently used, and unloads neglected
songs when a configured capacity of loaded sounds has been reached.| Modifier and Type | Method and Description |
|---|---|
void |
noteSoundUsage(SoundPlayer.SoundInfo soundInfo)
update the fact that this key has been just used, again
|
SoundPlayer.SoundInfo |
remove(java.lang.Object key) |
protected boolean |
removeEldestEntry( |
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, size, valuespublic void noteSoundUsage(SoundPlayer.SoundInfo soundInfo)
protected boolean removeEldestEntry(eldest)
removeEldestEntry in class java.util.LinkedHashMap<java.lang.Integer,SoundPlayer.SoundInfo>public SoundPlayer.SoundInfo remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Integer,SoundPlayer.SoundInfo>remove in class java.util.HashMap<java.lang.Integer,SoundPlayer.SoundInfo>