53 #ifndef QAUDIOOUTPUTALSA_H 54 #define QAUDIOOUTPUTALSA_H 56 #include <alsa/asoundlib.h> 58 #include <QtCore/qfile.h> 59 #include <QtCore/qdebug.h> 60 #include <QtCore/qtimer.h> 61 #include <QtCore/qstring.h> 62 #include <QtCore/qstringlist.h> 63 #include <QtCore/qelapsedtimer.h> 64 #include <QtCore/qdatetime.h> 66 #include <QtMultimedia/qaudio.h> 67 #include <QtMultimedia/qaudiodeviceinfo.h> 68 #include <QtMultimedia/qaudioengine.h>
qint64 write(const char *data, qint64 len)
snd_async_handler_t * ahandler
#define QT_END_NAMESPACE
This macro expands to.
QAudioOutputPrivate * audioDevice
QAudio::State state() const
Returns the state of audio processing.
The QByteArray class provides an array of bytes.
void resume()
Resumes processing audio data after a suspend()
The QAbstractAudioOutput class provides access for QAudioOutput to access the audio device provided b...
static void async_callback(snd_async_handler_t *ahandler)
QAudio::State deviceState
friend class OutputPrivate
The QElapsedTimer class provides a fast way to calculate elapsed times.
QAudio::Error error() const
Returns the error state.
void reset()
Drops all audio data in the buffers, resets buffers to zero.
void setBufferSize(int value)
Sets the audio buffer size to value in bytes.
#define QT_BEGIN_NAMESPACE
This macro expands to.
QAudioOutputPrivate(const QByteArray &device, const QAudioFormat &audioFormat)
int notifyInterval() const
Returns the notify interval in milliseconds.
snd_pcm_hw_params_t * hwparams
int xrun_recovery(int err)
static const char * data(const QByteArray &arr)
qint64 elapsedUSecs() const
Returns the milliseconds since start() was called, including time in Idle and suspend states...
qint64 processedUSecs() const
Returns the amount of audio data processed since start() was called in milliseconds.
void suspend()
Stops processing audio data, preserving buffered audio data.
int periodSize() const
Returns the period size in bytes.
snd_timestamp_t * timestamp
QAudioFormat format() const
Returns the QAudioFormat being used.
int bytesFree() const
Returns the free space available in bytes in the audio buffer.
void setNotifyInterval(int milliSeconds)
Sets the interval for notify() signal to be emitted.
snd_pcm_uframes_t period_frames
snd_pcm_format_t pcmformat
int bufferSize() const
Returns the audio buffer size in bytes.
QIODevice * start(QIODevice *device=0)
Uses the device as the QIODevice to transfer data.
void stop()
Stops the audio output.
The QTimer class provides repetitive and single-shot timers.
The QIODevice class is the base interface class of all I/O devices in Qt.
snd_pcm_uframes_t buffer_frames