示例#1
0
CJMultimedia::~CJMultimedia()
{
    unloadAllSounds();
    delete m_effectSounds; 
    
    releaseMultimedia();
}
示例#2
0
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);
  }
}
示例#3
0
void vrpn_Sound_Server_Miles::mainloop(const timeval *timeout)
{
	if (!connection->connected())
	{
		unloadAllSounds();
		unloadCSMap();
	}
	connection->mainloop(timeout);
}
示例#4
0
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();
}