Skip to content

Commit a7f873e

Browse files
committed
Updated to latest patched SDK.
1 parent 5efe652 commit a7f873e

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

WaveLinkPlugin/Adjustments/InputMonitorMixAdjustment.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,23 @@ public InputMonitorMixAdjustment()
2121
protected override bool OnLoad()
2222
{
2323
_plugin = (WaveLinkPlugin)base.Plugin;
24-
_plugin.AllChannelInfoFetched += PluginOnAllChannelInfoFetched;
2524

2625
_client = _plugin.Client;
2726
_client.InputMixerChanged += InputMixerChanged;
27+
_client.ChannelsChanged += ChannelsChanged;
2828

2929
return true;
3030
}
3131

3232
protected override bool OnUnload()
3333
{
34-
_plugin.AllChannelInfoFetched -= PluginOnAllChannelInfoFetched;
35-
3634
_client.InputMixerChanged -= InputMixerChanged;
35+
_client.ChannelsChanged -= ChannelsChanged;
3736

3837
return true;
3938
}
40-
41-
private void PluginOnAllChannelInfoFetched(object sender, IEnumerable<ChannelInfo> channels)
39+
40+
private void ChannelsChanged(object sender, List<ChannelInfo> channels)
4241
{
4342
if (channels is null)
4443
return;

WaveLinkPlugin/Adjustments/InputStreamMixAdjustment.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,23 @@ public InputStreamMixAdjustment()
2121
protected override bool OnLoad()
2222
{
2323
_plugin = (WaveLinkPlugin)base.Plugin;
24-
_plugin.AllChannelInfoFetched += PluginOnAllChannelInfoFetched;
2524

2625
_client = _plugin.Client;
2726
_client.InputMixerChanged += InputMixerChanged;
27+
_client.ChannelsChanged += ChannelsChanged;
2828

2929
return true;
3030
}
3131

3232
protected override bool OnUnload()
3333
{
34-
_plugin.AllChannelInfoFetched -= PluginOnAllChannelInfoFetched;
35-
3634
_client.InputMixerChanged -= InputMixerChanged;
35+
_client.ChannelsChanged -= ChannelsChanged;
3736

3837
return true;
3938
}
4039

41-
private void PluginOnAllChannelInfoFetched(object sender, IEnumerable<ChannelInfo> channels)
40+
private void ChannelsChanged(object sender, List<ChannelInfo> channels)
4241
{
4342
if (channels is null)
4443
return;
@@ -67,7 +66,7 @@ private void PluginOnAllChannelInfoFetched(object sender, IEnumerable<ChannelInf
6766
base.AddParameter(channelInfo.MixId, channelInfo.MixerName, "Input Volume (Stream)");
6867
}
6968
}
70-
69+
7170
private void InputMixerChanged(object sender, ChannelInfo channelInfo)
7271
{
7372
if (channelInfo?.MixId is null)

WaveLinkPlugin/WaveLinkPlugin.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ public class WaveLinkPlugin : Plugin
1616
private CancellationTokenSource _cancellationTokenSource;
1717

1818
public event EventHandler<IEnumerable<MonitorMixList>> LocalMonitorOutputFetched;
19-
public event EventHandler<IEnumerable<ChannelInfo>> AllChannelInfoFetched;
2019

2120
public WaveLinkPlugin()
2221
{
@@ -98,8 +97,8 @@ private async Task UpdateStatesAsync()
9897
LocalMonitorOutputFetched?.Invoke(this, mixOutputList?.MonitorMixList);
9998
Client.LocalMonitorOutputChanged?.Invoke(this, mixOutputList?.MonitorMix);
10099

101-
var inputMixes = await Client.GetAllChannelInfo();
102-
AllChannelInfoFetched?.Invoke(this, inputMixes);
100+
var channels = await Client.GetAllChannelInfo();
101+
Client.ChannelsChanged?.Invoke(this, channels);
103102
}
104103
}
105104
}

0 commit comments

Comments
 (0)