本文整理汇总了C++中CAudioManager::ReserveSoundBUF方法的典型用法代码示例。如果您正苦于以下问题:C++ CAudioManager::ReserveSoundBUF方法的具体用法?C++ CAudioManager::ReserveSoundBUF怎么用?C++ CAudioManager::ReserveSoundBUF使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAudioManager
的用法示例。
在下文中一共展示了CAudioManager::ReserveSoundBUF方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReadCrashSounds
//--------------------------------------------------------------------------------
// 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;
}
示例2: SetEngineSound
//--------------------------------------------------------------------------------
// 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;
}
示例3: SetSound
//--------------------------------------------------------------------------------
// 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;
}