public class AudioSourceLoader extends BinaryLoader<AudioSource,AudioBuffer>
| Modifier and Type | Field and Description |
|---|---|
protected ByteBuffer |
data |
protected Format |
format |
protected int |
frequency |
| Constructor and Description |
|---|
AudioSourceLoader() |
| Modifier and Type | Method and Description |
|---|---|
AudioSource |
fromCache(AudioBuffer value)
This method should construct the object from a cached
value provided by the ResourceLoader
|
AudioSource |
get()
This should used the information, generated during
loading and construct an Object.
|
Class<AudioBuffer> |
getCacheType()
Returns the Type of the Cache data.
|
void |
load(String name,
InputStream input)
This performs any type of loading and parsing.
|
cache, getCacheprotected ByteBuffer data
protected Format format
protected int frequency
public AudioSource fromCache(AudioBuffer value) throws Exception
fromCache in class BinaryLoader<AudioSource,AudioBuffer>value - CacheException - could be anything (from loading over parsing to memory errors)public Class<AudioBuffer> getCacheType()
getCacheType in class BinaryLoader<AudioSource,AudioBuffer>public void load(String name, InputStream input) throws LoadingException
name - The name of the original fileinput - The input fileLoadingException - when the loading failspublic AudioSource get() throws Exception
Exception - anything can go wrong ;)Copyright © 2015. All rights reserved.