if bgm_fade_timer > 0 { if --bgm_fade_timer == 0 && bgm_next != noone { if audio_is_playing(bgm_current) audio_stop_sound(bgm_current); bgm_current = audio_play_sound(bgm_next, 0, true); audio_sound_gain(bgm_current, 0, 0); // 从0开始 audio_sound_gain(bgm_current, bgm_volume, 500); // 500ms淡入 bgm_next = noone; } }