jme3-ios/ios-data/templates/src/com_jme3_audio_android_AndroidOpenALSoftAudioRenderer.c
/* CloseAL closes the device belonging to the current context, and destroys the
 * context. */
CloseAL closes the device belonging to the current context, and destroys the
context.
CloseAL closes the device belonging to the current context and destroys the context .
void CloseAL()
{
    ALCdevice *device;
    ALCcontext *ctx;
    ALCboolean result;
    ctx = alcGetCurrentContext();
    if(ctx == NULL){
        fprintf(stderr, "No context found");
        return;
    }
    device = alcGetContextsDevice(ctx);
    if(device == NULL) {
        fprintf(stderr, "No device found");
        return;
    } else {
        fprintf(stderr, "alcGetContextsDevice device: %d", device);
        fprintf(stderr, "alcGetContextsDevice device addr: %d", &device);
    }
    result = alcMakeContextCurrent(NULL);
    if(!result) {
        fprintf(stderr, "alcMakeContextCurrent failed");
        return;
    }
    alcDestroyContext(ctx);
    result = alcCloseDevice(device);
}
void CloseAL ( ) { ALCdevice * device ; ALCcontext * ctx ; ALCboolean result ; ctx = alcGetCurrentContext ( ) ; if ( ctx == NULL ) { fprintf ( stderr , " " ) ; return ; } device = alcGetContextsDevice ( ctx ) ; if ( device == NULL ) { fprintf ( stderr , " " ) ; return ; } else { fprintf ( stderr , " " , device ) ; fprintf ( stderr , " " , & device ) ; } result = alcMakeContextCurrent ( NULL ) ; if ( ! result ) { fprintf ( stderr , " " ) ; return ; } alcDestroyContext ( ctx ) ; result = alcCloseDevice ( device ) ; }
CloseAL closes the device belonging to the current context, and destroys the
 context.
CloseAL closes the device belonging to the current context and destroys the context .
//    fprintf(stderr, "Getting current context");
 //    getError();
 //    fprintf(stderr, "Getting current context device");
 //    getError();
 //    fprintf(stderr, "Setting context to NULL");
 //    fprintf(stderr, "alcMakeContextCurrent returned");
 //    fprintf(stderr, "alcMakeContextCurrent returned with result: %d", result);
 //    fprintf(stderr, "Destroying context: %d", ctx);
 //    fprintf(stderr, "Destroying context addr: %d", &ctx);
 //    fprintf(stderr, "Closing device");
 //    fprintf(stderr, "alcCloseDevice result: %d", result);
