51 // |
51 // |
52 |
52 |
53 #ifndef QAUDIODEVICEINFO_SYMBIAN_P_H |
53 #ifndef QAUDIODEVICEINFO_SYMBIAN_P_H |
54 #define QAUDIODEVICEINFO_SYMBIAN_P_H |
54 #define QAUDIODEVICEINFO_SYMBIAN_P_H |
55 |
55 |
|
56 #include <QtCore/QMap> |
56 #include <QtMultimedia/qaudioengine.h> |
57 #include <QtMultimedia/qaudioengine.h> |
57 #include <sounddevice.h> |
58 #include <sounddevice.h> |
58 |
59 |
59 QT_BEGIN_NAMESPACE |
60 QT_BEGIN_NAMESPACE |
|
61 |
|
62 namespace SymbianAudio { |
|
63 class DevSoundWrapper; |
|
64 } |
60 |
65 |
61 class QAudioDeviceInfoInternal |
66 class QAudioDeviceInfoInternal |
62 : public QAbstractAudioDeviceInfo |
67 : public QAbstractAudioDeviceInfo |
63 { |
68 { |
64 Q_OBJECT |
69 Q_OBJECT |
80 QList<QAudioFormat::SampleType> sampleTypeList(); |
85 QList<QAudioFormat::SampleType> sampleTypeList(); |
81 static QByteArray defaultInputDevice(); |
86 static QByteArray defaultInputDevice(); |
82 static QByteArray defaultOutputDevice(); |
87 static QByteArray defaultOutputDevice(); |
83 static QList<QByteArray> availableDevices(QAudio::Mode); |
88 static QList<QByteArray> availableDevices(QAudio::Mode); |
84 |
89 |
|
90 private slots: |
|
91 void devsoundInitializeComplete(int err); |
|
92 |
85 private: |
93 private: |
86 void getSupportedFormats() const; |
94 void getSupportedFormats() const; |
87 |
95 |
88 private: |
96 private: |
89 QScopedPointer<CMMFDevSound> m_devsound; |
97 mutable bool m_initializing; |
|
98 int m_intializationResult; |
90 |
99 |
91 QString m_deviceName; |
100 QString m_deviceName; |
92 QAudio::Mode m_mode; |
101 QAudio::Mode m_mode; |
93 |
102 |
|
103 struct Capabilities |
|
104 { |
|
105 QList<int> m_frequencies; |
|
106 QList<int> m_channels; |
|
107 QList<int> m_sampleSizes; |
|
108 QList<QAudioFormat::Endian> m_byteOrders; |
|
109 QList<QAudioFormat::SampleType> m_sampleTypes; |
|
110 }; |
|
111 |
94 // Mutable to allow lazy initialization when called from const-qualified |
112 // Mutable to allow lazy initialization when called from const-qualified |
95 // public functions (isFormatSupported, nearestFormat) |
113 // public functions (isFormatSupported, nearestFormat) |
96 mutable bool m_updated; |
114 mutable bool m_updated; |
97 mutable QStringList m_codecs; |
115 mutable QMap<QString, Capabilities> m_capabilities; |
98 mutable QList<int> m_frequencies; |
116 mutable Capabilities m_unionCapabilities; |
99 mutable QList<int> m_channels; |
|
100 mutable QList<int> m_sampleSizes; |
|
101 mutable QList<QAudioFormat::Endian> m_byteOrders; |
|
102 mutable QList<QAudioFormat::SampleType> m_sampleTypes; |
|
103 }; |
117 }; |
104 |
118 |
105 QT_END_NAMESPACE |
119 QT_END_NAMESPACE |
106 |
120 |
107 #endif |
121 #endif |