Changeset 846 for trunk/src/multimedia/audio/qaudiodevicefactory.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/multimedia/audio/qaudiodevicefactory.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 68 68 QT_BEGIN_NAMESPACE 69 69 70 71 #if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS) 70 72 Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, 71 73 (QAudioEngineFactoryInterface_iid, QLatin1String("/audio"), Qt::CaseInsensitive)) 72 74 #endif 73 75 74 76 class QNullDeviceInfo : public QAbstractAudioDeviceInfo … … 138 140 #endif 139 141 #endif 142 #if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS) 140 143 QFactoryLoader* l = loader(); 141 144 … … 149 152 delete plugin; 150 153 } 151 154 #endif 152 155 return devices; 153 156 } … … 155 158 QAudioDeviceInfo QAudioDeviceFactory::defaultInputDevice() 156 159 { 160 #if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS) 157 161 QAudioEngineFactoryInterface* plugin = qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(QLatin1String("default"))); 158 162 … … 162 166 return QAudioDeviceInfo(QLatin1String("default"), list.at(0), QAudio::AudioInput); 163 167 } 168 #endif 169 164 170 #ifndef QT_NO_AUDIO_BACKEND 165 171 #if (defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(HAS_ALSA) || defined(Q_OS_SYMBIAN)) … … 172 178 QAudioDeviceInfo QAudioDeviceFactory::defaultOutputDevice() 173 179 { 180 #if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS) 174 181 QAudioEngineFactoryInterface* plugin = qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(QLatin1String("default"))); 175 182 … … 179 186 return QAudioDeviceInfo(QLatin1String("default"), list.at(0), QAudio::AudioOutput); 180 187 } 188 #endif 189 181 190 #ifndef QT_NO_AUDIO_BACKEND 182 191 #if (defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(HAS_ALSA) || defined(Q_OS_SYMBIAN)) … … 197 206 #endif 198 207 #endif 208 #if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS) 199 209 QAudioEngineFactoryInterface* plugin = 200 210 qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(realm)); … … 202 212 if (plugin) 203 213 rc = plugin->createDeviceInfo(handle, mode); 204 214 #endif 205 215 return rc == 0 ? new QNullDeviceInfo() : rc; 206 216 } … … 226 236 #endif 227 237 #endif 238 #if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS) 228 239 QAudioEngineFactoryInterface* plugin = 229 240 qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(deviceInfo.realm())); … … 231 242 if (plugin) 232 243 return plugin->createInput(deviceInfo.handle(), format); 233 244 #endif 234 245 return new QNullInputDevice(); 235 246 } … … 245 256 #endif 246 257 #endif 258 #if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS) 247 259 QAudioEngineFactoryInterface* plugin = 248 260 qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(deviceInfo.realm())); … … 250 262 if (plugin) 251 263 return plugin->createOutput(deviceInfo.handle(), format); 252 264 #endif 253 265 return new QNullOutputDevice(); 254 266 }
Note:
See TracChangeset
for help on using the changeset viewer.