steelseries-sonar-sdk 0.4.2 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/enums.d.ts +9 -8
- package/dist/index.js +25 -26
- package/dist/types/channel-volumes-classic.d.ts +3 -6
- package/package.json +1 -1
package/dist/enums.d.ts
CHANGED
|
@@ -7,14 +7,15 @@
|
|
|
7
7
|
* @property {@link AudioChannel.Aux} - Auxiliary audio channel.
|
|
8
8
|
* @property {@link AudioChannel.Mic} - Microphone audio channel.
|
|
9
9
|
*/
|
|
10
|
-
export declare
|
|
11
|
-
Master
|
|
12
|
-
Game
|
|
13
|
-
Chat
|
|
14
|
-
Media
|
|
15
|
-
Aux
|
|
16
|
-
Mic
|
|
17
|
-
}
|
|
10
|
+
export declare const AudioChannel: {
|
|
11
|
+
readonly Master: "master";
|
|
12
|
+
readonly Game: "game";
|
|
13
|
+
readonly Chat: "chat";
|
|
14
|
+
readonly Media: "media";
|
|
15
|
+
readonly Aux: "aux";
|
|
16
|
+
readonly Mic: "mic";
|
|
17
|
+
};
|
|
18
|
+
export type AudioChannel = (typeof AudioChannel)[keyof typeof AudioChannel];
|
|
18
19
|
export declare enum ProfileChannel {
|
|
19
20
|
Game = "game",
|
|
20
21
|
Chat = "chat",
|
package/dist/index.js
CHANGED
|
@@ -4826,15 +4826,14 @@ var init_multipart_parser = __esm(() => {
|
|
|
4826
4826
|
});
|
|
4827
4827
|
|
|
4828
4828
|
// src/enums.ts
|
|
4829
|
-
var AudioChannel
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
})(AudioChannel ||= {});
|
|
4829
|
+
var AudioChannel = {
|
|
4830
|
+
Master: "master",
|
|
4831
|
+
Game: "game",
|
|
4832
|
+
Chat: "chat",
|
|
4833
|
+
Media: "media",
|
|
4834
|
+
Aux: "aux",
|
|
4835
|
+
Mic: "mic"
|
|
4836
|
+
};
|
|
4838
4837
|
var ProfileChannel;
|
|
4839
4838
|
((ProfileChannel2) => {
|
|
4840
4839
|
ProfileChannel2["Game"] = "game";
|
|
@@ -4940,12 +4939,12 @@ async function requestVolumeSettingsClassic(sonarEndpoint) {
|
|
|
4940
4939
|
async function getAudioDataClassic(sonarEndpoint) {
|
|
4941
4940
|
const data = await requestVolumeSettingsClassic(sonarEndpoint);
|
|
4942
4941
|
const volumeData = {
|
|
4943
|
-
[
|
|
4944
|
-
[
|
|
4945
|
-
[
|
|
4946
|
-
[
|
|
4947
|
-
[
|
|
4948
|
-
[
|
|
4942
|
+
[AudioChannel.Master]: createResponseVolumeData(data.masters.classic),
|
|
4943
|
+
[AudioChannel.Game]: data.devices.game && createResponseVolumeData(data.devices.game.classic),
|
|
4944
|
+
[AudioChannel.Chat]: data.devices.chatRender && createResponseVolumeData(data.devices.chatRender.classic),
|
|
4945
|
+
[AudioChannel.Media]: data.devices.media && createResponseVolumeData(data.devices.media.classic),
|
|
4946
|
+
[AudioChannel.Aux]: data.devices.aux && createResponseVolumeData(data.devices.aux.classic),
|
|
4947
|
+
[AudioChannel.Mic]: data.devices.chatCapture && createResponseVolumeData(data.devices.chatCapture.classic)
|
|
4949
4948
|
};
|
|
4950
4949
|
return volumeData;
|
|
4951
4950
|
}
|
|
@@ -4980,12 +4979,12 @@ async function requestVolumeSettingsStreamer(sonarEndpoint) {
|
|
|
4980
4979
|
async function getAudioDataStream(sonarEndpoint) {
|
|
4981
4980
|
const data = await requestVolumeSettingsStreamer(sonarEndpoint);
|
|
4982
4981
|
const volumeData = {
|
|
4983
|
-
[
|
|
4984
|
-
[
|
|
4985
|
-
[
|
|
4986
|
-
[
|
|
4987
|
-
[
|
|
4988
|
-
[
|
|
4982
|
+
[AudioChannel.Master]: createResponseVolumeData2(data.masters.stream),
|
|
4983
|
+
[AudioChannel.Game]: data.devices.game && createResponseVolumeData2(data.devices.game.stream),
|
|
4984
|
+
[AudioChannel.Chat]: data.devices.chatRender && createResponseVolumeData2(data.devices.chatRender.stream),
|
|
4985
|
+
[AudioChannel.Media]: data.devices.media && createResponseVolumeData2(data.devices.media.stream),
|
|
4986
|
+
[AudioChannel.Aux]: data.devices.aux && createResponseVolumeData2(data.devices.aux.stream),
|
|
4987
|
+
[AudioChannel.Mic]: data.devices.chatCapture && createResponseVolumeData2(data.devices.chatCapture.stream)
|
|
4989
4988
|
};
|
|
4990
4989
|
return volumeData;
|
|
4991
4990
|
}
|
|
@@ -5063,15 +5062,15 @@ async function setAudioMode(sonarEndpoint, audioMode) {
|
|
|
5063
5062
|
// src/functions/converters/convert-channel-to-api.ts
|
|
5064
5063
|
function convertChannelToApi(channel) {
|
|
5065
5064
|
switch (channel) {
|
|
5066
|
-
case
|
|
5065
|
+
case AudioChannel.Master:
|
|
5067
5066
|
return "master" /* Master */;
|
|
5068
|
-
case
|
|
5067
|
+
case AudioChannel.Game:
|
|
5069
5068
|
return "chatRender" /* ChatRender */;
|
|
5070
|
-
case
|
|
5069
|
+
case AudioChannel.Media:
|
|
5071
5070
|
return "media" /* Media */;
|
|
5072
|
-
case
|
|
5071
|
+
case AudioChannel.Aux:
|
|
5073
5072
|
return "aux" /* Aux */;
|
|
5074
|
-
case
|
|
5073
|
+
case AudioChannel.Mic:
|
|
5075
5074
|
return "chatCapture" /* ChatCapture */;
|
|
5076
5075
|
default:
|
|
5077
5076
|
throw new Error(`Unsupported AudioChannel: ${channel}`);
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { AudioChannel } from '@/enums';
|
|
1
|
+
import type { AudioChannel } from '@/enums';
|
|
2
2
|
import type { ChannelVolumeClassic } from '@/types/channel-volume-classic';
|
|
3
3
|
export type ChannelVolumesClassic = {
|
|
4
4
|
[AudioChannel.Master]: ChannelVolumeClassic;
|
|
5
|
-
|
|
6
|
-
[AudioChannel
|
|
7
|
-
[AudioChannel.Media]: ChannelVolumeClassic | undefined;
|
|
8
|
-
[AudioChannel.Aux]: ChannelVolumeClassic | undefined;
|
|
9
|
-
[AudioChannel.Mic]: ChannelVolumeClassic | undefined;
|
|
5
|
+
} & {
|
|
6
|
+
[K in AudioChannel]?: ChannelVolumeClassic;
|
|
10
7
|
};
|