File tree 5 files changed +37
-13
lines changed
5 files changed +37
-13
lines changed Original file line number Diff line number Diff line change
1
+ ## 0.0.4
2
+ * UPDATE Readme.md
3
+ * Added ``` setListenToThisDevice ``` method
4
+ * Added ``` setPlaybackThroughDevice ``` method
5
+
1
6
## 0.0.3
2
7
* UPDATE Readme.md
3
8
Original file line number Diff line number Diff line change @@ -9,15 +9,15 @@ https://www.nirsoft.net/utils/sound_volume_view.html
9
9
## Getting started
10
10
Supported platforms:
11
11
12
- Windows [ X ]
12
+ Windows [ ✅ ]
13
13
14
- MacOS [ ]
14
+ MacOS [ ❌ ]
15
15
16
- Linux [ ]
16
+ Linux [ ❌ ]
17
17
18
- Android [ ]
18
+ Android [ ❌ ]
19
19
20
- iOS [ ]
20
+ iOS [ ❌ ]
21
21
22
22
## Usage
23
23
SoftwarePatch should indicate the folder where you have the executable ``` SoundVolumeView.exe ``` ..
@@ -26,18 +26,35 @@ SoftwarePatch should indicate the folder where you have the executable ```SoundV
26
26
SoundVolumeView soundVolumeView = SoundVolumeView(softwarePath: 'C:\\Program Files\\Sound\\');
27
27
```
28
28
29
- #### Get list of input and output devices
29
+ #### First to get the devices you must call: ``` soundVolumeView.getDevices; ```
30
30
``` dart
31
31
List<Device> devices = await soundVolumeView.getDevices;
32
32
```
33
33
34
+ ### Once you have obtained the devices you will also have a separate list for each type.
35
+ ``` dart
36
+ /// [captureDevices] You only get the capture devices
37
+ soundVolumeView.captureDevices;
38
+
39
+ /// [outputDevices] You only get the output devices
40
+ soundVolumeView.outputDevices;
41
+
42
+ /// [applicationDevices] You only get the application devices
43
+ soundVolumeView.applicationDevices;
44
+ ```
45
+
34
46
#### Set UnMute / Mute
35
47
``` dart
36
48
await soundVolumeView.unMute( devices[index] );
37
49
38
50
await soundVolumeView.mute( devices[index] );
39
51
```
40
52
53
+ #### Set Volume: Range [ 0-100] int
54
+ ``` dart
55
+ await soundVolumeView.setVolume(soundVolumeView.captureDevices[index], 100);
56
+ ```
57
+
41
58
#### You can also listen to the capture sound.
42
59
``` dart
43
60
await soundVolumeView.setListenToThisDevice(devices[index], listen: true);
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ class SoundVolumeView {
30
30
/// [outputDevices] You only get the output devices
31
31
List <Device > outputDevices = < Device > [];
32
32
33
- /// [applicationDevices]
33
+ /// [applicationDevices] You only get the application devices
34
34
List <Device > applicationDevices = < Device > [];
35
35
36
36
/// [getDevices] getDevices gets all input, output, and application devices
@@ -73,6 +73,13 @@ class SoundVolumeView {
73
73
return [];
74
74
}
75
75
}
76
+
77
+ /// [setVolume] Will lower or raise the volume to the indicated device - 0% to 100%
78
+ Future <void > setVolume ( Device device, int volume ) async {
79
+ String path = join (softwarePath, _softwareName);
80
+ final Shell shell = Shell ();
81
+ await shell.run ('$path /SetVolume ${device .name } $volume ' );
82
+ }
76
83
77
84
/// [mute] mute the device
78
85
Future <void > mute ( Device device ) async {
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: sound_volume_view
2
2
description : SoundVolumeView that displays general information and the current volume level for all active sound components in your system, and allows you to instantly mute and unmute them.
3
3
homepage : https://github.com/DomingoMG/sound_volume_view
4
4
repository : https://github.com/DomingoMG/sound_volume_view
5
- version : 0.0.3
5
+ version : 0.0.4
6
6
7
7
environment :
8
8
sdk : " >=2.16.0 <3.0.0"
Original file line number Diff line number Diff line change @@ -10,11 +10,6 @@ const String softwareName = 'SoundVolumeView.exe';
10
10
11
11
Future <void > main () async {
12
12
await checkSoftware ();
13
- List <Device > devices = await getDevices ();
14
- for ( Device device in devices ){
15
- print (device.toJson ());
16
- }
17
-
18
13
}
19
14
20
15
// CHECK SOFTWARE EXIST
You can’t perform that action at this time.
0 commit comments