SectionPlayer CreateSectionPlayer(UnityEngine.Audio.AudioMixer[] layermixers, IAutomationControl transCtrl, IAutomationControl [] tensionCtrl)
    {
        var player1 = gameObject.AddComponent <LibSequentiaPlayer>();

        player1.SetTargetMixers(layermixers);

        var player2 = gameObject.AddComponent <LibSequentiaPlayer>();

        player2.SetTargetMixers(layermixers);

        var secPlayer = new SectionPlayer(this);

        secPlayer.SetPlayerComponents(player1, player2);
        secPlayer.SetTransitionAutomationTarget(transCtrl);
        secPlayer.SetTensionAutomationTargets(tensionCtrl);

        return(secPlayer);
    }
Example #2
0
        /// <summary>
        /// SectionPlayer 추가
        /// </summary>
        /// <param name="player"></param>
        /// <param name="layermixers"></param>
        /// <param name="sectionMixerCtrl"></param>
        public void AttachSectionPlayer(SectionPlayer player, IAutomationControl sectionMixerCtrl)
        {
            // 적당한 idx 찾기
            int idx = 0;

            for (; idx < c_playerCount; idx++)
            {
                if (m_secplayer[idx] == null)
                {
                    break;
                }
            }

            if (idx >= c_playerCount)
            {
                throw new System.InvalidOperationException();
            }

            //
            m_secplayer[idx]     = player;
            m_secplayerCtrl[idx] = sectionMixerCtrl;
        }
    TrackPlayer CreateTrackPlayer(int deck, AudioMixer[] section1Mixers, AudioMixer[] section2Mixers)
    {
        // 텐션 오토메이션 버스 생성
        AutomationHub []      tensionCtrlBus   = new AutomationHub[4];
        IAutomationControl [] sec1TensionCtrls = new IAutomationControl[4];
        IAutomationControl [] sec2TensionCtrls = new IAutomationControl[4];
        for (int i = 0; i < 4; i++)
        {
            var out1 = m_automationMgr.GetAutomationControlToSingleMixer(GetMixerName(deck, 0, i));
            var out2 = m_automationMgr.GetAutomationControlToSingleMixer(GetMixerName(deck, 1, i));

            var bus = new AutomationHub(m_automationMgr);
            bus.SetOutputs(out1, out2);
            bus.CreateChains(2);

            tensionCtrlBus[i] = bus;

            sec1TensionCtrls[i] = tensionCtrlBus[i].GetChain(0);
            sec2TensionCtrls[i] = tensionCtrlBus[i].GetChain(1);
        }

        // 플레이어 생성
        var tplayer = new TrackPlayer(this);

        var player1ctrl = m_automationMgr.GetAutomationControlToSingleMixer(GetMixerName(deck, 0));
        var player1     = CreateSectionPlayer(section1Mixers, player1ctrl, sec1TensionCtrls);

        tplayer.AttachSectionPlayer(player1, player1ctrl);

        var player2ctrl = m_automationMgr.GetAutomationControlToSingleMixer(GetMixerName(deck, 1));
        var player2     = CreateSectionPlayer(section2Mixers, player2ctrl, sec2TensionCtrls);

        tplayer.AttachSectionPlayer(player2, player2ctrl);

        return(tplayer);
    }
 /// <summary>
 /// 타겟 설정
 /// </summary>
 /// <param name="intro"></param>
 /// <param name="outro"></param>
 public void SetAutomationTargets(IAutomationControl intro, IAutomationControl outro)
 {
     m_introAutoTarget	= intro;
     m_outroAutoTarget	= outro;
 }
    TrackPlayer CreateTrackPlayer(int deck, AudioMixer[] section1Mixers, AudioMixer[] section2Mixers)
    {
        // 텐션 오토메이션 버스 생성
        AutomationHub [] tensionCtrlBus			= new AutomationHub[4];
        IAutomationControl [] sec1TensionCtrls	= new IAutomationControl[4];
        IAutomationControl [] sec2TensionCtrls	= new IAutomationControl[4];
        for (int i = 0; i < 4; i++)
        {
            var out1	= m_automationMgr.GetAutomationControlToSingleMixer(GetMixerName(deck, 0, i));
            var out2	= m_automationMgr.GetAutomationControlToSingleMixer(GetMixerName(deck, 1, i));

            var bus		= new AutomationHub(m_automationMgr);
            bus.SetOutputs(out1, out2);
            bus.CreateChains(2);

            tensionCtrlBus[i]	= bus;

            sec1TensionCtrls[i]	= tensionCtrlBus[i].GetChain(0);
            sec2TensionCtrls[i]	= tensionCtrlBus[i].GetChain(1);
        }

        // 플레이어 생성
        var tplayer			= new TrackPlayer(this);

        var player1ctrl		= m_automationMgr.GetAutomationControlToSingleMixer(GetMixerName(deck, 0));
        var player1			= CreateSectionPlayer(section1Mixers, player1ctrl, sec1TensionCtrls);
        tplayer.AttachSectionPlayer(player1, player1ctrl);

        var player2ctrl		= m_automationMgr.GetAutomationControlToSingleMixer(GetMixerName(deck, 1));
        var player2			= CreateSectionPlayer(section2Mixers, player2ctrl, sec2TensionCtrls);
        tplayer.AttachSectionPlayer(player2, player2ctrl);

        return tplayer;
    }
    SectionPlayer CreateSectionPlayer(UnityEngine.Audio.AudioMixer[] layermixers, IAutomationControl transCtrl, IAutomationControl [] tensionCtrl)
    {
        var player1		= gameObject.AddComponent<LibSequentiaPlayer>();
        player1.SetTargetMixers(layermixers);

        var player2		= gameObject.AddComponent<LibSequentiaPlayer>();
        player2.SetTargetMixers(layermixers);

        var secPlayer	= new SectionPlayer(this);
        secPlayer.SetPlayerComponents(player1, player2);
        secPlayer.SetTransitionAutomationTarget(transCtrl);
        secPlayer.SetTensionAutomationTargets(tensionCtrl);

        return secPlayer;
    }
 /// <summary>
 /// 타겟 설정
 /// </summary>
 /// <param name="intro"></param>
 /// <param name="outro"></param>
 public void SetAutomationTargets(IAutomationControl intro, IAutomationControl outro)
 {
     m_introAutoTarget = intro;
     m_outroAutoTarget = outro;
 }
Example #8
0
 public void SetAutomationTarget(IAutomationControl control)
 {
     m_autoTarget = control;
 }
Example #9
0
        /// <summary>
        /// SectionPlayer 추가
        /// </summary>
        /// <param name="player"></param>
        /// <param name="layermixers"></param>
        /// <param name="sectionMixerCtrl"></param>
        public void AttachSectionPlayer(SectionPlayer player, IAutomationControl sectionMixerCtrl)
        {
            // 적당한 idx 찾기
            int idx	= 0;
            for(; idx < c_playerCount; idx++)
            {
                if (m_secplayer[idx] == null)
                    break;
            }

            if (idx >= c_playerCount)
                throw new System.InvalidOperationException();

            //
            m_secplayer[idx]		= player;
            m_secplayerCtrl[idx]	= sectionMixerCtrl;
        }
Example #10
0
 public void SetAutomationTarget(IAutomationControl control)
 {
     m_autoTarget = control;
 }