Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QAudioInterface Class Reference
[QtBluetoothModule, QtMediaModule, QtPimModule, QtTelephonyModule]

The QAudioInterface class provides a way of managing access to the audio system. More...

    #include <QAudioInterface>

Inherits QObject.

Public Functions

Signals

Additional Inherited Members


Detailed Description

The QAudioInterface class provides a way of managing access to the audio system.

This class communicates with a server instance that is managing access to the audio system depending on domain.

A typical implementation follows:

    QAudioInput      *audio;
    QAudioInterface  *audiomgr;

    audio = new QAudioInput(this);
    audiomgr = new QAudioInterface("Media", this);
    audiomgr->setInput(audio);
    audiomgr->audioStart();

audioStarted() is emitted when audio is ready for read/write access audioStopped() is emitted when the server stops or pauses the instance

see signals audioStarted() and audioStopped()

See also QAudioStateConfiguration and QAudioStateInfo.


Member Function Documentation

QAudioInterface::QAudioInterface ( const QByteArray & domain, QObject * parent = 0 )

Construct a new QAudioInterface object with domain and parent

domain can be Media, RingTone or Phone

QAudioInterface::~QAudioInterface ()

Destroy this audio interface.

void QAudioInterface::audioStarted ()   [signal]

This signal is emitted when the instance is ready for access.

void QAudioInterface::audioStopped ()   [signal]

This signal is emitted when the instance has been stopped.

void QAudioInterface::setInput ( const QAudioInput & input )

Pass a pointer input for QAudioInput class to manage.

The class will call close() to detach from the audio device automatically and emit audioStopped() signal. The class will re-open the audio device when available again and emit audioStarted()

void QAudioInterface::setOutput ( const QAudioOutput & output )

Pass a pointer output for QAudioOutput class to manage.

void QAudioInterface::startAudio ()

Start the process of getting access to the audio system. started() is emitted when audio is ready for reading.

void QAudioInterface::stopAudio ()

Stop access to the audio system. stopped() is emitted when audio is stopped.


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3