Exemple #1
0
/*
 * For the purpose of channel manipulation, we treat turn timer the same as bell
 */
void stop_bell() {
	if(mix_ok) {
		Mix_HaltGroup(SOUND_BELL);
		Mix_HaltGroup(SOUND_TIMER);
		sound_cache_iterator itor = sound_cache.begin();
		while(itor != sound_cache.end())
		{
			if(itor->group == SOUND_BELL || itor->group == SOUND_TIMER) {
				itor = sound_cache.erase(itor);
			} else {
				++itor;
			}
		}
	}
}
Exemple #2
0
void stop_sound() {
	if(mix_ok) {
		Mix_HaltGroup(SOUND_SOURCES);
		Mix_HaltGroup(SOUND_FX);
		sound_cache_iterator itor = sound_cache.begin();
		while(itor != sound_cache.end())
		{
			if(itor->group == SOUND_SOURCES || itor->group == SOUND_FX) {
				itor = sound_cache.erase(itor);
			} else {
				++itor;
			}
		}
	}
}
Exemple #3
0
static mrb_value
mrb_sdl2_mixer_halt_group(mrb_state *mrb, mrb_value self)
{
  mrb_int tag;
  mrb_get_args(mrb, "i", &tag);
  return mrb_fixnum_value(Mix_HaltGroup(tag));
}
Exemple #4
0
	static int lua_Mix_HaltGroup(State & state){
		Stack * stack = state.stack;
		int tag = -1;
		if (stack->is<LUA_TNUMBER>(1)){
			tag = stack->to<int>(1);
		}
		Mix_HaltGroup(tag);
		return 0;
	}
bool SDLAudio::HaltGROUP(std::string name)
{
    /** Check to see if we've created it */
    SListIterator<SGZChanGroup*> GroupListITR = GroupList.GetIterator();

    for( GroupListITR.Start(); GroupListITR.Valid(); GroupListITR.Forth() )
        if((GroupListITR.Item()->Name.compare(name))==0)
        {
            Mix_HaltGroup(GroupListITR.Item()->groupNum);
            return true;
        }

    SGZLogger.warn("AudioMAN: Group \"%s\" doesn't exist!\n", name.c_str());
    return false;
}
void SDLAudio::halt_group(int tag) {
  Mix_HaltGroup(tag);
}