public class ClipBuffer extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ClipBuffer.Observer
Used to notify parties interested in when a clip is loaded.
|
| Constructor and Description |
|---|
ClipBuffer(SoundManager manager,
ClipProvider provider,
String path)
Creates a new clip buffer with the specified path that will obtain
its clip data from the specified source.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Frees up the internal audio buffers associated with this clip.
|
Buffer |
getBuffer()
Returns a reference to this clip's buffer or
null if it is not loaded. |
ClipProvider |
getClipProvider()
Returns the provider used to load this clip.
|
String |
getKey()
Returns the unique key for this clip buffer.
|
String |
getPath()
Returns the path that identifies this sound clip.
|
int |
getSize()
Returns the size (in bytes) of this clip as reported by OpenAL.
|
boolean |
isPlayable()
Returns true if this buffer is loaded and ready to go.
|
static String |
makeKey(ClipProvider provider,
String path)
Create a key that uniquely identifies this combination of clip
provider and path.
|
void |
resolve(ClipBuffer.Observer observer)
Instructs this buffer to resolve its underlying clip and be ready
to be played ASAP.
|
public ClipBuffer(SoundManager manager, ClipProvider provider, String path)
public static String makeKey(ClipProvider provider, String path)
public String getKey()
public ClipProvider getClipProvider()
public String getPath()
public boolean isPlayable()
public Buffer getBuffer()
null if it is not loaded.public int getSize()
public void resolve(ClipBuffer.Observer observer)
public void dispose()
Copyright © 2015. All rights reserved.