Beispiel #1
0
        void Update()
        {
            if (MixCast.IsRecordingOrStreaming() || context == null || context.Data == null || context.Data.unplugged || SelectableUtility.isInputFieldFocused)
            {
                return;
            }

            bool goUp = Input.GetKeyDown(goUpKey);

            if (goUpModifier != KeyCode.None)
            {
                goUp &= Input.GetKey(goUpModifier);
            }

            bool goDown = Input.GetKeyDown(goDownKey);

            if (goDownModifier != KeyCode.None)
            {
                goDown &= Input.GetKey(goDownModifier);
            }

            if (goUp && !Input.GetKey(excludedKey1) && !Input.GetKey(excludedKey2))
            {
                UpdateValue(step);
                Debug.Log("Increase buffer timing to " + context.Data.bufferTime);
            }
            else if (goDown && !Input.GetKey(excludedKey1) && !Input.GetKey(excludedKey2))
            {
                UpdateValue(-step);
                Debug.Log("Decrease buffer timing " + context.Data.bufferTime);
            }
        }
        protected override void OnDisable()
        {
            isRecordingOrStreaming = MixCast.IsRecordingOrStreaming(checkRecording, checkStreaming);
            if (isRecordingOrStreaming == false)
            {
                AudioAsyncFeed.Instance(context.Data.id).PlayWithSettings(context.Data);
            }
            //else do nothing

            base.OnDisable();
        }
 protected override void OnEnable()
 {
     base.OnEnable();
     isRecordingOrStreaming = MixCast.IsRecordingOrStreaming(checkRecording, checkStreaming);
 }