Beispiel #1
0
static void OPL_SDL_Shutdown(void)
{
    Mix_HookMusic(NULL, NULL);

    if (sdl_was_initialized)
    {
        Mix_CloseAudio();
        SDL_QuitSubSystem(SDL_INIT_AUDIO);
        OPL_Queue_Destroy(callback_queue);
        free(mix_buffer);
        sdl_was_initialized = 0;
    }

/*
    if (opl_chip != NULL)
    {
        OPLDestroy(opl_chip);
        opl_chip = NULL;
    }
    */

    if (callback_mutex != NULL)
    {
        SDL_DestroyMutex(callback_mutex);
        callback_mutex = NULL;
    }

    if (callback_queue_mutex != NULL)
    {
        SDL_DestroyMutex(callback_queue_mutex);
        callback_queue_mutex = NULL;
    }
}
Beispiel #2
0
void OPL_Shutdown(void)
{
	if (callback_queue)
	{
		OPL_Queue_Destroy(callback_queue);
		free(mix_buffer);

		callback_queue = NULL;
		mix_buffer = NULL;
	}
}
Beispiel #3
0
static void FreeResources(void)
{
    OPL_Queue_Destroy(callback_queue);
    SDL_DestroyMutex(callback_queue_mutex);
    SDL_DestroyMutex(timer_mutex);
}