misc/openalbridge/openalbridge.c
changeset 3356 3ae3fccb439e
parent 3353 a767dd3786b5
child 3360 717b4e46e855
equal deleted inserted replaced
3355:dc9e61e67484 3356:3ae3fccb439e
    91             err_ret("(%s) WARN - OpenAL already initialized", prog);
    91             err_ret("(%s) WARN - OpenAL already initialized", prog);
    92             return AL_FALSE;
    92             return AL_FALSE;
    93         }
    93         }
    94         
    94         
    95         if (usehardware == AL_TRUE) {
    95         if (usehardware == AL_TRUE) {
    96              default_device = alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
    96             default_device = alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
    97             device = alcOpenDevice(default_device);
    97             device = alcOpenDevice(default_device);
    98         } else
    98         } else
    99             device = alcOpenDevice("Generic Software");
    99             device = alcOpenDevice("Generic Software");
   100         
   100         
   101         if (device == NULL) {
   101         if (device == NULL) {
   510             errno = EINVAL;
   510             errno = EINVAL;
   511             err_ret("(%s) ERROR - Index out of bounds (got %d, max %d)", prog, index, globalindex);
   511             err_ret("(%s) ERROR - Index out of bounds (got %d, max %d)", prog, index, globalindex);
   512             return AL_FALSE;
   512             return AL_FALSE;
   513         }
   513         }
   514         globalindex--;
   514         globalindex--;
       
   515         // most likely should do other stuff
   515         
   516         
   516         alGetError();  /* clear any AL errors beforehand */
   517         alGetError();  /* clear any AL errors beforehand */
   517         
   518         
   518         return AL_TRUE;
   519         return AL_TRUE;
   519     }
   520     }