CJMultimedia::~CJMultimedia() { unloadAllSounds(); delete m_effectSounds; releaseMultimedia(); }
void vrpn_Sound_Server_Miles::setProvider(int index, int providerRoomSetting) { DWORD result; unloadAllSounds(); //If a provider is already open, then close it AIL_close_3D_provider(provider); //load the new provider result = AIL_open_3D_provider(providers[index]); if (result != M3D_NOERR) { fprintf(stderr,"Error Opening 3D Provider: %s\n",AIL_last_error()); } else { provider = providers[index]; //open a listener. Position defaults to the origin, looking down the -Z axis with ( listener = AIL_open_3D_listener(provider); AIL_set_3D_position(listener, 0, 0, 0); AIL_set_3D_orientation(listener, 0, 0, -1, 0, 1, 0); AIL_set_3D_velocity(listener, 0, 0, 0, 0); //set a room style AIL_set_3D_provider_preference(provider, "EAX environment selection", &providerRoomSetting); } }
void vrpn_Sound_Server_Miles::mainloop(const timeval *timeout) { if (!connection->connected()) { unloadAllSounds(); unloadCSMap(); } connection->mainloop(timeout); }
void vrpn_Sound_Server_Miles::shutDown() { unloadAllSounds(); AIL_close_3D_provider(provider); /*These two calls must be made before trying to exit or the program will hang when you try to quit.*/ AIL_waveOutClose(DIG); AIL_shutdown(); }