diff --git a/README.md b/README.md index 8dc1361..1d3c803 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,9 @@ VoiceMeeter integration and live feedback for the Elgato Stream Deck device. **Author's website and contact information:** [https://barraider.com](https://barraider.com) +## New in v2.2 +- Added `Title` support for Microphone action + ## New in v2.1 - **Advanced Queries Support** - The `Advanced Toggle` action's `Mode1 Check` now supports performing complex queries with `==` and `!=` as well as `AND/OR`. - Example: `Strip[0].Mute AND Strip[1].Gain==7.5 AND Strip[2].device.name!="Elgato Wave"` diff --git a/VoiceMeeter/Actions/VMGainAdjustDialAction.cs b/VoiceMeeter/Actions/VMGainAdjustDialAction.cs index dfe7391..73d2c5e 100644 --- a/VoiceMeeter/Actions/VMGainAdjustDialAction.cs +++ b/VoiceMeeter/Actions/VMGainAdjustDialAction.cs @@ -112,24 +112,30 @@ public async override void DialRotate(DialRotatePayload payload) VMManager.Instance.SetParam(BuildDeviceName(), (float)outputVolume); } - public async override void DialPress(DialPressPayload payload) + + public async override void DialDown(DialPayload payload) { - Logger.Instance.LogMessage(TracingLevel.INFO, $"{this.GetType()} Dial Pressed"); + Logger.Instance.LogMessage(TracingLevel.INFO, $"{this.GetType()} Dial Down"); if (!VMManager.Instance.IsConnected) { - Logger.Instance.LogMessage(TracingLevel.ERROR, $"Dial Pressed but VM is not connected!"); + Logger.Instance.LogMessage(TracingLevel.ERROR, $"Dial Down but VM is not connected!"); await Connection.ShowAlert(); return; } - if (payload.IsDialPressed) + dialWasRotated = false; + } + + public async override void DialUp(DialPayload payload) + { + Logger.Instance.LogMessage(TracingLevel.INFO, $"{this.GetType()} Dial Up"); + if (!VMManager.Instance.IsConnected) { - Logger.Instance.LogMessage(TracingLevel.INFO, $"{this.GetType()} Dial Pressed"); - dialWasRotated = false; + Logger.Instance.LogMessage(TracingLevel.ERROR, $"Dial Up but VM is not connected!"); + await Connection.ShowAlert(); return; } - Logger.Instance.LogMessage(TracingLevel.INFO, $"{this.GetType()} Dial Released"); if (dialWasRotated) { return; diff --git a/VoiceMeeter/Actions/VMMicrophoneAction.cs b/VoiceMeeter/Actions/VMMicrophoneAction.cs index 752eec6..0174ad3 100644 --- a/VoiceMeeter/Actions/VMMicrophoneAction.cs +++ b/VoiceMeeter/Actions/VMMicrophoneAction.cs @@ -40,7 +40,8 @@ public static PluginSettings CreateDefaultSettings() UserImage1 = String.Empty, UserImage2 = String.Empty, MuteHotkey = String.Empty, - UnmuteHotkey = String.Empty + UnmuteHotkey = String.Empty, + TitlePrefix = String.Empty }; return instance; @@ -75,12 +76,16 @@ public static PluginSettings CreateDefaultSettings() [JsonProperty(PropertyName = "unmuteHotkey")] public string UnmuteHotkey { get; set; } + [JsonProperty(PropertyName = "titlePrefix")] + public string TitlePrefix { get; set; } + } #region Private members private readonly PluginSettings settings; private bool didSetNotConnected = false; + private bool didSetTitle = false; #endregion @@ -177,6 +182,20 @@ public async override void OnTick() await Connection.SetImageAsync((String)null); } + // Set the title + string titlePrefix = settings.TitlePrefix?.Replace(@"\n", "\n"); + bool isTitleEmpty = String.IsNullOrEmpty(titlePrefix); + if (!isTitleEmpty || didSetTitle) + { + didSetTitle = true; + await Connection.SetTitleAsync(titlePrefix); + + if (isTitleEmpty) + { + didSetTitle = false; + } + } + await Connection.SetImageAsync(GetBase64ImageStatus()); } diff --git a/VoiceMeeter/Actions/VMSettingAdjustDialAction.cs b/VoiceMeeter/Actions/VMSettingAdjustDialAction.cs index 7b151cf..6c644ec 100644 --- a/VoiceMeeter/Actions/VMSettingAdjustDialAction.cs +++ b/VoiceMeeter/Actions/VMSettingAdjustDialAction.cs @@ -123,23 +123,29 @@ public async override void DialRotate(DialRotatePayload payload) VMManager.Instance.SetParam(BuildDeviceName(), (float)outputValue); } - public async override void DialPress(DialPressPayload payload) + public async override void DialDown(DialPayload payload) { + Logger.Instance.LogMessage(TracingLevel.INFO, $"{this.GetType()} Dial Down"); if (!VMManager.Instance.IsConnected) { - Logger.Instance.LogMessage(TracingLevel.ERROR, $"Dial Pressed but VM is not connected!"); + Logger.Instance.LogMessage(TracingLevel.ERROR, $"Dial Down but VM is not connected!"); await Connection.ShowAlert(); return; } - if (payload.IsDialPressed) + dialWasRotated = false; + } + + public async override void DialUp(DialPayload payload) + { + Logger.Instance.LogMessage(TracingLevel.INFO, $"{this.GetType()} Dial Up"); + if (!VMManager.Instance.IsConnected) { - Logger.Instance.LogMessage(TracingLevel.INFO, $"{this.GetType()} Dial Pressed"); - dialWasRotated = false; + Logger.Instance.LogMessage(TracingLevel.ERROR, $"Dial Up but VM is not connected!"); + await Connection.ShowAlert(); return; } - Logger.Instance.LogMessage(TracingLevel.INFO, $"{this.GetType()} Dial Released"); if (dialWasRotated) { return; diff --git a/VoiceMeeter/PropertyInspector/VoiceMeeter/Microphone.html b/VoiceMeeter/PropertyInspector/VoiceMeeter/Microphone.html index aacdb02..daa70cc 100644 --- a/VoiceMeeter/PropertyInspector/VoiceMeeter/Microphone.html +++ b/VoiceMeeter/PropertyInspector/VoiceMeeter/Microphone.html @@ -45,6 +45,10 @@ +
+
Title
+ +
Icon