examples/multimedia/audiodevices/audiodevices.cpp
branchRCL_3
changeset 4 3b1da2848fc7
parent 3 41300fa6a67c
equal deleted inserted replaced
3:41300fa6a67c 4:3b1da2848fc7
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the examples of the Qt Toolkit.
     7 ** This file is part of the examples of the Qt Toolkit.
     8 **
     8 **
   148     // device has changed
   148     // device has changed
   149     deviceInfo = deviceBox->itemData(idx).value<QAudioDeviceInfo>();
   149     deviceInfo = deviceBox->itemData(idx).value<QAudioDeviceInfo>();
   150 
   150 
   151     frequencyBox->clear();
   151     frequencyBox->clear();
   152     QList<int> freqz = deviceInfo.supportedFrequencies();
   152     QList<int> freqz = deviceInfo.supportedFrequencies();
   153     for (int i = 0; i < freqz.size(); ++i)
   153     for(int i = 0; i < freqz.size(); ++i)
   154         frequencyBox->addItem(QString("%1").arg(freqz.at(i)));
   154         frequencyBox->addItem(QString("%1").arg(freqz.at(i)));
   155     if (freqz.size())
   155     if(freqz.size())
   156         settings.setFrequency(freqz.at(0));
   156         settings.setFrequency(freqz.at(0));
   157 
   157 
   158     channelsBox->clear();
   158     channelsBox->clear();
   159     QList<int> chz = deviceInfo.supportedChannels();
   159     QList<int> chz = deviceInfo.supportedChannels();
   160     for (int i = 0; i < chz.size(); ++i)
   160     for(int i = 0; i < chz.size(); ++i)
   161         channelsBox->addItem(QString("%1").arg(chz.at(i)));
   161         channelsBox->addItem(QString("%1").arg(chz.at(i)));
   162     if (chz.size())
   162     if(chz.size())
   163         settings.setChannels(chz.at(0));
   163         settings.setChannels(chz.at(0));
   164 
   164 
   165     codecsBox->clear();
   165     codecsBox->clear();
   166     QStringList codecz = deviceInfo.supportedCodecs();
   166     QStringList codecz = deviceInfo.supportedCodecs();
   167     for (int i = 0; i < codecz.size(); ++i)
   167     for (int i = 0; i < codecz.size(); ++i)