static int DX5_Load(void) { int status; DX5_Unload(); DSoundDLL = LoadLibrary(TEXT("DSOUND.DLL")); if ( DSoundDLL != NULL ) { DSoundCreate = (void *)GetProcAddress(DSoundDLL, TEXT("DirectSoundCreate")); } if ( DSoundDLL && DSoundCreate ) { status = 0; } else { DX5_Unload(); status = -1; } return status; }
static void Audio_DeleteDevice(SDL_AudioDevice *device) { DX5_Unload(); free(device->hidden); free(device); }