QAbstractAudioInput Class

The QAbstractAudioInput class provides access for QAudioInput 以访问由插件提供的音频设备。 更多...

头: #include <QAbstractAudioInput>
qmake: QT += multimedia
继承: QObject

公共函数

virtual int bufferSize () const = 0
virtual int bytesReady () const = 0
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 setFormat (const QAudioFormat & fmt ) = 0
virtual void setNotifyInterval (int ms ) = 0
virtual void setVolume ( qreal ) = 0
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 = 0

信号

void errorChanged (QAudio::Error error )
void notify ()
void stateChanged (QAudio::State state )

静态公共成员

const QMetaObject staticMetaObject

额外继承成员

详细描述

The QAbstractAudioInput class provides access for QAudioInput 以访问由插件提供的音频设备。

QAudioDeviceInput keeps an instance of QAbstractAudioInput and routes calls to functions of the same name to QAbstractAudioInput . This means that it is QAbstractAudioInput that implements the audio functionality. For a description of the functionality, see the QAudioInput class description.

另请参阅 QAudioInput .

成员函数文档编制

[pure virtual] int QAbstractAudioInput:: bufferSize () const

Returns the audio buffer size in milliseconds.

另请参阅 setBufferSize ().

[pure virtual] int QAbstractAudioInput:: bytesReady () const

Returns the amount of audio data available to read in bytes.

[pure virtual] qint64 QAbstractAudioInput:: elapsedUSecs () const

Returns the milliseconds since start () was called, including time in Idle and suspend states.

[pure virtual] QAudio::Error QAbstractAudioInput:: error () const

返回错误状态。

[signal] void QAbstractAudioInput:: errorChanged ( QAudio::Error error )

此信号发射当 error state has changed.

[pure virtual] QAudioFormat QAbstractAudioInput:: format () const

返回 QAudioFormat being used

另请参阅 setFormat ().

[signal] void QAbstractAudioInput:: notify ()

This signal is emitted when x ms of audio data has been processed the interval set by setNotifyInterval (x).

[pure virtual] int QAbstractAudioInput:: notifyInterval () const

Returns the notify interval in milliseconds.

另请参阅 setNotifyInterval ().

[pure virtual] int QAbstractAudioInput:: periodSize () const

Returns the period size in bytes.

[pure virtual] qint64 QAbstractAudioInput:: processedUSecs () const

Returns the amount of audio data processed since start () was called in milliseconds.

[pure virtual] void QAbstractAudioInput:: reset ()

Drops all audio data in the buffers, resets buffers to zero.

[pure virtual] void QAbstractAudioInput:: resume ()

Resumes processing audio data after a suspend ().

[pure virtual] void QAbstractAudioInput:: setBufferSize ( int value )

Sets the audio buffer size to value in milliseconds.

另请参阅 bufferSize ().

[pure virtual] void QAbstractAudioInput:: setFormat (const QAudioFormat & fmt )

设置 QAudioFormat to use to fmt . Setting the format is only allowable while in QAudio::StoppedState .

另请参阅 format ().

[pure virtual] void QAbstractAudioInput:: 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 ().

[pure virtual] void QAbstractAudioInput:: setVolume ( qreal )

另请参阅 volume ().

[pure virtual] void QAbstractAudioInput:: start ( QIODevice * device )

使用 device 作为 QIODevice to transfer data.

[pure virtual] QIODevice *QAbstractAudioInput:: start ()

返回指针指向 QIODevice being used to handle the data transfer. This QIODevice can be used to read() audio data directly.

[pure virtual] QAudio::State QAbstractAudioInput:: state () const

返回音频处理的状态。

[signal] void QAbstractAudioInput:: stateChanged ( QAudio::State state )

此信号被发射当设备 state 已改变。

[pure virtual] void QAbstractAudioInput:: stop ()

Stops the audio input.

[pure virtual] void QAbstractAudioInput:: suspend ()

Stops processing audio data, preserving buffered audio data.

[pure virtual] qreal QAbstractAudioInput:: volume () const

另请参阅 setVolume ().