The QAbstractAudioOutput class is a base class for audio backends. 更多...
| 頭: | #include <QAbstractAudioOutput> |
| qmake: | QT += multimedia |
| 繼承: | QObject |
| virtual int | bufferSize () const = 0 |
| virtual int | bytesFree () const = 0 |
| virtual QString | category () const |
| virtual qint64 | elapsedUSecs () const = 0 |
| virtual QAudio::Error | error () const = 0 |
| virtual QAudioFormat | format () const = 0 |
| virtual int | notifyInterval () const = 0 |
| virtual int | periodSize () const = 0 |
| virtual qint64 | processedUSecs () const = 0 |
| virtual void | reset () = 0 |
| virtual void | resume () = 0 |
| virtual void | setBufferSize (int value ) = 0 |
| virtual void | setCategory ( const QString & ) |
| virtual void | setFormat (const QAudioFormat & fmt ) = 0 |
| virtual void | setNotifyInterval (int ms ) = 0 |
| virtual void | setVolume (qreal volume ) |
| virtual void | start (QIODevice * device ) = 0 |
| virtual QIODevice * | start () = 0 |
| virtual QAudio::State | state () const = 0 |
| virtual void | stop () = 0 |
| virtual void | suspend () = 0 |
| virtual qreal | volume () const |
| void | errorChanged (QAudio::Error error ) |
| void | notify () |
| void | stateChanged (QAudio::State state ) |
| const QMetaObject | staticMetaObject |
The QAbstractAudioOutput class is a base class for audio backends.
QAbstractAudioOutput implements audio functionality for QAudioOutput ,即: QAudioOutput routes function calls to QAbstractAudioOutput . For a description of the functionality that is implemented, see the QAudioOutput class and function descriptions.
另請參閱 QAudioOutput .
[pure virtual]
int
QAbstractAudioOutput::
bufferSize
() const
Returns the audio buffer size in bytes.
另請參閱 setBufferSize ().
[pure virtual]
int
QAbstractAudioOutput::
bytesFree
() const
Returns the free space available in bytes in the audio buffer.
[虛擬]
QString
QAbstractAudioOutput::
category
() const
另請參閱 setCategory ().
[pure virtual]
qint64
QAbstractAudioOutput::
elapsedUSecs
() const
Returns the milliseconds since start () was called, including time in Idle and suspend states.
[pure virtual]
QAudio::Error
QAbstractAudioOutput::
error
() const
返迴錯誤狀態。
[signal]
void
QAbstractAudioOutput::
errorChanged
(
QAudio::Error
error
)
此信號發射,當 error state has changed.
[pure virtual]
QAudioFormat
QAbstractAudioOutput::
format
() const
返迴 QAudioFormat 被使用。
另請參閱 setFormat ().
[signal]
void
QAbstractAudioOutput::
notify
()
This signal is emitted when x ms of audio data has been processed the interval set by setNotifyInterval (x).
[pure virtual]
int
QAbstractAudioOutput::
notifyInterval
() const
返迴通知間隔 (以毫秒為單位)。
另請參閱 setNotifyInterval ().
[pure virtual]
int
QAbstractAudioOutput::
periodSize
() const
Returns the period size in bytes.
[pure virtual]
qint64
QAbstractAudioOutput::
processedUSecs
() const
Returns the amount of audio data processed since start () was called in milliseconds.
[pure virtual]
void
QAbstractAudioOutput::
reset
()
Drops all audio data in the buffers, resets buffers to zero.
[pure virtual]
void
QAbstractAudioOutput::
resume
()
再繼續處理音頻數據後於 suspend ()
[pure virtual]
void
QAbstractAudioOutput::
setBufferSize
(
int
value
)
Sets the audio buffer size to value in bytes.
另請參閱 bufferSize ().
[虛擬]
void
QAbstractAudioOutput::
setCategory
(
const QString &
)
另請參閱 category ().
[pure virtual]
void
QAbstractAudioOutput::
setFormat
(const
QAudioFormat
&
fmt
)
設置 QAudioFormat to use to fmt . Setting the format is only allowable while in QAudio::StoppedState .
另請參閱 format ().
[pure virtual]
void
QAbstractAudioOutput::
setNotifyInterval
(
int
ms
)
Sets the interval for notify () signal to be emitted. This is based on the ms of audio data processed not on actual real-time. The resolution of the timer is platform specific.
另請參閱 notifyInterval ().
[虛擬]
void
QAbstractAudioOutput::
setVolume
(
qreal
volume
)
Sets the volume. Where volume is between 0.0 and 1.0.
另請參閱 volume ().
[pure virtual]
void
QAbstractAudioOutput::
start
(
QIODevice
*
device
)
使用 device 作為 QIODevice to transfer data.
[pure virtual]
QIODevice
*QAbstractAudioOutput::
start
()
返迴指針指嚮 QIODevice being used to handle the data transfer. This QIODevice can be used to write() audio data directly.
[pure virtual]
QAudio::State
QAbstractAudioOutput::
state
() const
返迴音頻處理的狀態。
[signal]
void
QAbstractAudioOutput::
stateChanged
(
QAudio::State
state
)
此信號被發射當設備 state 已改變。
[pure virtual]
void
QAbstractAudioOutput::
stop
()
Stops the audio output.
[pure virtual]
void
QAbstractAudioOutput::
suspend
()
Stops processing audio data, preserving buffered audio data.
[虛擬]
qreal
QAbstractAudioOutput::
volume
() const
Returns the volume in the range 0.0 and 1.0.
另請參閱 setVolume ().