You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-14Lines changed: 17 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,44 +11,47 @@
11
11
> This library is **NOT** affiliated in any way with **SteelSeries**
12
12
> I've made it because it was interesting and funny to do, also I wanted to share this project for people to use it for their own projects
13
13
14
-
This library allows you to take control over the SteelSeries GG app.
14
+
This library allows you to take control over the SteelSeries GG app (only Sonar for now).
15
15
16
-
The API is available via a [nuget package](https://www.nuget.org/packages/Steelseries-NET-API).
16
+
The library is available via a [nuget package](https://www.nuget.org/packages/Steelseries-NET-API).
17
17
It is also available in the [Releases](https://github.com/mpaperno/SteelSeries-NET-API/releases) tab as a .zip archive for each supported .NET version.
18
18
19
19
## Features
20
20
- Full Sonar control
21
+
- Mode
22
+
- Volume
23
+
- Mute
24
+
- ChatMix
25
+
- Configs (Can't edit a config)
26
+
- Playback Devices
27
+
- Streamer mode Personal & Stream Mixes
28
+
- Streamer mode Audience Monitoring
21
29
22
30
## Getting Started
23
31
To get started, you only need to create a Sonar Object.
24
32
`````csharp
25
33
// Create Sonar object
26
34
SonarBridgesonarManager=newSonarBridge();
27
35
36
+
// Wait for GG to start before continuing
37
+
sonarManager.WaitUntilSteelSeriesStarted();
38
+
28
39
// Wait for sonar to start before continuing
29
40
sonarManager.WaitUntilSonarStarted();
30
41
31
42
// Start listening to Sonar Events (optional and require admin rights)
ModecurrentMode=sonarManager.GetMode(); // Returns the current mode
36
-
sonarManager.SetVolume(0.5, Device.Game); // Set the Game Device volume
46
+
ModecurrentMode=sonarManager.Mode.Get(); // Returns the current mode
47
+
sonarManager.VolumeSettings.SetVolume(0.5, Device.Game); // Set the Game Device volume
37
48
...
38
49
`````
39
-
For more example, you can check the [Tests](https://github.com/DataNext27/SteelSeries-NET-API/tree/main/SteelSeriesAPI.Tests) and the [Sample](https://github.com/DataNext27/SteelSeries-NET-API/tree/main/SteelSeriesAPI.Sample) folders.
50
+
For more example, you can check the [Sample](SteelSeriesAPI.Sample/Program.cs) and the [Tests](SteelSeriesAPI.Tests/Program.cs) folders.
40
51
If you need any sort of Documentation, go check the [Repo's Wiki](https://github.com/DataNext27/SteelSeries-NET-API/wiki) for more information.
41
52
42
-
### Some Vocabulary
43
-
- Mode : Classic/Stream
44
-
- Device : Master/Game/Chat/Media/Aux/Mic
45
-
- Channel : *(Streamer mode)* Monitoring/Stream
46
-
- Audio Configs : It's in the name
47
-
- Redirection States : *(Streamer mode)* Button above sliders to un/mute a channel of a device
48
-
- Redirection Device : Device where the sound got by GG is redirected (your headset for example)
49
-
50
53
## Todo
51
-
(Actually not possible, maybe one day i guess :/ )
54
+
(Actually not planned as not possible, maybe one day I guess :/ )
// Wait until GG and Sonar are both started before continuing
15
18
sonarManager.WaitUntilSonarStarted();
16
19
17
-
// If I want to detect changes made on GG, I can use the listener (require admin rights)
20
+
// If you want to detect changes made on GG, you can use the listener (require admin rights)
18
21
sonarManager.StartListener();
19
-
// Then I register the events I want (I've put them all to demonstrate)
20
-
sonarManager.SonarEventManager.OnSonarModeChange+=OnModeChangeHandler;// When the mode is change
21
-
sonarManager.SonarEventManager.OnSonarVolumeChange+=OnVolumeChangeHandler;// When the volume of a Sonar Device or Channel is changed
22
-
sonarManager.SonarEventManager.OnSonarMuteChange+=OnMuteChangeHandler;// When a Sonar Device or Channel is muted or unmuted
23
-
sonarManager.SonarEventManager.OnSonarConfigChange+=OnConfigChangeHandler;// When a new config is set to a Sonar Device
24
-
sonarManager.SonarEventManager.OnSonarChatMixChange+=OnChatMixChangeHandler;// When the ChatMix value is changed
25
-
sonarManager.SonarEventManager.OnSonarRedirectionDeviceChange+=OnRedirectionDeviceChangeHandler;// When the Redirection Device of a Sonar Device is changed
26
-
sonarManager.SonarEventManager.OnSonarRedirectionStateChange+=OnRedirectionStateChangeHandler;// When the Redirection of a Sonar Channel is muted or unmuted
27
-
sonarManager.SonarEventManager.OnSonarAudienceMonitoringChange+=OnAudienceMonitoringChangeHandler;// When the Audience Monitoring is muted or unmuted
22
+
// Then you register the events you need (I've put them all to demonstrate)
23
+
sonarManager.Events.OnSonarModeChange+=OnModeChangeHandler;// When the mode gets changed
24
+
sonarManager.Events.OnSonarVolumeChange+=OnVolumeChangeHandler;// When the volume of a Sonar Channel or Mix gets changed
25
+
sonarManager.Events.OnSonarMuteChange+=OnMuteChangeHandler;// When a Sonar Channel or Mix gets muted or unmuted
26
+
sonarManager.Events.OnSonarConfigChange+=OnConfigChangeHandler;// When a new config is set to a Sonar Channel
27
+
sonarManager.Events.OnSonarChatMixChange+=OnChatMixChangeHandler;// When the ChatMix value gets changed
28
+
sonarManager.Events.OnSonarPlaybackDeviceChange+=OnPlaybackDeviceChangeHandler;// When the Redirection Channel of a Sonar Channel is changed
29
+
sonarManager.Events.OnSonarRoutedProcessChange+=OnRoutedProcessChangeHandler;// When a routed process gets routed to a new Sonar Channel
30
+
sonarManager.Events.OnSonarMixChange+=OnMixChangeHandler;// When the Mix of a Sonar Channem gets activated or deactivated
31
+
sonarManager.Events.OnSonarAudienceMonitoringChange+=OnAudienceMonitoringChangeHandler;// When the Audience Monitoring gets muted or unmuted
List<SonarAudioConfiguration>allConfigs=sonarManager.GetAllAudioConfigurations().ToList();// Return all configs (A SonarAudioConfiguration contains an Id, a Name and an AssociatedDevice)
51
-
List<SonarAudioConfiguration>mediaConfigs=sonarManager.GetAudioConfigurations(Device.Media).ToList();// Return all configs of a Sonar Device
52
-
SonarAudioConfigurationcurrentConfig=sonarManager.GetSelectedAudioConfiguration(Device.Media);// Return the currently used config of a Sonar Device
53
-
// Set the config of a Sonar Device
54
-
sonarManager.SetConfig(Device.Media,"Podcast");// Using its name
55
-
sonarManager.SetConfig(currentConfig.Id);// Using its id (no need to precise which Sonar Device, one id goes to one Sonar Device)
54
+
List<SonarAudioConfiguration>allConfigs=sonarManager.Configurations.GetAllAudioConfigurations().ToList();// Return all configs (A SonarAudioConfiguration contains an Id, a Name and an AssociatedChannel)
55
+
List<SonarAudioConfiguration>mediaConfigs=sonarManager.Configurations.GetAudioConfigurations(Channel.MEDIA).ToList();// Return all configs of a Sonar Channel
56
+
SonarAudioConfigurationcurrentConfig=sonarManager.Configurations.GetSelectedAudioConfiguration(Channel.MEDIA);// Return the currently used config of a Sonar Channel
57
+
// Set the config of a Sonar Channel
58
+
sonarManager.Configurations.SetConfigByName(Channel.MEDIA,"Podcast");// Using its name
59
+
sonarManager.Configurations.SetConfig(currentConfig);// Using directly the config object
60
+
sonarManager.Configurations.SetConfig(currentConfig.Id);// Or Using its id (no need to precise which Sonar Channel, one id = one config = one Sonar Channel)
56
61
57
62
// Get ChatMix info
58
-
doublechatMixBalance=sonarManager.GetChatMixBalance();// The ChatMix value between -1 and 1
59
-
boolchatMixState=sonarManager.GetChatMixState();// If ChatMix is usable or not
63
+
doublechatMixBalance=sonarManager.ChatMix.GetBalance();// The ChatMix value between -1 and 1
64
+
boolchatMixState=sonarManager.ChatMix.GetState();// If ChatMix is usable or not
60
65
// Change ChatMix value
61
-
sonarManager.SetChatMixBalance(0.5);// 0.5 is halfway to Chat
66
+
sonarManager.ChatMix.SetBalance(0.5);// 0.5 is halfway to Chat
List<RoutedProcess>gameProcesses=sonarManager.RoutedProcesses.GetRoutedProcesses(Channel.GAME).ToList();// Will surely return apps like Minecraft...
98
+
List<RoutedProcess>mediaActiveProcesses=sonarManager.RoutedProcesses.GetActiveRoutedProcesses(Channel.MEDIA).ToList();// Will surely return apps like Google Chrome or Spotify
99
+
// Same idea but by giving the ID of an audio process
0 commit comments