# class AudioInterface

###

Module | solid
Namespace | Solid
Class | AudioInterface
Inherits | Solid::DeviceInterface

This device interface is available on interfaces exposed by sound cards.

### enums

- AudioDriver { Alsa, OpenSoundSystem, UnknownAudioDriver }
- AudioInterfaceType { UnknownAudioInterfaceType, AudioControl, AudioInput, AudioOutput }
- SoundcardType { InternalSoundcard, UsbSoundcard, FirewireSoundcard, Headset, Modem }

enum details

### methods

- AudioInterface (backendObject)

  returns ctor
  Not implemented
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  backendObject | QObject |

  Creates a new AudioInterface object. You generally won't need this. It's created when necessary using Device.as().

  backendObject - the device interface object provided by the backend

  See also Solid.Device.as()

- AudioInterface (a0)

  returns ctor
  Not implemented
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QObject |

- deviceInterfaceType ( )

  returns Solid::DeviceInterface.Type
  static

  Get the Solid.DeviceInterface.Type of the AudioInterface device interface.

  Returns the AudioInterface device interface type

  See also Solid.DeviceInterface.Type

- deviceType ( )

  returns Solid::AudioInterface.AudioInterfaceTypes

  Retrieves the type of this audio interface (in/out/control).

  Returns the type of this audio interface

  See also Solid.AudioInterface.AudioInterfaceTypes

- driver ( )

  returns Solid::AudioInterface.AudioDriver

  Retrieves the audio driver that should be used to access the device.

  Returns the driver needed to access the device

  See also Solid.AudioInterface.AudioDriver

- driverHandle ( )

  returns QVariant

  Retrieves a driver specific handle to access the device.

  For Alsa devices it is a list with (card, device, subdevice).

      QVariantList list = dev->driverHandle().toList();
      QString card = list[0].toString();
      int device = list[1].toInt();
      int subdevice = list[2].toInt();

  The card entry sometimes can be converted to an integer, but it may just as well be the textual id for the card. So don't rely on it to work with QVariant.toInt().

  For OSS devices it is simply a string like "/dev/dsp". Use QVariant.toString() to retrieve the string.

  Returns the driver specific data to handle this device

- name ( )

  returns QString

  Retrieves the name of this audio interface.

  The product name of the parent device is normally better suited for the user to identify the soundcard. If the soundcard has multiple devices, though you need to add this name to differentiate between the devices.

  Returns the name of the audio interface if available, QString() otherwise

- soundcardType ( )

  returns Solid::AudioInterface.SoundcardType

  Retrieves the type of soundcard (internal/headset/...).

  Returns the type of soundcard

  See also Solid.AudioInterface.SoundcardType

### enums - detail

- AudioDriver { Alsa, OpenSoundSystem, UnknownAudioDriver }

  An Advanced Linux Sound Architecture (ALSA) driver device

  | Alsa | - | - |
  | OpenSoundSystem | - | - |
  | UnknownAudioDriver | - | - |

- AudioInterfaceType { UnknownAudioInterfaceType, AudioControl, AudioInput, AudioOutput }

  An unknown audio interface

  | UnknownAudioInterfaceType | - 0 | - |
  | AudioControl | - 1 | - |
  | AudioInput | - 2 | - |
  | AudioOutput | - 4 | - |

- SoundcardType { InternalSoundcard, UsbSoundcard, FirewireSoundcard, Headset, Modem }

  An internal soundcard (onboard or PCI card).

  | InternalSoundcard | - | - |
  | UsbSoundcard | - | - |
  | FirewireSoundcard | - | - |
  | Headset | - | - |
  | Modem | - | - |