ReadonlyavailableAll sample rates (in Hz) that this device supports. For devices that support a range, both the minimum and maximum are included.
Output stereo balance in the range 0.0 (full left)–1.0 (full right),
or null if balance control is not available.
ReadonlyidThe CoreAudio object ID of this device.
ReadonlyinputNumber of input channels, or 0 if the device has no input.
Whether input is muted. Always false if the device has no mutable input.
Input (microphone) volume scalar in the range 0.0–1.0, or null if
the device has no controllable input volume.
ReadonlyisWhether this device has input streams (can record audio).
ReadonlyisWhether this device has output streams (can play audio).
Whether output is muted. Always false if the device has no mutable output.
ReadonlynameThe human-readable name of this device (e.g. "Built-in Output").
ReadonlyoutputNumber of output channels, or 0 if the device has no output.
The current nominal sample rate in Hz (e.g. 44100), or null if unknown.
ReadonlytransportThe transport mechanism: "built-in", "usb", "bluetooth", "bluetooth-le",
"hdmi", "display-port", "firewire", "airplay", "avb",
"thunderbolt", "virtual", "aggregate", "pci", or "unknown".
ReadonlyuidThe persistent unique identifier for this device.
Output volume scalar in the range 0.0–1.0, or null if the device has
no controllable output volume. Setting null is a no-op.
Register a listener for a per-device property-change event.
A JavaScript function that receives an event name string
The current input data source as { id, name }, or null if unavailable.
A dictionary containing the id and name of the current input data source
The current output data source as { id, name }, or null if unavailable.
A dictionary containing the id and name of the current output data source
All available input data sources as an array of { id, name } objects.
A dictionary containing the ids and names of all available input data sources
All available output data sources as an array of { id, name } objects.
A dictionary containing the ids and names of all available output data sources
Remove a previously registered per-device listener.
The JavaScript function that was passed to addWatcher(_:)
Select an input data source by its numeric ID.
The id value from inputDataSources()
true on success
Select an output data source by its numeric ID.
The id value from outputDataSources()
true on success
Make this device the system alert sound (effect) device.
true on success
Make this device the system default input device.
true on success
Make this device the system default output device.
true on success
An audio device attached to the system. Obtain instances via
hs.audiodevicemodule methods — do not instantiate directly.Getting and setting volume
Watching for changes