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.
First of all, thanks to NirSoft for creating SoundVolumeView.exe. Without this, it would not be possible for Windows.
Visit NirSoft SoundVolumeView for more information.
Supported platforms:
- ✅ Windows
- ❌ MacOS
- ❌ Linux
- ❌ Android
- ❌ iOS
- ❌ Web
The SoundVolumeView
instance will search for the executable via the command line. If it is not found, it will launch the SoundVolumeView installation internally.
SoundVolumeView soundVolumeView = SoundVolumeView.getInstance();
bool isCheckIfSoundVolumeViewInstalled = await soundVolumeView.checkIfSoundVolumeViewInstalled();
late bool isInstalled;
if( !isCheckIfSoundVolumeViewInstalled ) {
isInstalled = await soundVolumeView.installSoundVolumeView();
}
if( isInstalled ) {
await soundVolumeView.refreshDevices();
}
final isInstalled = await soundVolumeView.installSoundVolumeView();
if( !isInstalled ) ......
final isUninstalled = await soundVolumeView.uninstallSoundVolumeView();
if( !isUninstalled ) ......
List<Device> devices = await soundVolumeView.refreshDevices();
/// [captureDevices] You only get the capture devices
soundVolumeView.captureDevices;
/// [outputDevices] You only get the output devices
soundVolumeView.outputDevices;
/// [applicationDevices] You only get the application devices
soundVolumeView.applicationDevices;
bool isUnMute = await soundVolumeView.unMute( devices[index] );
bool isMute = await soundVolumeView.mute( devices[index] );
bool isSetVolume = await soundVolumeView.setVolume(soundVolumeView.captureDevices[index], 100);
bool isSetListenToThisDevice = await soundVolumeView.setListenToThisDevice(devices[index], listen: true);
Device outputDevice = soundVolumeView.outputDevices.firstWhere(( device ) => device.itemID == value);
final isSetPlaybackThroughDevice = await soundVolumeView.setPlaybackThroughDevice(soundVolumeView.captureDevices[index], outputDevice);
enum DefaultType {
console,
multimedia,
communications,
all
}
Device outputDeviceFound = soundVolumeView.outputDevices.firstWhere((element) => element.itemID == itemId);
final isSetAppDefault = await soundVolumeView.setAppDefault(soundVolumeView.applicationDevices[index], device, defaultType: DefaultType.all);
final isSetDefault = await soundVolumeView.setDefault(soundVolumeView.outputDevices[index], defaultType: DefaultType.all);