本文整理汇总了C++中FMOD_Channel_Stop函数的典型用法代码示例。如果您正苦于以下问题:C++ FMOD_Channel_Stop函数的具体用法?C++ FMOD_Channel_Stop怎么用?C++ FMOD_Channel_Stop使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FMOD_Channel_Stop函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: FMOD_Channel_Stop
// ----------------------------------------------------------------------------
void ofxSoundPlayerFMOD::play()
{
// if it's a looping sound, we should try to kill it, no?
// or else people will have orphan channels that are looping
if (bLoop == true){
FMOD_Channel_Stop(channel);
}
// if the sound is not set to multiplay, then stop the current,
// before we start another
if (!bMultiPlay){
FMOD_Channel_Stop(channel);
}
FMOD_System_PlaySound(sys, FMOD_CHANNEL_FREE, sound, bPaused, &channel);
FMOD_Channel_GetFrequency(channel, &internalFreq);
FMOD_Channel_SetVolume(channel,volume);
FMOD_Channel_SetPan(channel,pan);
FMOD_Channel_SetFrequency(channel, internalFreq * speed);
FMOD_Channel_SetMode(channel, (bLoop == true) ? FMOD_LOOP_NORMAL : FMOD_LOOP_OFF);
//fmod update() should be called every frame - according to the docs.
//we have been using fmod without calling it at all which resulted in channels not being able
//to be reused. we should have some sort of global update function but putting it here
//solves the channel bug
FMOD_System_Update(sys);
}
开发者ID:alsdncka,项目名称:digitalstarcode,代码行数:31,代码来源:ofxSoundPlayerFMOD.cpp
示例2: FMOD_Channel_Stop
bool Systems::SoundSystem::StopSound(const Events::StopSound &event)
{
auto eComp = m_World->GetComponent<Components::SoundEmitter>(event.Emitter);
if(eComp)
{
FMOD_Channel_Stop(m_Channels[event.Emitter]);
}
else
{
FMOD_Channel_Stop(m_BGMChannel);
}
return true;
}
开发者ID:Tleety,项目名称:daydream,代码行数:13,代码来源:SoundSystem.cpp
示例3: WStringToString
bool ModuleIrisAudio::MePlay(wstring filePath, int volume, int rate){
string sfilepath = WStringToString(filePath);
const char* fpath = sfilepath.c_str();
if (channels == 0){
if (meChannel != NULL){
BOOL isPlaying;
FMOD_Channel_IsPlaying(meChannel, &isPlaying);
if (isPlaying)
FMOD_Channel_Stop(meChannel);
}
}
FMOD_RESULT result;
result = FMOD_System_CreateStream(fmodSystem, fpath, FMOD_DEFAULT, 0, &me);
if (result != FMOD_OK)
return false;
result = FMOD_System_PlaySound(fmodSystem, FMOD_CHANNEL_FREE, me, true, &meChannel);
if (result != FMOD_OK)
return false;
FMOD_Channel_SetMode(meChannel, FMOD_LOOP_NORMAL);
FMOD_Channel_SetVolume(meChannel, volume / 100.0f);
float frequancy;
FMOD_Channel_GetFrequency(meChannel, &frequancy);
FMOD_Channel_SetFrequency(meChannel, frequancy * (rate / 100.0));
FMOD_Channel_SetPaused(meChannel, FALSE);
return true;
}
开发者ID:HADESAngelia,项目名称:Iris-2D-Project,代码行数:34,代码来源:ModuleIrisAudio.cpp
示例4: FMOD_Channel_Stop
void Chunk::Stop()
{
if( m_pChannel ) {
FMOD_Channel_Stop(m_pChannel);
// m_pChannel->stop();
}
}
开发者ID:beebopkim,项目名称:KickItUp,代码行数:7,代码来源:Chunk.cpp
示例5: FMOD_Channel_Stop
void Audio::StopAll()
{
for (Iterator i = samples.begin(); i != samples.end(); ++i)
{
FMOD_Channel_Stop( (*i)->channel );
}
}
开发者ID:narc0tiq,项目名称:Unnamed-Train-Game,代码行数:7,代码来源:audio.cpp
示例6: CDA_Stop
void CDA_Stop (void)
{
#ifdef UQE_FMOD_CDAUDIO
if(SND_InitialisedCD == false || SND_MusicChannel.inuse == false)
return;
if(SND_MusicChannel.channel)
{
result = FMOD_Channel_Stop(SND_MusicChannel.channel);
FMOD_ERROR(result, true, false);
}
if(fmod_musicCD_subsound)
{
result = FMOD_Sound_Release(fmod_musicCD_subsound);
FMOD_ERROR(result, true, false);
}
if(fmod_musicCD)
{
result = FMOD_Sound_Release(fmod_musicCD);
FMOD_ERROR(result, true, false);
}
SND_MusicChannel.inuse = false;
#else
CDAudio_Stop();
#endif
}
开发者ID:infernuslord,项目名称:uqe-quake,代码行数:31,代码来源:snd_fmod.c
示例7: FMOD_Shutdown
void FMOD_Shutdown (void)
{
if (COM_CheckParm("-nosound"))
{
SND_Initialised = false;
SND_InitialisedCD = false;
return;
}
if (SND_MusicChannel.channel)
FMOD_Channel_Stop(SND_MusicChannel.channel);
CDA_Shutdown();
if (fmod_music)
FMOD_Sound_Release(fmod_music);
if (fmod_system)
{
result = FMOD_System_Close(fmod_system);
FMOD_ERROR(result, true, false);
result = FMOD_System_Release(fmod_system);
FMOD_ERROR(result, true, false);
}
SND_Initialised = false;
SND_InitialisedCD = false;
}
开发者ID:infernuslord,项目名称:uqe-quake,代码行数:29,代码来源:snd_fmod.c
示例8: stop_sound_num
void stop_sound_num(int num)
{
if(!sound_is_on)return;
FMOD_Channel_Stop(sound_data[num].voice_num);
sound_data[num].used=0;
}
开发者ID:arvidfm,项目名称:fiend,代码行数:7,代码来源:soundplay.c
示例9: Stop
//! Stop
void teSound::Stop()
{
if(channel)
{
teSoundManager::CheckResult(FMOD_Channel_Stop(channel));
channel = NULL;
}
}
开发者ID:EvgeniyRudnev,项目名称:tatengine,代码行数:9,代码来源:teSound.cpp
示例10: sound_unload
void sound_unload(void)
{
if(loaded) {
FMOD_Channel_Stop(_channel);
FMOD_Sound_Release(_sound);
loaded = false;
}
}
开发者ID:SailorOnDaTea,项目名称:kissplayer,代码行数:8,代码来源:sound.cpp
示例11: I_StopSound
void I_StopSound(INT32 handle)
{
FMOD_CHANNEL *chan;
FMR(FMOD_System_GetChannel(fsys, handle, &chan));
if (music_stream && chan == music_channel)
return;
FMR(FMOD_Channel_Stop(chan));
}
开发者ID:HipsterLion,项目名称:SRB2,代码行数:8,代码来源:win_snd.c
示例12: FindSample
void Audio::Stop(std::string name)
{
if (!IsPlaying(name)) return;
Sample *sample = FindSample(name);
if (sample == NULL) return;
FMOD_Channel_Stop(sample->channel);
}
开发者ID:narc0tiq,项目名称:Unnamed-Train-Game,代码行数:9,代码来源:audio.cpp
示例13: FMOD_System_Update
void FMCSound::stop()
{
m_has_played = false;
FMOD_System_Update(m_fmod_system);
if (m_fmod_channel == 0) return;
FMOD_Channel_Stop(m_fmod_channel);
}
开发者ID:Rodeo314,项目名称:vasFMC-Krolock85,代码行数:9,代码来源:fmc_sounds.cpp
示例14: StopAudio
void StopAudio() /* Stop the sound if is playing.*/
{
if (systemFMOD != NULL)
{
BOOL isPlaying = FALSE;
FMOD_Channel_IsPlaying(channel, &isPlaying);
if (isPlaying)
FMOD_Channel_Stop(channel);
}
}
开发者ID:rhpa23,项目名称:IFly_737NG_Gauges,代码行数:10,代码来源:IFLY_NG_GAUGE_PLUGIN.Sound.c
示例15: soundHelico
void soundHelico()
{
if(helico->positionWin.y + HELICO_HEIGHT < POSITION_BOTTOM-5)
{
if(timeAllowed(&previousTimeSoundHelico, 1300))
FMOD_System_PlaySound(sound_system, 1, sound_helico, 0, &canal_game);
}
else
FMOD_Channel_Stop(canal_game);
}
开发者ID:Ryuuke,项目名称:Choplifter,代码行数:10,代码来源:soundManager.c
示例16: getChannel
void AudioPlayer::stopSound( SoundID sID )
{
if ( sID == ERROR_SOUND_ID )
return;
Channel* channel = getChannel( sID );
if ( !channel )
return;
FMOD_CHECK( FMOD_Channel_Stop( channel ) );
}
开发者ID:uvbs,项目名称:GameProject,代码行数:11,代码来源:AudioPlayer.cpp
示例17: fmod_stopsound
int fmod_stopsound()
{
FMOD_RESULT result;
result = FMOD_Channel_Stop(channel);
//printf("fmod_playsound(%i)...\n",i);
if (ERRCHECK(result)) {
printf("error fmod_playsound()\n");
return 1;
}
return 0;
}
开发者ID:dstieber,项目名称:parashoot,代码行数:11,代码来源:fmod.c
示例18: FMOD_Channel_Stop
void Audio::definirMusique(audio_t m) {
if(_musique == m)
return;
if(_canalMusique) {
FMOD_Channel_Stop(_canalMusique);
_canalMusique = 0;
}
_musique = m;
}
开发者ID:rems4e,项目名称:Projet2MIC,代码行数:11,代码来源:Audio.cpp
示例19: FMOD_Channel_Stop
void CSound::Stop(void) {
// Check if we have a sound loaded
if (!mLoaded) {
return;
}
#if __ENABLE_CFMOD
// Check if we have a valid channel
if (0 != mpChannel) {
// Stop the channel that is playing the sound
FMOD_Channel_Stop(mpChannel);
mpChannel = 0;
}
#endif
}
开发者ID:pandaforks,项目名称:Mirage--,代码行数:14,代码来源:CSound.cpp
示例20: FMOD_Channel_Stop
// ----------------------------------------------------------------------------
void ofSoundPlayer::play(){
// if it's a looping sound, we should try to kill it, no?
// or else people will have orphan channels that are looping
if (bLoop == true){
FMOD_Channel_Stop(channel);
}
// if the sound is not set to multiplay, then stop the current,
// before we start another
if (!bMultiPlay){
FMOD_Channel_Stop(channel);
}
FMOD_System_PlaySound(sys, FMOD_CHANNEL_FREE, sound, bPaused, &channel);
FMOD_Channel_GetFrequency(channel, &internalFreq);
FMOD_Channel_SetVolume(channel,volume);
FMOD_Channel_SetPan(channel,pan);
FMOD_Channel_SetFrequency(channel, internalFreq * speed);
FMOD_Channel_SetMode(channel, (bLoop == true) ? FMOD_LOOP_NORMAL : FMOD_LOOP_OFF);
}
开发者ID:LeonFedotov,项目名称:L.A.S.E.R.-TAG-GRL,代码行数:24,代码来源:ofSoundPlayer.cpp
注:本文中的FMOD_Channel_Stop函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论