diff -r b7390a3040f8 -r a4b039ee2eb0 openalbridge/openalbridge.c --- a/openalbridge/openalbridge.c Sun Oct 11 20:40:03 2009 +0000 +++ b/openalbridge/openalbridge.c Sun Oct 11 22:17:50 2009 +0000 @@ -74,7 +74,6 @@ prog = programname; - /*Position of the listener*/ ALfloat ListenerPos[] = { 0.0, 0.0, 0.0 }; /*Velocity of the listener*/ @@ -88,7 +87,7 @@ return AL_FALSE; } - if (usehardware) + if (usehardware = AL_TRUE) device = alcOpenDevice(NULL); else device = alcOpenDevice("Generic Software"); @@ -273,8 +272,9 @@ } /*Set volume for sound number index*/ - if (index >= globalindex) { - fprintf(stderr, "ERROR 'openal_setvolume()': index out of bounds (got %d, max %d)\n", index, globalindex); + if (index >= globalsize) { + errno = EINVAL; + err_ret("(%s) ERROR - Index out of bounds (got %d, max %d)", prog, index, globalindex); return AL_FALSE; }