Skip to content

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.

License

Notifications You must be signed in to change notification settings

DomingoMG/sound_volume_view

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Expressions of gratitude

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.

Getting started

Supported platforms:

  • ✅ Windows
  • ❌ MacOS
  • ❌ Linux
  • ❌ Android
  • ❌ iOS
  • ❌ Web

Usage

The SoundVolumeView instance will search for the executable via the command line. If it is not found, it will launch the SoundVolumeView installation internally.

Sigleton instance

SoundVolumeView soundVolumeView = SoundVolumeView.getInstance();

First make sure you have SoundVolumeView installed on your system. Example:

bool isCheckIfSoundVolumeViewInstalled = await soundVolumeView.checkIfSoundVolumeViewInstalled();

late bool isInstalled;
if( !isCheckIfSoundVolumeViewInstalled ) {
  isInstalled = await soundVolumeView.installSoundVolumeView();
}

if( isInstalled ) {
  await soundVolumeView.refreshDevices();
}

Second if you do not have SoundVolumeView installed, you can install it with the following command:

final isInstalled = await soundVolumeView.installSoundVolumeView();
if( !isInstalled ) ......

Third if you want to uninstall SoundVolumeView, you can run the following command:

final isUninstalled = await soundVolumeView.uninstallSoundVolumeView();
if( !isUninstalled ) ......

First to get the devices you must call: soundVolumeView.refreshDevices();

List<Device> devices = await soundVolumeView.refreshDevices();

Once you have obtained the devices you will also have a separate list for each type.

  /// [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;

Set UnMute / Mute

bool isUnMute = await soundVolumeView.unMute( devices[index] );

bool isMute = await soundVolumeView.mute( devices[index] );

Set Volume: Range [0-100] int

bool isSetVolume = await soundVolumeView.setVolume(soundVolumeView.captureDevices[index], 100);

You can also listen to the capture sound.

bool isSetListenToThisDevice = await soundVolumeView.setListenToThisDevice(devices[index], listen: true);

You can also set the sound output to the recording line

  Device outputDevice = soundVolumeView.outputDevices.firstWhere(( device ) => device.itemID == value);
  final isSetPlaybackThroughDevice = await soundVolumeView.setPlaybackThroughDevice(soundVolumeView.captureDevices[index], outputDevice);

DefaultType: all - Set all default types (Console, Multimedia, and Communications)

enum DefaultType {
  console,
  multimedia,
  communications,
  all
}

You can assign output devices to applications via the pid process

Device outputDeviceFound = soundVolumeView.outputDevices.firstWhere((element) => element.itemID == itemId);
final isSetAppDefault = await soundVolumeView.setAppDefault(soundVolumeView.applicationDevices[index], device, defaultType: DefaultType.all);

Indicates which is the default output device, communications, etc...

final isSetDefault = await soundVolumeView.setDefault(soundVolumeView.outputDevices[index], defaultType: DefaultType.all);

About

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.

Resources

License

Stars

Watchers

Forks

Packages

No packages published