# AudioDevice

`import { AudioDevice } from "destack:audio/binding";`

Audio device.

```ds title="AudioDevice"
export struct AudioDevice {
    id: string;
    groupId: string;
    name: string;
    backend: AudioBackendKind;
    direction: AudioDirection;
    transport: string;
    isConnected: boolean;
    isRaw: boolean;
    isDefaultPlayback: boolean;
    isDefaultCapture: boolean;
    isDefaultLoopback: boolean;
    shareModes: AudioShareMode[];
    preferredFormat: AudioFormat;
    formats: AudioFormatRange[];
}
```

[language/library/src/audio/binding/device.ds:125:154](https://github.com/destack-sh/destack/blob/main/language/library/src/audio/binding/device.ds#L125-L154)

## Members

### `id: string`

Stable device identifier.

### `groupId: string`

Related endpoint group identifier.

### `name: string`

Display name.

### `backend: AudioBackendKind`

Host backend.

### `direction: AudioDirection`

Device direction.

### `transport: string`

Transport or driver name.

### `isConnected: boolean`

Whether the device is currently connected.

### `isRaw: boolean`

Whether this is a raw endpoint.

### `isDefaultPlayback: boolean`

Whether this is the default playback endpoint.

### `isDefaultCapture: boolean`

Whether this is the default capture endpoint.

### `isDefaultLoopback: boolean`

Whether this is the default loopback endpoint.

### `shareModes: AudioShareMode[]`

Supported share modes.

### `preferredFormat: AudioFormat`

Preferred format.

### `formats: AudioFormatRange[]`

Supported format ranges.
