PulseAudioQt::Device

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 ,
  UnknownState
}
 

Properties

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

Signals

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

Public Member Functions

quint32 activePortIndex () const
 
qint64 baseVolume () const
 
quint32 cardIndex () const
 
QString description () const
 
QString formFactor () const
 
virtual bool isDefault () const =0
 
bool isVirtualDevice () const
 
QList< Port * > ports () const
 
QVariantMap pulseProperties () const
 
 Q_ENUM (State)
 
virtual void setActivePortIndex (quint32 port_index)=0
 
virtual void setDefault (bool enable)=0
 
State state () const
 
virtual Q_INVOKABLE void switchStreams ()=0
 
- Public Member Functions inherited from PulseAudioQt::VolumeObject
QStringList channels () const
 
QList< 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 QList< 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 24 of file device.h.

Member Enumeration Documentation

◆ State

Enumerator
InvalidState 

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

RunningState 

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


IdleState 

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

SuspendedState 

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

Definition at line 39 of file device.h.

Property Documentation

◆ activePortIndex

quint32 PulseAudioQt::Device::activePortIndex
readwrite

Definition at line 32 of file device.h.

◆ baseVolume

qint64 PulseAudioQt::Device::baseVolume
read

Definition at line 34 of file device.h.

◆ cardIndex

quint32 PulseAudioQt::Device::cardIndex
read

Definition at line 30 of file device.h.

◆ default

bool PulseAudioQt::Device::default
readwrite

Definition at line 33 of file device.h.

◆ description

QString PulseAudioQt::Device::description
read

Definition at line 28 of file device.h.

◆ formFactor

QString PulseAudioQt::Device::formFactor
read

Definition at line 29 of file device.h.

◆ ports

QList<Port *> PulseAudioQt::Device::ports
read

Definition at line 31 of file device.h.

◆ pulseProperties

QVariantMap PulseAudioQt::Device::pulseProperties
read

Definition at line 35 of file device.h.

◆ state

State PulseAudioQt::Device::state
read

Definition at line 27 of file device.h.

◆ virtualDevice

bool PulseAudioQt::Device::virtualDevice
read

Definition at line 36 of file device.h.

Constructor & Destructor Documentation

◆ ~Device()

PulseAudioQt::Device::~Device ( )
override

Definition at line 84 of file device.cpp.

Member Function Documentation

◆ activePortIndex()

quint32 PulseAudioQt::Device::activePortIndex ( ) const

The currently active port, by index.

Definition at line 37 of file device.cpp.

◆ baseVolume()

qint64 PulseAudioQt::Device::baseVolume ( ) const

The base volume of this device, generally useful as a good default volume.

Definition at line 42 of file device.cpp.

◆ cardIndex()

quint32 PulseAudioQt::Device::cardIndex ( ) const

Index of the card that owns this device.

Definition at line 27 of file device.cpp.

◆ description()

QString PulseAudioQt::Device::description ( ) const

A human readable description of this device.

Definition at line 17 of file device.cpp.

◆ 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.

Definition at line 22 of file device.cpp.

◆ isDefault()

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

Whether this is the default device.

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

◆ isVirtualDevice()

bool PulseAudioQt::Device::isVirtualDevice ( ) const
Returns
true when the device is a virtual device (e.g. a software-only sink)

Definition at line 52 of file device.cpp.

◆ ports()

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

The ports associated with this device.

Definition at line 32 of file device.cpp.

◆ pulseProperties()

QVariantMap PulseAudioQt::Device::pulseProperties ( ) const
nodiscard
Returns
QVariantMap the pulseaudio properties of this device (e.g. media.class, device.api, ...)

Definition at line 47 of file device.cpp.

◆ 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()

Device::State PulseAudioQt::Device::state ( ) const

The state of this device.

Definition at line 12 of file device.cpp.

◆ switchStreams()

virtual Q_INVOKABLE void PulseAudioQt::Device::switchStreams ( )
pure virtual

Switch all streams onto this Device Iterates through all relevant streams for the Device type and assigns them to this Device.

For example for a Sink device all SinkInputs known to the daemon will be explicitly switched onto this Sink. Useful for mass-rerouting of streams from different devices onto a specific target device.

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


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:57:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.