Qt 4.8
qaudioengine.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtMultimedia module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QAUDIOENGINE_H
43 #define QAUDIOENGINE_H
44 
45 #include <QtCore/qglobal.h>
46 #include <QtMultimedia/qaudio.h>
47 #include <QtMultimedia/qaudioformat.h>
48 #include <QtMultimedia/qaudiodeviceinfo.h>
49 
51 
53 
54 QT_MODULE(Multimedia)
55 
57 {
58  Q_OBJECT
59 
60 public:
61  virtual QAudioFormat preferredFormat() const = 0;
62  virtual bool isFormatSupported(const QAudioFormat &format) const = 0;
63  virtual QAudioFormat nearestFormat(const QAudioFormat &format) const = 0;
64  virtual QString deviceName() const = 0;
65  virtual QStringList codecList() = 0;
66  virtual QList<int> frequencyList() = 0;
67  virtual QList<int> channelsList() = 0;
68  virtual QList<int> sampleSizeList() = 0;
69  virtual QList<QAudioFormat::Endian> byteOrderList() = 0;
70  virtual QList<QAudioFormat::SampleType> sampleTypeList() = 0;
71 };
72 
74 {
75  Q_OBJECT
76 
77 public:
78  virtual QIODevice* start(QIODevice* device) = 0;
79  virtual void stop() = 0;
80  virtual void reset() = 0;
81  virtual void suspend() = 0;
82  virtual void resume() = 0;
83  virtual int bytesFree() const = 0;
84  virtual int periodSize() const = 0;
85  virtual void setBufferSize(int value) = 0;
86  virtual int bufferSize() const = 0;
87  virtual void setNotifyInterval(int milliSeconds) = 0;
88  virtual int notifyInterval() const = 0;
89  virtual qint64 processedUSecs() const = 0;
90  virtual qint64 elapsedUSecs() const = 0;
91  virtual QAudio::Error error() const = 0;
92  virtual QAudio::State state() const = 0;
93  virtual QAudioFormat format() const = 0;
94 
95 Q_SIGNALS:
96  void stateChanged(QAudio::State);
97  void notify();
98 };
99 
101 {
102  Q_OBJECT
103 
104 public:
105  virtual QIODevice* start(QIODevice* device) = 0;
106  virtual void stop() = 0;
107  virtual void reset() = 0;
108  virtual void suspend() = 0;
109  virtual void resume() = 0;
110  virtual int bytesReady() const = 0;
111  virtual int periodSize() const = 0;
112  virtual void setBufferSize(int value) = 0;
113  virtual int bufferSize() const = 0;
114  virtual void setNotifyInterval(int milliSeconds) = 0;
115  virtual int notifyInterval() const = 0;
116  virtual qint64 processedUSecs() const = 0;
117  virtual qint64 elapsedUSecs() const = 0;
118  virtual QAudio::Error error() const = 0;
119  virtual QAudio::State state() const = 0;
120  virtual QAudioFormat format() const = 0;
121 
122 Q_SIGNALS:
123  void stateChanged(QAudio::State);
124  void notify();
125 };
126 
128 
130 
131 #endif // QAUDIOENGINE_H
Error
Definition: qaudio.h:58
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
#define QT_MODULE(x)
Definition: qglobal.h:2783
#define QT_BEGIN_HEADER
Definition: qglobal.h:136
#define error(msg)
Q_CORE_EXPORT QTextStream & reset(QTextStream &s)
The QAbstractAudioOutput class provides access for QAudioOutput to access the audio device provided b...
Definition: qaudioengine.h:73
The QString class provides a Unicode character string.
Definition: qstring.h:83
The QObject class is the base class of all Qt objects.
Definition: qobject.h:111
#define Q_SIGNALS
Definition: qobjectdefs.h:72
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
The QStringList class provides a list of strings.
Definition: qstringlist.h:66
__int64 qint64
Definition: qglobal.h:942
The QAbstractAudioInput class provides access for QAudioInput to access the audio device provided by ...
Definition: qaudioengine.h:100
#define Q_OBJECT
Definition: qobjectdefs.h:157
State
Definition: qaudio.h:59
The QAbstractAudioDeviceInfo class provides access for QAudioDeviceInfo to access the audio device pr...
Definition: qaudioengine.h:56
#define Q_MULTIMEDIA_EXPORT
Definition: qglobal.h:1456
The QAudioFormat class stores audio parameter information.
Definition: qaudioformat.h:60
#define class
The QIODevice class is the base interface class of all I/O devices in Qt.
Definition: qiodevice.h:66
#define QT_END_HEADER
Definition: qglobal.h:137