예제 #1
0
static mrb_value
mrb_sdl2_mixer_fade_out_group(mrb_state *mrb, mrb_value self)
{
  mrb_int tag, ms;
  mrb_get_args(mrb, "ii", &tag, &ms);
  return mrb_fixnum_value(Mix_FadeOutGroup(tag, ms));
}
예제 #2
0
	static int lua_Mix_FadeOutGroup(State & state){
		Stack * stack = state.stack;
		int tag = -1;
		int ms = 0;
		if (stack->is<LUA_TNUMBER>(1)){
			tag = stack->to<int>(1);
		}
		if (stack->is<LUA_TNUMBER>(2)){
			ms = stack->to<int>(2);
		}
		stack->push<int>(Mix_FadeOutGroup(tag, ms));
		return 1;
	}
예제 #3
0
bool SDLAudio::FadeGROUP(std::string name, int time)
{
    /** 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_FadeOutGroup(GroupListITR.Item()->groupNum, time);
            return true;
        }

    SGZLogger.warn("AudioMAN: Group \"%s\" doesn't exist!\n", name.c_str());
    return false;
}
예제 #4
0
파일: sound.cpp 프로젝트: Phaeodaria/abuse
//
// sound_effect destructor
//
// Release the audio data.
//
sound_effect::~sound_effect()
{
    if(!sound_enabled)
        return;

    // Sound effect deletion only happens on level load, so there
    // is no problem in stopping everything. But the original playing
    // code handles the sound effects and the "playlist" differently.
    // Therefore with SDL_mixer, a sound that has not finished playing
    // on a level load will cut off in the middle. This is most noticable
    // for the button sound of the load savegame dialog.
    Mix_FadeOutGroup(-1, 100);
    while (Mix_Playing(-1))
        SDL_Delay(10);
    Mix_FreeChunk(m_chunk);
}
예제 #5
0
void sfx::fade_audio_group( int tag, int duration ) {
    Mix_FadeOutGroup( tag, duration );
}
예제 #6
0
파일: sound_sdlmix.c 프로젝트: Arakash/naev
/**
 * @brief Stops all the sounds in a group.
 *
 *    @param group Group to stop all it's sounds.
 */
void sound_mix_stopGroup( int group )
{
   Mix_FadeOutGroup(group, 100);
}
예제 #7
0
void SDLAudio::fade_out_group(int tag, int ms) {
  Mix_FadeOutGroup(tag, ms);
}