|
Classified ads
|
opposite of audiosink. More...
#include <audiosource.h>


Public Slots | |
| void | processCapturedAudio () |
| void | inputStatusChanged (QAudio::State aState) |
Signals | |
| void | frameCaptured (const QByteArray &aFrame, quint32 aSeqNo) |
| void | audioMaxLevel (float aMaxVolume) |
Public Member Functions | |
| AudioSource (Model &aModel) | |
| ~AudioSource () | |
| quint32 | getCurrentSeqNo () const |
| void | stopCapturing () |
Protected Member Functions | |
| virtual qint64 | writeData (const char *data, qint64 maxSize) |
| virtual qint64 | readData (char *data, qint64 maxSize) |
| virtual bool | open (OpenMode mode) |
| virtual bool | isSequential () const |
| void | timerEvent (QTimerEvent *event) |
Private Attributes | |
| QAudioFormat | iFormat |
| QAudioInput * | iAudioInput |
| QByteArray | iAudioBuffer |
| quint32 | iSeqNo |
| bool | iNeedsToRun |
| Model & | iModel |
| int | iTimerId |
opposite of audiosink.
Class for capturing audio. This class provides 16-bit PCM digital audio in 8kHz sample rate in pieces of 480 samples, each exactly 60ms long. Output format is in floating point numbers in range [0,1].
| AudioSource::AudioSource | ( | Model & | aModel | ) |
Constructor.
| AudioSource::~AudioSource | ( | ) |
|
signal |
This is actually average audio volume, in range [0,1]
|
signal |
Emitted when complete audio frame is ready to be processed
| aFrame | is the audio data. Content of the byte array is floats in range [-1,1] |
| aSeqNo | sequence number of the captured frame, it will sequentially increase as time passes |
|
inline |
getter-method for next sequence number
|
slot |
Input status changed
|
inlineprotectedvirtual |
|
protectedvirtual |
method for opening QIODevice: sets the open mode that's about it.
|
slot |
Method called by timer every now and then that does processing of captured data
|
protectedvirtual |
From QIODevice: in current implementation this method does nothing, audio is processed internally and this QIODevice implementation does not allow reading.
| void AudioSource::stopCapturing | ( | ) |
method for stopping capture
|
protected |
From QObject. Used for forwarding audio from buffer.
|
protectedvirtual |
From QIODevice: method where audio data will be written from actual audio source: this class AudioSource inherits QIODevice and will offer itself as data sink of iAudioInput
| data | audio data |
| maxSize | max data size to be written |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
1.8.11