Skip to content

Commit 8901185

Browse files
authored
Merge pull request #3 from DomingoMG/master
Changelog and readme updated
2 parents cb43fe9 + a96ce20 commit 8901185

File tree

3 files changed

+46
-18
lines changed

3 files changed

+46
-18
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.0.2
2+
- Readme updated
3+
- Changelog updated
4+
15
## 2.0.1
26
`checkIfSoundVolumeViewInstalled:` Added function to check if SoundVolumeView is installed on the system.
37
`installSoundVolumeView:` Added function to install SoundVolumeView on the system.

README.md

+40-16
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
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.
1+
SoundVolumeView 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.
22

33
![](https://github.com/DomingoMG/sound_volume_view/blob/main/assets/SoundVolumeView.png?raw=true)
44

55
## Expressions of gratitude
6-
First of all thanks to nirsoft for creating SoundVolumeView.exe. Without this it would not be possible for Windows.
7-
https://www.nirsoft.net/utils/sound_volume_view.html
6+
First of all, thanks to NirSoft for creating SoundVolumeView.exe. Without this, it would not be possible for Windows.
7+
Visit [NirSoft SoundVolumeView](https://www.nirsoft.net/utils/sound_volume_view.html) for more information.
88

99
## Getting started
10-
Supported platforms:
11-
10+
Supported platforms:
1211
- ✅ Windows
1312
- ❌ MacOS
1413
- ❌ Linux
@@ -17,12 +16,37 @@ Supported platforms:
1716
- ❌ Web
1817

1918
## Usage
20-
The instance SoundVolumeView() will look for the executable SoundVolumeView.exe in the compilation files of the program.
21-
If not found, it will throw an ```PlatformException``` specifying the path of the executable.
19+
The `SoundVolumeView` instance will search for the executable via the command line. If it is not found, it will launch the SoundVolumeView installation internally.
20+
21+
#### Sigleton instance
22+
```dart
23+
SoundVolumeView soundVolumeView = SoundVolumeView.getInstance();
24+
```
25+
26+
#### First make sure you have SoundVolumeView installed on your system. Example:
27+
```dart
28+
bool isCheckIfSoundVolumeViewInstalled = await soundVolumeView.checkIfSoundVolumeViewInstalled();
29+
30+
late bool isInstalled;
31+
if( !isCheckIfSoundVolumeViewInstalled ) {
32+
isInstalled = await soundVolumeView.installSoundVolumeView();
33+
}
34+
35+
if( isInstalled ) {
36+
await soundVolumeView.refreshDevices();
37+
}
38+
```
39+
40+
#### Second if you do not have SoundVolumeView installed, you can install it with the following command:
41+
```dart
42+
final isInstalled = await soundVolumeView.installSoundVolumeView();
43+
if( !isInstalled ) ......
44+
```
2245

46+
#### Third if you want to uninstall SoundVolumeView, you can run the following command:
2347
```dart
24-
SoundVolumeView soundVolumeView = SoundVolumeView();
25-
// ...build/windows/runner/Debug/vendors/sound_volume_view.exe // Add the path vendor folder and the executable SoundVolumeView.exe
48+
final isUninstalled = await soundVolumeView.uninstallSoundVolumeView();
49+
if( !isUninstalled ) ......
2650
```
2751

2852
#### First to get the devices you must call: ```soundVolumeView.refreshDevices();```
@@ -44,25 +68,25 @@ List<Device> devices = await soundVolumeView.refreshDevices();
4468

4569
#### Set UnMute / Mute
4670
```dart
47-
await soundVolumeView.unMute( devices[index] );
71+
bool isUnMute = await soundVolumeView.unMute( devices[index] );
4872
49-
await soundVolumeView.mute( devices[index] );
73+
bool isMute = await soundVolumeView.mute( devices[index] );
5074
```
5175

5276
#### Set Volume: Range [0-100] int
5377
```dart
54-
await soundVolumeView.setVolume(soundVolumeView.captureDevices[index], 100);
78+
bool isSetVolume = await soundVolumeView.setVolume(soundVolumeView.captureDevices[index], 100);
5579
```
5680

5781
#### You can also listen to the capture sound.
5882
```dart
59-
await soundVolumeView.setListenToThisDevice(devices[index], listen: true);
83+
bool isSetListenToThisDevice = await soundVolumeView.setListenToThisDevice(devices[index], listen: true);
6084
```
6185

6286
#### You can also set the sound output to the recording line
6387
```dart
6488
Device outputDevice = soundVolumeView.outputDevices.firstWhere(( device ) => device.itemID == value);
65-
await soundVolumeView.setPlaybackThroughDevice(soundVolumeView.captureDevices[index], outputDevice);
89+
final isSetPlaybackThroughDevice = await soundVolumeView.setPlaybackThroughDevice(soundVolumeView.captureDevices[index], outputDevice);
6690
```
6791

6892
#### DefaultType: all - Set all default types (Console, Multimedia, and Communications)
@@ -78,10 +102,10 @@ enum DefaultType {
78102
#### You can assign output devices to applications via the pid process
79103
```dart
80104
Device outputDeviceFound = soundVolumeView.outputDevices.firstWhere((element) => element.itemID == itemId);
81-
await soundVolumeView.setAppDefault(soundVolumeView.applicationDevices[index], device, defaultType: DefaultType.all);
105+
final isSetAppDefault = await soundVolumeView.setAppDefault(soundVolumeView.applicationDevices[index], device, defaultType: DefaultType.all);
82106
```
83107

84108
#### Indicates which is the default output device, communications, etc...
85109
```dart
86-
await soundVolumeView.setDefault(soundVolumeView.outputDevices[index], defaultType: DefaultType.all);
110+
final isSetDefault = await soundVolumeView.setDefault(soundVolumeView.outputDevices[index], defaultType: DefaultType.all);
87111
```

pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: sound_volume_view
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-
version: 2.0.1
2+
description: "SoundVolumeView 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+
version: 2.0.2
44
homepage: https://github.com/DomingoMG/sound_volume_view
55
repository: https://github.com/DomingoMG/sound_volume_view
66
issue_tracker: https://github.com/DomingoMG/sound_volume_view/issues

0 commit comments

Comments
 (0)