- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# AudioOutputInterface42 Class Reference

Search for all occurrences

## Detailed Description

Definition at line 91 of file audiooutputinterface.h.

`#include <audiooutputinterface.h>`

Inheritance diagram for AudioOutputInterface42:
[legend]

List of all members.

## Public Member Functions
virtual bool | setOutputDevice (const Phonon::AudioOutputDevice &)=0
| Requests to change the current output device.
PHONON_EXPORT QList< QPair < QByteArray, QString > > | deviceAccessListFor (const Phonon::AudioOutputDevice &) const
| Helper function for backends to get a list of (driver, handle) pairs for AudioOutputDevice objects that are listed by the platform plugin.

## Member Function Documentation

virtual bool setOutputDevice | ( | const Phonon::AudioOutputDevice & |  | ) | `[pure virtual]`

Search for all occurrences

Requests to change the current output device.

Returns:
  `true` if the requested device works and is used after this call.
  `false` if something failed and the device is not used after this call.

PHONON_EXPORT QList<QPair<QByteArray, QString> > deviceAccessListFor | ( | const Phonon::AudioOutputDevice & |  | ) | const

Search for all occurrences

Helper function for backends to get a list of (driver, handle) pairs for AudioOutputDevice objects that are listed by the platform plugin.

Example:

               typedef QPair<QByteArray, QString> PhononDeviceAccess;
               const QList<PhononDeviceAccess> &deviceAccessList = deviceAccessListFor(deviceDesc);
               foreach (const PhononDeviceAccess &access, deviceAccessList) {
                   const QByteArray &driver = access.first;
                   const QString &handle = access.second;
                   if (openDevice(driver, handle)) {
                       // we found the first pair in the list that works. done.
                       return;
                   }
                   // continue trying the other (driver, handle) pairs
               }
               // none of the (driver, handle) pairs worked, that means the whole AudioOutputDevice is
               // inaccessible and the frontend needs to know (either by emitting audioDeviceFailed or
               // returning false when called from setOutputDevice)

At the time of this writing the following driver strings are known to be in use:

- `alsa:` The handle is the string to pass to snd_pcm_open (e.g. "dmix:CARD=0,DEV=1")
- `oss:` The handle is the device file (e.g. "/dev/dsp")
- `pulseaudio:` The handle contains the server string and the sink/source name separated by a newline character. (e.g. unix:/tmp/pulse-mkretz/native.pci_8086_293e_sound_card_0_alsa_playback_0)

The documentation for this class was generated from the following file:

- phonon/audiooutputinterface.h

AudioOutputInterface42 AudioOutputInterface42 AudioOutputInterface42 AudioOutputInterface42 AudioOutputInterface42 AudioOutputInterface42 AudioOutputInterface42 AudioOutputInterface42 AudioOutputInterface42 AudioOutputInterface42
AudioOutputInterface42 AudioOutputInterface42 AudioOutputInterface42 AudioOutputInterface42 AudioOutputInterface42 AudioOutputInterface42 AudioOutputInterface42 AudioOutputInterface42 AudioOutputInterface42 AudioOutputInterface42