File tree Expand file tree Collapse file tree 5 files changed +31
-30
lines changed Expand file tree Collapse file tree 5 files changed +31
-30
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ void GetTest(SonarBridge sonarManager)
109109 Console . WriteLine ( "----Current Media Config----------" ) ;
110110 Console . WriteLine ( sonarManager . GetSelectedAudioConfiguration ( Device . Media ) . Name ) ;
111111 Console . WriteLine ( "----Device from config ID----------" ) ;
112- Console . WriteLine ( sonarManager . GetDeviceFromAudioConfigurationId ( "29ae2c02-792b-4487-863c-dc3e11a7a469" ) ) ;
112+ Console . WriteLine ( sonarManager . GetAudioConfiguration ( "29ae2c02-792b-4487-863c-dc3e11a7a469" ) . AssociatedDevice ) ;
113113 Console . WriteLine ( "--------ChatMix---------" ) ;
114114 Console . WriteLine ( sonarManager . GetChatMixBalance ( ) ) ;
115115 Console . WriteLine ( sonarManager . GetChatMixState ( ) ) ;
Original file line number Diff line number Diff line change @@ -47,6 +47,13 @@ public interface ISonarDataProvider
4747 /// <returns>An IEnumerable of <see cref="SonarAudioConfiguration"/></returns>
4848 IEnumerable < SonarAudioConfiguration > GetAllAudioConfigurations ( ) ;
4949
50+ /// <summary>
51+ /// Get a specific audio configuration from Sonar
52+ /// </summary>
53+ /// <param name="configId">The id of the config</param>
54+ /// <returns>A <see cref="SonarAudioConfiguration"/></returns>
55+ SonarAudioConfiguration GetAudioConfiguration ( string configId ) ;
56+
5057 /// <summary>
5158 /// Get all audio configurations of a <see cref="Device"/> from Sonar
5259 /// </summary>
@@ -61,13 +68,6 @@ public interface ISonarDataProvider
6168 /// <returns>A <see cref="SonarAudioConfiguration"/></returns>
6269 SonarAudioConfiguration GetSelectedAudioConfiguration ( Device device ) ;
6370
64- /// <summary>
65- /// Get the associated device of a configuration
66- /// </summary>
67- /// <param name="configId">The id of the audio config</param>
68- /// <returns>A <see cref="Device"/></returns>
69- Device GetDeviceFromAudioConfigurationId ( string configId ) ;
70-
7171 /// <summary>
7272 /// Get the actual ChatMix balance value
7373 /// </summary>
Original file line number Diff line number Diff line change @@ -73,6 +73,23 @@ public IEnumerable<SonarAudioConfiguration> GetAllAudioConfigurations()
7373 yield return new SonarAudioConfiguration ( id , name , ( Device ) DeviceExtensions . FromDictKey ( vDevice ) ) ;
7474 }
7575 }
76+
77+ public SonarAudioConfiguration GetAudioConfiguration ( string configId )
78+ {
79+ IEnumerable < SonarAudioConfiguration > configs = GetAllAudioConfigurations ( ) ;
80+ SonarAudioConfiguration sonarConfig = null ;
81+
82+ foreach ( var config in configs )
83+ {
84+ if ( config . Id == configId )
85+ {
86+ sonarConfig = config ;
87+ break ;
88+ }
89+ }
90+
91+ return sonarConfig ;
92+ }
7693
7794 public IEnumerable < SonarAudioConfiguration > GetAudioConfigurations ( Device device )
7895 {
@@ -121,22 +138,6 @@ public SonarAudioConfiguration GetSelectedAudioConfiguration(Device device)
121138 return new SonarAudioConfiguration ( id , name , ( Device ) DeviceExtensions . FromDictKey ( vDevice ) ) ;
122139 }
123140
124- public Device GetDeviceFromAudioConfigurationId ( string configId )
125- {
126- var configs = GetAllAudioConfigurations ( ) ;
127- SonarAudioConfiguration sonarConfig = null ;
128- foreach ( var config in configs )
129- {
130- if ( config . Id == configId )
131- {
132- sonarConfig = config ;
133- break ;
134- }
135- }
136-
137- return sonarConfig . AssociatedDevice ;
138- }
139-
140141 #endregion
141142
142143 #region ChatMix
Original file line number Diff line number Diff line change @@ -118,6 +118,11 @@ public IEnumerable<SonarAudioConfiguration> GetAllAudioConfigurations()
118118 return _sonarProvider . GetAllAudioConfigurations ( ) ;
119119 }
120120
121+ public SonarAudioConfiguration GetAudioConfiguration ( string configId )
122+ {
123+ return _sonarProvider . GetAudioConfiguration ( configId ) ;
124+ }
125+
121126 public IEnumerable < SonarAudioConfiguration > GetAudioConfigurations ( Device device )
122127 {
123128 return _sonarProvider . GetAudioConfigurations ( device ) ;
@@ -127,11 +132,6 @@ public SonarAudioConfiguration GetSelectedAudioConfiguration(Device device)
127132 {
128133 return _sonarProvider . GetSelectedAudioConfiguration ( device ) ;
129134 }
130-
131- public Device GetDeviceFromAudioConfigurationId ( string configId )
132- {
133- return _sonarProvider . GetDeviceFromAudioConfigurationId ( configId ) ;
134- }
135135
136136 public double GetChatMixBalance ( )
137137 {
Original file line number Diff line number Diff line change 44 <ImplicitUsings >enable</ImplicitUsings >
55 <Nullable >enable</Nullable >
66 <TargetFrameworks >net8.0;net9.0;net7.0</TargetFrameworks >
7- <Version >1.0.4 </Version >
7+ <Version >1.0.5 </Version >
88 <PackageId >Steelseries-NET-API</PackageId >
99 <Product >Steelseries-NET-API</Product >
1010 <Title >SteelSeries .NET API Client</Title >
You can’t perform that action at this time.
0 commit comments