Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

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

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/multimedia/audio/qaudiodevicefactory.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    6868QT_BEGIN_NAMESPACE
    6969
     70
     71#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
    7072Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
    7173        (QAudioEngineFactoryInterface_iid, QLatin1String("/audio"), Qt::CaseInsensitive))
    72 
     74#endif
    7375
    7476class QNullDeviceInfo : public QAbstractAudioDeviceInfo
     
    138140#endif
    139141#endif
     142#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
    140143    QFactoryLoader* l = loader();
    141144
     
    149152        delete plugin;
    150153    }
    151 
     154#endif
    152155    return devices;
    153156}
     
    155158QAudioDeviceInfo QAudioDeviceFactory::defaultInputDevice()
    156159{
     160#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
    157161    QAudioEngineFactoryInterface* plugin = qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(QLatin1String("default")));
    158162
     
    162166            return QAudioDeviceInfo(QLatin1String("default"), list.at(0), QAudio::AudioInput);
    163167    }
     168#endif
     169
    164170#ifndef QT_NO_AUDIO_BACKEND
    165171#if (defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(HAS_ALSA) || defined(Q_OS_SYMBIAN))
     
    172178QAudioDeviceInfo QAudioDeviceFactory::defaultOutputDevice()
    173179{
     180#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
    174181    QAudioEngineFactoryInterface* plugin = qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(QLatin1String("default")));
    175182
     
    179186            return QAudioDeviceInfo(QLatin1String("default"), list.at(0), QAudio::AudioOutput);
    180187    }
     188#endif
     189
    181190#ifndef QT_NO_AUDIO_BACKEND
    182191#if (defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(HAS_ALSA) || defined(Q_OS_SYMBIAN))
     
    197206#endif
    198207#endif
     208#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
    199209    QAudioEngineFactoryInterface* plugin =
    200210        qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(realm));
     
    202212    if (plugin)
    203213        rc = plugin->createDeviceInfo(handle, mode);
    204 
     214#endif
    205215    return rc == 0 ? new QNullDeviceInfo() : rc;
    206216}
     
    226236#endif
    227237#endif
     238#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
    228239    QAudioEngineFactoryInterface* plugin =
    229240        qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(deviceInfo.realm()));
     
    231242    if (plugin)
    232243        return plugin->createInput(deviceInfo.handle(), format);
    233 
     244#endif
    234245    return new QNullInputDevice();
    235246}
     
    245256#endif
    246257#endif
     258#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
    247259    QAudioEngineFactoryInterface* plugin =
    248260        qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(deviceInfo.realm()));
     
    250262    if (plugin)
    251263        return plugin->createOutput(deviceInfo.handle(), format);
    252 
     264#endif
    253265    return new QNullOutputDevice();
    254266}
Note: See TracChangeset for help on using the changeset viewer.