Search for usage in LXR

PulseAudioQt::Device Class Referenceabstract

#include <device.h>

Inheritance diagram for PulseAudioQt::Device:

Public Types

enum  State {
  InvalidState = 0, RunningState, IdleState, SuspendedState,


quint32 activePortIndex
quint32 cardIndex
bool default
QString description
QString formFactor
QList< Port * > ports
State state
- Properties inherited from PulseAudioQt::VolumeObject
QVector< QStringchannels
QVector< qint64 > channelVolumes
bool muted
QStringList rawChannels
qint64 volume
bool volumeWritable


void activePortIndexChanged ()
void cardIndexChanged ()
void defaultChanged ()
void descriptionChanged ()
void formFactorChanged ()
void portsChanged ()
void stateChanged ()
- Signals inherited from PulseAudioQt::VolumeObject
void channelsChanged ()
void channelVolumesChanged ()
void isVolumeWritableChanged ()
void mutedChanged ()
void rawChannelsChanged ()
void volumeChanged ()

Public Member Functions

quint32 activePortIndex () const
quint32 cardIndex () const
QString description () const
QString formFactor () const
virtual bool isDefault () const =0
QList< Port * > ports () const
 Q_ENUM (State)
virtual void setActivePortIndex (quint32 port_index)=0
virtual void setDefault (bool enable)=0
State state () const
- Public Member Functions inherited from PulseAudioQt::VolumeObject
QVector< QStringchannels () const
QVector< qint64 > channelVolumes () const
bool isMuted () const
bool isVolumeWritable () const
QStringList rawChannels () const
virtual Q_INVOKABLE void setChannelVolume (int channel, qint64 volume)=0
virtual void setChannelVolumes (const QVector< qint64 > &channelVolumes)=0
virtual void setMuted (bool muted)=0
virtual void setVolume (qint64 volume)=0
qint64 volume () const

Detailed Description

A PulseAudio device.

Can be either a Sink or Source.

Definition at line 23 of file device.h.

Member Enumeration Documentation

◆ State


This state is used when the server does not support sink/source state introspection.


Running, sink/source is playing/recording and used by at least one non-corked sink-input/source-output.


When idle, the sink/source is playing/recording but there is no non-corked sink-input/source-output attached to it.


When suspended, actual sink/source access can be closed, for instance.

Definition at line 35 of file device.h.

Member Function Documentation

◆ activePortIndex()

quint32 PulseAudioQt::Device::activePortIndex ( ) const

The currently active port, by index.

◆ cardIndex()

quint32 PulseAudioQt::Device::cardIndex ( ) const

Index of the card that owns this device.

◆ description()

QString PulseAudioQt::Device::description ( ) const

A human readable description of this device.

◆ formFactor()

QString PulseAudioQt::Device::formFactor ( ) const

The device's form factor.

One of "internal", "speaker", "handset", "tv", "webcam", "microphone", "headset", "headphone", "hands-free", "car", "hifi", "computer", "portable". This is based on PA_PROP_DEVICE_FORM_FACTOR.

◆ isDefault()

virtual bool PulseAudioQt::Device::isDefault ( ) const
pure virtual

Whether this is the default device.

Implemented in PulseAudioQt::Sink, and PulseAudioQt::Source.

◆ ports()

QList<Port *> PulseAudioQt::Device::ports ( ) const

The ports associated with this device.

◆ setActivePortIndex()

virtual void PulseAudioQt::Device::setActivePortIndex ( quint32  port_index)
pure virtual

Set the currently active port, by index.

Implemented in PulseAudioQt::Sink, and PulseAudioQt::Source.

◆ setDefault()

virtual void PulseAudioQt::Device::setDefault ( bool  enable)
pure virtual

Set whether this is the default device.

Implemented in PulseAudioQt::Sink, and PulseAudioQt::Source.

◆ state()

State PulseAudioQt::Device::state ( ) const

The state of this device.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Sep 22 2023 04:02:10 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.