Exemple #1
0
/********************************************************************************************
 Begin vrpn_Sound_Server_Miles
 *******************************************************************************************/
vrpn_Sound_Server_Miles::vrpn_Sound_Server_Miles(const char * name, vrpn_Connection * c)
				  : vrpn_Sound_Server(name, c)
{
	AIL_startup();							//initialize the Miles SDK stuff

	
	//load a digital driver
	if (!AIL_quick_startup(1,0,44100,16,2)) {
     MessageBox(0,"Couldn't open a digital output device.","Error",MB_OK);
    }

    AIL_quick_handles(&DIG,0,0);

	
	// No sound played yet
	LastSoundId = -1;

	provider = 0;
	//Set variables to control size and growing of Audio handle array
	H_Max = vrpn_Sound_START;
	H_Cur = 0;

	//Allocate space for Audio Handle array
	samples = new H3DSAMPLE[H_Max];

	//Set variables to control size and growing of providers array
	P_Max = vrpn_Sound_START;
	P_Cur = 0;

	//Allocate space for Audio Handle array
	providers = new HPROVIDER[P_Max];

	// init eye from sensor matrix
	eye_f_sensor_m[0] = 1.0;
	eye_f_sensor_m[1] = 0.0;
	eye_f_sensor_m[2] = 0.0;
	eye_f_sensor_m[3] = 0.0;
	eye_f_sensor_m[4] = 0.0;
	eye_f_sensor_m[5] = 1.0;
	eye_f_sensor_m[6] = 0.0;
	eye_f_sensor_m[7] = 0.0;
	eye_f_sensor_m[8] = 0.0;
	eye_f_sensor_m[9] = 0.0;
	eye_f_sensor_m[10] = 1.0;
	eye_f_sensor_m[11] = 0.0;
	eye_f_sensor_m[12] = 0.0;
	eye_f_sensor_m[13] = 0.0;
	eye_f_sensor_m[14] = 0.0;
	eye_f_sensor_m[15] = 1.0;
	
}
Exemple #2
0
void SoundManager::ReacquireSoundDriver()
{
	if (m_usePlaySound) return;
	if (m_noSound) return;

#if !defined(USE_SDL)
	HDIGDRIVER		dig;
	HMDIDRIVER		mdi;
	HDLSDEVICE		dls;
	AIL_quick_handles(&dig, &mdi, &dls);

	S32 err = AIL_digital_handle_reacquire(dig);
	Assert(err);

	AIL_set_digital_master_volume(dig, s_masterVolume);
#endif
}