//-------------------------------------------------------------------------------- // Read Crash Sound //-------------------------------------------------------------------------------- void CVehicleSound::ReadCrashSounds(SStream *st) { CAudioManager *snd = globals->snd; char txt[128]; char fn[64]; char go = 1; Tag tg = 0; while (go) { ReadString(txt,128,st); if (1 == sscanf(txt," gear , %s",fn)) { snd->ReserveSoundBUF('crgr',fn,0) ; continue; } if (1 == sscanf(txt," body , %s",fn)) { snd->ReserveSoundBUF('crby',fn,0); continue; } if (1 == sscanf(txt," shok , %s",fn)) { snd->ReserveSoundBUF('shok',fn,0); continue; } go = 0; } return; }
//-------------------------------------------------------------------------------- // SetSound with parameters //-------------------------------------------------------------------------------- void CVehicleSound::SetEngineSound(Tag ids,char *fn) { CAudioManager *snd = globals->snd; CSoundBUF *sbf = snd->ReserveSoundBUF(ids,fn,sample); sbf->SetPMAX(pMax); sbf->SetPMIN(pMin); return; }
//-------------------------------------------------------------------------------- // SetSound with parameters //-------------------------------------------------------------------------------- void CVehicleSound::SetSound(Tag ids,char *fn) { CAudioManager *snd = globals->snd; CSoundBUF *sbf = snd->ReserveSoundBUF(ids,fn,sample); sample = 0; sbf->SetGain(volu); volu = 1; return; }