예제 #1
0
//---------------------------------------------------------------------
//  Release the buffer according to the type
//  filename=> Named cache
//  else    => Tag Cache
//----------------------------------------------------------------------
void CSoundBUF::Release()
{ CAudioManager *snd = globals->snd;
  if (nfile)  snd->ReleaseSoundBUF(this);
  else        snd->ReleaseSoundBUF(idn);
  return;
}
예제 #2
0
//-------------------------------------------------------------------------
//  Destroy this object
//-------------------------------------------------------------------------
CVehicleSound::~CVehicleSound (void)
{ // Clean up engine sound sub-object instances
  //---Release Engine sounds buffers ---------------------------
  CAudioManager *snd = globals->snd;
  snd->ReleaseSoundBUF('crkE');           // External engine start
  snd->ReleaseSoundBUF('catE');           // Engine Catching
	snd->ReleaseSoundBUF('runE');						// External running sound
	snd->ReleaseSoundBUF('misE');						// External running sound
	snd->ReleaseSoundBUF('hltE');						// External short stop
  snd->ReleaseSoundBUF('falE');           // External engine Fail
  snd->ReleaseSoundBUF('prsi');           // External propeller start
  snd->ReleaseSoundBUF('pris');           // External propeller stop
  snd->ReleaseSoundBUF('wind');           // External wind
  snd->ReleaseSoundBUF('stal');           // External stall horn
  snd->ReleaseSoundBUF('grnd');           // External ground noise
  snd->ReleaseSoundBUF('outr');           // External outter marker
  snd->ReleaseSoundBUF('midl');           // External middle marker
  snd->ReleaseSoundBUF('innr');           // External inner marker
  snd->ReleaseSoundBUF('gyrl');           // External gyro low
  snd->ReleaseSoundBUF('gyrs');           // External gyro stable
  snd->ReleaseSoundBUF('elts');           // External warning 
  snd->ReleaseSoundBUF('crgr');           // Gear crash
  snd->ReleaseSoundBUF('crby');           // Body crash
  snd->ReleaseSoundBUF('shok');           // Shock sound
  //---Release Flap Sounds -------------------------------------
  for (int k = 1; k <= NbFlap; k++)
  { Tag ids = 'Flp0' + k;
    snd->ReleaseSoundBUF(ids);
  }
 //---Release Gear Sound -------------------------------------
  snd->ReleaseSoundBUF('geru');
  snd->ReleaseSoundBUF('gerd');
  //---Release Tire Sounds -------------------------------------
  for (int k = 0; k <  NbTire; k++)
  { Tag ids = 'tir0' + k;
    snd->ReleaseSoundBUF(ids);
  }
}