source: trunk/src/multimedia/audio/qaudioengine.h

Last change on this file was 846, checked in by Dmitry A. Kuminov, 14 years ago

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

  • Property svn:eol-style set to native
File size: 4.5 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4** All rights reserved.
5** Contact: Nokia Corporation ([email protected])
6**
7** This file is part of the QtMultimedia module of the Qt Toolkit.
8**
9** $QT_BEGIN_LICENSE:LGPL$
10** Commercial Usage
11** Licensees holding valid Qt Commercial licenses may use this file in
12** accordance with the Qt Commercial License Agreement provided with the
13** Software or, alternatively, in accordance with the terms contained in
14** a written agreement between you and Nokia.
15**
16** GNU Lesser General Public License Usage
17** Alternatively, this file may be used under the terms of the GNU Lesser
18** General Public License version 2.1 as published by the Free Software
19** Foundation and appearing in the file LICENSE.LGPL included in the
20** packaging of this file. Please review the following information to
21** ensure the GNU Lesser General Public License version 2.1 requirements
22** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
23**
24** In addition, as a special exception, Nokia gives you certain additional
25** rights. These rights are described in the Nokia Qt LGPL Exception
26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
27**
28** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you have questions regarding the use of this file, please contact
37** Nokia at [email protected].
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
50QT_BEGIN_HEADER
51
52QT_BEGIN_NAMESPACE
53
54QT_MODULE(Multimedia)
55
56class Q_MULTIMEDIA_EXPORT QAbstractAudioDeviceInfo : public QObject
57{
58 Q_OBJECT
59
60public:
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
73class Q_MULTIMEDIA_EXPORT QAbstractAudioOutput : public QObject
74{
75 Q_OBJECT
76
77public:
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
95Q_SIGNALS:
96 void stateChanged(QAudio::State);
97 void notify();
98};
99
100class Q_MULTIMEDIA_EXPORT QAbstractAudioInput : public QObject
101{
102 Q_OBJECT
103
104public:
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
122Q_SIGNALS:
123 void stateChanged(QAudio::State);
124 void notify();
125};
126
127QT_END_NAMESPACE
128
129QT_END_HEADER
130
131#endif // QAUDIOENGINE_H
Note: See TracBrowser for help on using the repository browser.