protected class SoundPlayer.LoadedSoundCache
extends java.lang.Object
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 |
---|---|
SoundPlayer.SoundInfo |
getFile(java.io.File file) |
SoundPlayer.SoundInfo |
getHash(java.lang.String hashString) |
SoundPlayer.SoundInfo |
getResource(int resourceId) |
void |
noteSoundUsage(SoundPlayer.SoundInfo info)
update the fact that this sound has been just used, again
|
void |
putFile(java.io.File file,
SoundPlayer.SoundInfo info) |
void |
putResource(int resourceId,
SoundPlayer.SoundInfo info) |
public SoundPlayer.SoundInfo getResource(int resourceId)
public SoundPlayer.SoundInfo getFile(java.io.File file)
public SoundPlayer.SoundInfo getHash(java.lang.String hashString)
public void putResource(int resourceId, SoundPlayer.SoundInfo info)
public void putFile(java.io.File file, SoundPlayer.SoundInfo info)
public void noteSoundUsage(SoundPlayer.SoundInfo info)