AudioOutput Class Reference

AudioOutput Class Reference

#include <Phonon/AudioOutput>

Class Description

Class for audio output to the soundcard.

Use this class to define the audio output.

Author
Matthias Kretz kretz.nosp@m.@kde.nosp@m..org
See also
Phonon::Ui::VolumeSlider

Definition at line 50 of file audiooutput.h.

+ Inheritance diagram for AudioOutput:

Public Slots

void setName (const QString &newName)
 
void setVolume (qreal newVolume)
 
void setVolumeDecibel (qreal newVolumeDecibel)
 
bool setOutputDevice (const Phonon::AudioOutputDevice &newAudioOutputDevice)
 
void setMuted (bool mute)
 
- Public Slots inherited from QObject
void deleteLater ()
 

Signals

void volumeChanged (qreal newVolume)
 This signal is emitted whenever the volume has changed. More...
 
void mutedChanged (bool)
 This signal is emitted when the muted property has changed. More...
 
void outputDeviceChanged (const Phonon::AudioOutputDevice &newAudioOutputDevice)
 This signal is emitted when the (hardware) device for the output has changed. More...
 
- Signals inherited from QObject
void destroyed (QObject *=0)
 

Public Member Functions

 AudioOutput (Phonon::Category category, QObject *parent=0)
 Creates a new AudioOutput that defines output to a physical device. More...
 
 AudioOutput (QObject *parent=0)
 
QString name () const
 
qreal volume () const
 
qreal volumeDecibel () const
 
Phonon::Category category () const
 Returns the category of this output. More...
 
AudioOutputDevice outputDevice () const
 
bool isMuted () const
 
- Public Member Functions inherited from AbstractAudioOutput
 ~AbstractAudioOutput ()
 
- Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=0)
 
virtual ~QObject ()
 
virtual bool event (QEvent *)
 
virtual bool eventFilter (QObject *, QEvent *)
 
QString objectName () const
 
void setObjectName (const QString &name)
 
bool isWidgetType () const
 
bool signalsBlocked () const
 
bool blockSignals (bool b)
 
QThreadthread () const
 
void moveToThread (QThread *thread)
 
int startTimer (int interval)
 
void killTimer (int id)
 
template<typename T >
findChild (const QString &aName=QString()) const
 
template<typename T >
QList< T > findChildren (const QString &aName=QString()) const
 
template<typename T >
QList< T > findChildren (const QRegExp &re) const
 
const QObjectListchildren () const
 
void setParent (QObject *)
 
void installEventFilter (QObject *)
 
void removeEventFilter (QObject *)
 
bool connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=0, const QObject *receiver=0, const char *member=0)
 
bool disconnect (const QObject *receiver, const char *member=0)
 
void dumpObjectTree ()
 
void dumpObjectInfo ()
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const
 
QList< QByteArraydynamicPropertyNames () const
 
void setUserData (uint id, QObjectUserData *data)
 
QObjectUserDatauserData (uint id) const
 
QObjectparent () const
 
bool inherits (const char *classname) const
 
- Public Member Functions inherited from MediaNode
virtual ~MediaNode ()
 
bool isValid () const
 Tells whether the backend provides an implementation of this class. More...
 
QList< PathinputPaths () const
 
QList< PathoutputPaths () const
 

Properties

QString name
 This is the name that appears in Mixer applications that control the volume of this output. More...
 
