private void SetLipSyncEnable(bool isEnabled) { _animMorphTarget.ForceClosedMouth = !isEnabled; _isLipSyncActive = isEnabled; if (isEnabled) { //変な名前を受け取ってたら実際には起動しない点に注意 _lipSyncContext.StartRecording(_receivedDeviceName); } else { _lipSyncContext.StopRecording(); } }
private void RefreshMicrophoneLipSyncStatus() { //NOTE: 毎回いったんストップするのはちょっとダサいけど、設定が切り替わる回数はたかが知れてるからいいかな…という判断です _lipSyncContext.StopRecording(); bool shouldStartReceive = _isLipSyncActive && !(_isExTrackerActive && _isExTrackerLipSyncActive); _animMorphEasedTarget.ShouldReceiveData = shouldStartReceive; _lipSyncIntegrator.PreferExternalTrackerLipSync = _isExTrackerActive && _isExTrackerLipSyncActive; if (shouldStartReceive) { _lipSyncContext.StartRecording(_receivedDeviceName); } }