If we're going to call alGetError we may as well make sure it's related
to what we're checking. Right? git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@1177 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -147,6 +147,7 @@ public class ClipBuffer
|
||||
|
||||
// create our OpenAL buffer and then queue ourselves up to have
|
||||
// our clip data loaded
|
||||
AL10.alGetError(); // throw away any unchecked error prior to an op we want to check
|
||||
_buffer = new Buffer(_manager);
|
||||
int errno = AL10.alGetError();
|
||||
if (errno != AL10.AL_NO_ERROR) {
|
||||
@@ -203,6 +204,7 @@ public class ClipBuffer
|
||||
*/
|
||||
protected boolean bind (Clip clip)
|
||||
{
|
||||
AL10.alGetError(); // throw away any unchecked error prior to an op we want to check
|
||||
_buffer.setData(clip.format, clip.data, clip.frequency);
|
||||
int errno = AL10.alGetError();
|
||||
if (errno != AL10.AL_NO_ERROR) {
|
||||
|
||||
@@ -124,6 +124,7 @@ public class SoundGroup
|
||||
|
||||
// create our sources (or as many of them as we can)
|
||||
for (int ii = 0; ii < sources; ii++) {
|
||||
AL10.alGetError(); // throw away any unchecked error prior to an op we want to check
|
||||
PooledSource pooled = new PooledSource();
|
||||
pooled.source = new Source(manager);
|
||||
int errno = AL10.alGetError();
|
||||
|
||||
@@ -202,6 +202,8 @@ public class SoundManager
|
||||
{
|
||||
_rqueue = rqueue;
|
||||
|
||||
AL10.alGetError(); // throw away any unchecked error prior to an op we want to check
|
||||
|
||||
// initialize the OpenAL sound system
|
||||
try {
|
||||
AL.create("", 44100, 15, false);
|
||||
|
||||
Reference in New Issue
Block a user