qreal volume
 This is the current loudness of the output (it is using Stevens' law to calculate the change in voltage internally). More...
 
qreal volumeDecibel
 This is the current volume of the output in decibel. More...
 
AudioOutputDevice outputDevice
 This property holds the (hardware) destination for the output. More...
 
bool muted
 This property tells whether the output is muted. More...
 
- Properties inherited from QObject
QString objectName
 

Friends

class FactoryPrivate
 
class ::AudioOutputAdaptor
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
static bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 
static bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static uint registerUserData ()
 
- Protected Member Functions inherited from AbstractAudioOutput
 AbstractAudioOutput (AbstractAudioOutputPrivate &dd, QObject *parent)
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 
virtual void timerEvent (QTimerEvent *)
 
virtual void childEvent (QChildEvent *)
 
virtual void customEvent (QEvent *)
 
virtual void connectNotify (const char *signal)
 
virtual void disconnectNotify (const char *signal)
 
 QObject (QObjectPrivate &dd, QObject *parent=0)
 
- Protected Member Functions inherited from MediaNode
 MediaNode (MediaNodePrivate &dd)
 
- Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr
 
- Protected Attributes inherited from MediaNode
MediaNodePrivate *const k_ptr
 
- Static Protected Attributes inherited from QObject
static const QMetaObject staticQtMetaObject
 

Constructor & Destructor Documentation

AudioOutput ( Phonon::Category  category,
QObject parent = 0 
)
explicit

Creates a new AudioOutput that defines output to a physical device.

Parameters
categoryThe category can be used by mixer applications to group volume controls of applications into categories. That makes it easier for the user to identify the programs. The category is also used for the default output device that is configured centrally. As an example: often users want to have the audio signal of a VoIP application go to their USB headset while all other sounds should go to the internal soundcard.
parentQObject parent
See also
Phonon::categoryToString
outputDevice
AudioOutput ( QObject parent = 0)
explicit

Member Function Documentation

QString name ( ) const
qreal volume ( ) const
qreal volumeDecibel ( ) const
Phonon::Category category ( ) const

Returns the category of this output.

See also
AudioOutput(Phonon::Category, QObject *)
AudioOutputDevice outputDevice ( ) const
bool isMuted ( ) const
void setName ( const QString newName)
slot
void setVolume ( qreal  newVolume)
slot
void setVolumeDecibel ( qreal  newVolumeDecibel)
slot
bool setOutputDevice ( const Phonon::AudioOutputDevice newAudioOutputDevice)
slot
void setMuted ( bool  mute)
slot
void volumeChanged ( qreal  newVolume)
signal

This signal is emitted whenever the volume has changed.

As the volume can change without a call to setVolume (calls over dbus) this is important to keep a widget showing the current volume up to date.

void mutedChanged ( bool  )
signal

This signal is emitted when the muted property has changed.

As this property can change by IPC (DBus) calls a UI element showing the muted property should listen to this signal.

void outputDeviceChanged ( const Phonon::AudioOutputDevice newAudioOutputDevice)
signal

This signal is emitted when the (hardware) device for the output has changed.

The change can happen either through setOutputDevice or if the global configuration for the used category has changed.

See also
outputDevice

Friends And Related Function Documentation

friend class FactoryPrivate
friend

Definition at line 52 of file audiooutput.h.

friend class ::AudioOutputAdaptor
friend

Definition at line 53 of file audiooutput.h.

Property Documentation

QString name
readwrite

This is the name that appears in Mixer applications that control the volume of this output.

See also
category

Definition at line 62 of file audiooutput.h.

qreal volume
readwrite

This is the current loudness of the output (it is using Stevens' law to calculate the change in voltage internally).

See also
volumeDecibel

Definition at line 69 of file audiooutput.h.

qreal volumeDecibel
readwrite

This is the current volume of the output in decibel.

0 dB means no change in volume, -6dB means an attenuation of the voltage to 50% and an attenuation of the power to 25%, -inf dB means silence.

See also
volume

Definition at line 79 of file audiooutput.h.

AudioOutputDevice outputDevice
readwrite

This property holds the (hardware) destination for the output.

The default device is determined by the category and the global configuration for that category of outputs. Normally you don't need to override this setting - letting the user change the global configuration is the right choice. You can still override the device though, if you have good reasons to do so.

See also
outputDeviceChanged

Definition at line 91 of file audiooutput.h.

bool muted
readwrite

This property tells whether the output is muted.

Muting the output has the same effect as calling setVolume(0.0).

Definition at line 98 of file audiooutput.h.


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