internal void Play(object entry, MusicRequest info, AudioMixerGroup group, MusicPlayConfig config) { if (entry != m_CurrentEntry) { return; } var obj = Borrow(); m_Playing.Add(obj); //Configのgroupが優先される obj.PlayRequest(info, entry, config.FadeInTime, config.Group ?? group); }
public void PlayRequest(MusicRequest req, object entry, float time, UnityEngine.Audio.AudioMixerGroup group) { m_Stop = false; Entry = entry; Request = req; Music = req.Music; Music.AddRef(); m_Object.SetActive(true); m_Source.clip = Music.Clip; m_Source.outputAudioMixerGroup = group; m_Source.pitch = Music.Pitch; m_Source.volume = 0; m_Source.timeSamples = Request.Position; m_Source.Play(); m_FadeVolume.Start(0, 1f, time); }