Added support for Ogg clips, which are decompressed when bound.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4110 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -194,8 +194,15 @@ public class ClipBuffer
|
||||
*/
|
||||
protected boolean bind (Clip clip)
|
||||
{
|
||||
AL10.alBufferData(
|
||||
_bufferId.get(0), clip.format, clip.data, clip.frequency);
|
||||
try {
|
||||
AL10.alBufferData(
|
||||
_bufferId.get(0), clip.format, clip.getData(), clip.frequency);
|
||||
} catch (IOException e) {
|
||||
Log.warning("Error decoding clip [key=" + getKey() +
|
||||
", error=" + e + "].");
|
||||
failed();
|
||||
return false;
|
||||
}
|
||||
int errno = AL10.alGetError();
|
||||
if (errno != AL10.AL_NO_ERROR) {
|
||||
Log.warning("Failed to bind clip [key=" + getKey() +
|
||||
|
||||
Reference in New Issue
Block a user