static int load_dll() { #ifdef WINDOWS_VERSION HMODULE dll = NULL; #else void * dll = NULL; #endif if (dPa_OpenDefaultStream != NULL) { return 1; } dll = openDll(); if (dll) { dPa_Initialize = (Pa_InitializeProc)getdllproc(dll,"Pa_Initialize"); dPa_Terminate = (Pa_TerminateProc)getdllproc(dll,"Pa_Terminate"); dPa_CloseStream = (Pa_CloseStreamProc)getdllproc(dll,"Pa_CloseStream"); dPa_StartStream = (Pa_StartStreamProc)getdllproc(dll,"Pa_StartStream"); dPa_OpenDefaultStream = (Pa_OpenDefaultStreamProc)getdllproc(dll,"Pa_OpenDefaultStream"); if (dPa_Initialize == NULL || dPa_Terminate == NULL || dPa_CloseStream == NULL || dPa_StartStream == NULL || dPa_OpenDefaultStream == NULL) { dPa_OpenDefaultStream = NULL; return -1; } } return 0; }
static int load_dll() { #ifdef WINDOWS_VERSION HMODULE dll = NULL; #else void * dll = NULL; #endif if (d_openmpt_module_create_from_memory != NULL) { return 1; } dll = openDll(); if (dll) { d_openmpt_module_create_from_memory = (dll_openmpt_module_create_from_memory)getDllProc(dll, "openmpt_module_create_from_memory"); d_openmpt_module_destroy = (dll_openmpt_module_destroy)getDllProc(dll, "openmpt_module_destroy"); d_openmpt_module_read_float_stereo = (dll_openmpt_module_read_float_stereo)getDllProc(dll, "openmpt_module_read_float_stereo"); if (d_openmpt_module_create_from_memory && d_openmpt_module_destroy && d_openmpt_module_read_float_stereo) { return 1; } } d_openmpt_module_create_from_memory = NULL; return 0; }
static int load_dll() { #ifdef WINDOWS_VERSION HMODULE dll = NULL; #else void * dll = NULL; #endif if (dAlcOpenDevice != NULL) { return 1; } dll = openDll(); if (dll) { dAlcOpenDevice = (alc_OpenDevice)getDllProc(dll, "alcOpenDevice"); dAlcCloseDevice = (alc_CloseDevice)getDllProc(dll, "alcCloseDevice"); dAlcCreateContext = (alc_CreateContext)getDllProc(dll, "alcCreateContext"); dAlcDestroyContext = (alc_DestroyContext)getDllProc(dll, "alcDestroyContext"); dAlcMakeContextCurrent = (alc_MakeContextCurrent)getDllProc(dll, "alcMakeContextCurrent"); dAlGetSourcei = (al_GetSourcei)getDllProc(dll, "alGetSourcei"); dAlSourceQueueBuffers = (al_SourceQueueBuffers)getDllProc(dll, "alSourceQueueBuffers"); dAlSourceUnqueueBuffers = (al_SourceUnqueueBuffers)getDllProc(dll, "alSourceUnqueueBuffers"); dAlBufferData = (al_BufferData)getDllProc(dll, "alBufferData"); dAlSourcePlay = (al_SourcePlay)getDllProc(dll, "alSourcePlay"); dAlSourceStop = (al_SourceStop)getDllProc(dll, "alSourceStop"); dAlGenBuffers = (al_GenBuffers)getDllProc(dll, "alGenBuffers"); dAlDeleteBuffers = (al_GenBuffers)getDllProc(dll, "alDeleteBuffers"); dAlGenSources = (al_GenSources)getDllProc(dll, "alGenSources"); dAlDeleteSources = (al_GenSources)getDllProc(dll, "alDeleteSources"); if (dAlcOpenDevice && dAlcCloseDevice && dAlcCreateContext && dAlcDestroyContext && dAlcMakeContextCurrent && dAlGetSourcei && dAlSourceQueueBuffers && dAlSourceUnqueueBuffers && dAlBufferData && dAlSourcePlay && dAlSourceStop && dAlGenBuffers && dAlDeleteBuffers && dAlGenSources && dAlDeleteSources) { return 1; } } dAlcOpenDevice = 0; return 0; }