KDE 4.7 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

AudioInterface Class Reference

from PyKDE4.solid import *

Inherits: Solid.DeviceInterface → QObject
Namespace: Solid

Detailed Description

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


Enumerations

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

Methods

 __init__ (self, QObject backendObject)
Solid.AudioInterface.AudioInterfaceTypes deviceType (self)
Solid.AudioInterface.AudioDriver driver (self)
QVariant driverHandle (self)
QString name (self)
Solid.AudioInterface.SoundcardType soundcardType (self)

Static Methods

Solid.DeviceInterface.Type deviceInterfaceType ()

Method Documentation

__init__ (  self,
QObject  backendObject
)

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

Parameters:
backendObject  the device interface object provided by the backend

See also:
Solid.Device.as()

Solid.AudioInterface.AudioInterfaceTypes deviceType (   self )

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

Returns:
the type of this audio interface
See also:
Solid.AudioInterface.AudioInterfaceType

Solid.AudioInterface.AudioDriver driver (   self )

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

QVariant driverHandle (   self )

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

QString name (   self )

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

Solid.AudioInterface.SoundcardType soundcardType (   self )

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

Returns:
the type of soundcard
See also:
Solid.AudioInterface.SoundcardType


Static Method Documentation

Solid.DeviceInterface.Type deviceInterfaceType (   )

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

Returns:
the AudioInterface device interface type
See also:
Solid.DeviceInterface.Type


Enumeration Documentation

AudioDriver

This enum type defines the type of driver required to interact with the device.

Enumerator:
Alsa 
OpenSoundSystem 
UnknownAudioDriver 

AudioInterfaceType

This enum type defines the type of audio interface this device expose.

Enumerator:
UnknownAudioInterfaceType = 0
AudioControl = 1
AudioInput = 2
AudioOutput = 4

SoundcardType

This enum defines the type of soundcard of this device.

Enumerator:
InternalSoundcard 
UsbSoundcard 
FirewireSoundcard 
Headset 
Modem 

  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • plasma
  • polkitqt
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal