Package com.ferrumx.system.hardware
Class Win32_SoundDevice
java.lang.Object
com.ferrumx.system.hardware.Win32_SoundDevice
This class queries the Win32_SoundDevice class of WMI and represents the
Audio Driver details of your system.
Fetches the following properties: ProductName, Status, Caption, PNPDeviceID, Manufacturer
- Author:
- Egg-03
-
Method Summary
Modifier and TypeMethodDescriptiongetCurrentAudioDevice
(String deviceID) This method fetches the Audio Device Driver details based on the Audio Device IDThis method fetches a list of Audio Device IDs found in the system
-
Method Details
-
getSoundDeviceID
public static List<String> getSoundDeviceID() throws IOException, IndexOutOfBoundsException, ShellException, InterruptedExceptionThis method fetches a list of Audio Device IDs found in the system- Returns:
- a
List
of Audio Device IDs - Throws:
IOException
- re-throws the exception thrown byCIM_ML.getPropertyValue(String, String)
when there are I/O Errors during streaming of data from and to Powershell and other generated filesIndexOutOfBoundsException
- re-throws the exception thrown byCIM_ML.getPropertyValue(String, String)
when there is a parsing error of data fetched from Windows PowershellShellException
- if any internal command used in the powershell throws errorsInterruptedException
- if the thread waiting for the process to exit, gets interrupted. When catching this exception, you may re-throw it's interrupted status by using Thread.currentThread().interrupt();
-
getCurrentAudioDevice
public static Map<String,String> getCurrentAudioDevice(String deviceID) throws IOException, IndexOutOfBoundsException, ShellException, InterruptedException This method fetches the Audio Device Driver details based on the Audio Device ID- Parameters:
deviceID
- fetched fromgetSoundDeviceID()
- Returns:
- a
Map
of Audio Driver/Device properties mentioned in the class description - Throws:
IOException
- re-throws the exception thrown byCIM_ML.getPropertiesAndTheirValuesWhere(String, String, String, String)
when there are I/O Errors during streaming of data from and to Powershell and other generated filesIndexOutOfBoundsException
- re-throws the exception thrown byCIM_ML.getPropertiesAndTheirValuesWhere(String, String, String, String)
when there is a parsing error of data fetched from Windows PowershellShellException
- if any internal command used in the powershell throws errorsInterruptedException
- if the thread waiting for the process to exit, gets interrupted. When catching this exception, you may re-throw it's interrupted status by using Thread.currentThread().interrupt();
-