-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new icons, command, and adjustments.
- Loading branch information
Showing
15 changed files
with
355 additions
and
279 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -309,3 +309,7 @@ testem.log | |
*.xcactivitylog | ||
|
||
*.DotSettings | ||
|
||
#Raw image resources | ||
*.afphoto | ||
*.afdesign |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# Loupedeck.WaveLink.Plugin | ||
Elgato Wave Link Plugin (unofficial) for the Loupedeck interface. | ||
|
||
Right now higly experimental. Only Input Volume indicator working for the XLR Port on the Wave XLR device. | ||
Right now Output switching, volume and mute works. | ||
|
||
## Acknowledge | ||
|
||
Build using the [ElgatoWaveLinkSDK](https://github.com/Professor-Melvin/ElgatoWaveLinkSDK), minimal changes (compatibility for .Net 4.7.2) | ||
Build using the [ElgatoWaveLinkSDK](https://github.com/Professor-Melvin/ElgatoWaveLinkSDK), [minimal changes](https://github.com/oddbear/ElgatoWaveLinkSDK). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
using ElgatoWaveSDK; | ||
using ElgatoWaveSDK.Models; | ||
|
||
namespace Loupedeck.WaveLinkPlugin.Adjustments | ||
{ | ||
class OutputMonitorMixAdjustment : PluginDynamicAdjustment | ||
{ | ||
private WaveLinkPlugin _plugin; | ||
private ElgatoWaveClient _client; | ||
|
||
private MonitoringState _state; | ||
|
||
public OutputMonitorMixAdjustment() | ||
: base("Monitor Mix Volume", "Adjustment for Monitor Mix Output Volume and Mute", "Outputs", true, DeviceType.All) | ||
{ | ||
// | ||
} | ||
|
||
protected override bool OnLoad() | ||
{ | ||
_plugin = (WaveLinkPlugin)base.Plugin; | ||
_client = _plugin.Client; | ||
|
||
_client.OutputMixerChanged += OutputMixerChanged; | ||
|
||
return true; | ||
} | ||
|
||
protected override bool OnUnload() | ||
{ | ||
_client.OutputMixerChanged -= OutputMixerChanged; | ||
|
||
return true; | ||
} | ||
|
||
private void OutputMixerChanged(object sender, MonitoringState state) | ||
{ | ||
_state = state; | ||
|
||
base.AdjustmentValueChanged(); | ||
} | ||
|
||
protected override void RunCommand(string actionParameter) | ||
{ | ||
if (_state is null) | ||
return; | ||
|
||
_state.IsLocalOutMuted = !_state.IsLocalOutMuted; | ||
_state.IsLocalOutMuted = _client.SetOutputMixer(_state) | ||
.GetAwaiter().GetResult() | ||
.IsLocalOutMuted; | ||
|
||
base.ActionImageChanged(actionParameter); | ||
} | ||
|
||
protected override void ApplyAdjustment(string actionParameter, int diff) | ||
{ | ||
if (_state is null) | ||
return; | ||
|
||
var volume = _state.LocalVolumeOut; | ||
|
||
volume += diff; | ||
|
||
if (volume < 0) | ||
volume = 0; | ||
|
||
if (volume > 100) | ||
volume = 100; | ||
|
||
_state.LocalVolumeOut = volume; | ||
_state.LocalVolumeOut = _client.SetOutputMixer(_state) | ||
.GetAwaiter().GetResult() | ||
.LocalVolumeOut; | ||
|
||
base.AdjustmentValueChanged(actionParameter); | ||
} | ||
|
||
protected override string GetAdjustmentValue(string actionParameter) | ||
{ | ||
if (_state is null) | ||
return "-"; | ||
|
||
if (_state.IsLocalOutMuted is true) | ||
return "muted"; | ||
|
||
var volume = _state.LocalVolumeOut; | ||
|
||
return $"{volume:0}"; | ||
} | ||
} | ||
} |
Oops, something went wrong.