Class SourcePool
- java.lang.Object
-
- com.github.ranchordo.lepton.engine.util.Deletable
-
- com.github.ranchordo.lepton.optim.objpoollib.VariedAbstractObjectPool<T>
-
- com.github.ranchordo.lepton.optim.objpoollib.AbstractObjectPool<Source>
-
- com.github.ranchordo.lepton.engine.audio.SourcePool
-
public class SourcePool extends AbstractObjectPool<Source>
AbstractObjectPool extension for storing and managing OpenAL sources. The idea behid unifiedPos and unifiedVel is to copy the pointers to a single instance of each one to each source, that way we don't need to nmanually set the vectors every single frame. Mutability FTW!
-
-
Field Summary
-
Fields inherited from class com.github.ranchordo.lepton.optim.objpoollib.VariedAbstractObjectPool
freeThshld, inUse, pool, printExpansion
-
-
Constructor Summary
Constructors Constructor Description SourcePool(String type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PoolElement<Source>
getPlaying(String key)
void
handleDeletion(PoolElement<Source> i)
Override this as a "destructor"void
logic(javax.vecmath.Point3f pos)
Gotta be done on all the frames.void
play(Sound sound, String key)
void
play(String key, Soundtrack soundtrack)
Play a sound from a soundtrack object.-
Methods inherited from class com.github.ranchordo.lepton.optim.objpoollib.AbstractObjectPool
alloc
-
Methods inherited from class com.github.ranchordo.lepton.optim.objpoollib.VariedAbstractObjectPool
alloc, cleanOld, delete, getPoolType, setInitCreator
-
-
-
-
Constructor Detail
-
SourcePool
public SourcePool(String type)
-
-
Method Detail
-
getPlaying
public PoolElement<Source> getPlaying(String key)
-
logic
public void logic(javax.vecmath.Point3f pos)
Gotta be done on all the frames.
-
play
public void play(String key, Soundtrack soundtrack)
Play a sound from a soundtrack object.
-
handleDeletion
public void handleDeletion(PoolElement<Source> i)
Description copied from class:VariedAbstractObjectPool
Override this as a "destructor"- Overrides:
handleDeletion
in classVariedAbstractObjectPool<Source>
-
-