public abstract class AsyncSoundResult extends java.lang.Object implements AsyncResult<Sound>
| Modifier and Type | Field and Description |
|---|---|
protected FileHandle |
handle |
| Constructor and Description |
|---|
AsyncSoundResult(FileHandle file) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.util.concurrent.Callable<java.lang.Object> |
asyncReadFile(FileHandle file)
Returns a
Callable which does the I/O required to load the sound. |
Sound |
getResult()
Returns the
Sound object. |
boolean |
isFinished()
Returns if the sound has been loaded.
|
protected abstract Sound |
makeSound(AsyncResult<java.lang.Object> result)
Instantiates a
Sound object on the current thread. |
protected final FileHandle handle
public AsyncSoundResult(FileHandle file)
public boolean isFinished()
isFinished in interface AsyncFuturepublic Sound getResult()
Sound object. If the platform doesn't support async sound loading (see Audio.newAsyncSound(FileHandle))
the sound object is cached for future access.getResult in interface AsyncResult<Sound>Sound objectprotected abstract java.util.concurrent.Callable<java.lang.Object> asyncReadFile(FileHandle file)
Callable which does the I/O required to load the sound.file - The FileHandle to load the audio fromCallable doing the required I/O.protected abstract Sound makeSound(AsyncResult<java.lang.Object> result)
Sound object on the current thread.result - an AsyncResult containing the results of {asyncReadFile(FileHandle)}Sound object