src/multimedia/audio/qaudioinput.cpp
changeset 19 fcece45ef507
parent 18 2f34d5167611
child 22 79de32ba3296
equal deleted inserted replaced
18:2f34d5167611 19:fcece45ef507
    93       format.setSampleSize(8);
    93       format.setSampleSize(8);
    94       format.setCodec("audio/pcm");
    94       format.setCodec("audio/pcm");
    95       format.setByteOrder(QAudioFormat::LittleEndian);
    95       format.setByteOrder(QAudioFormat::LittleEndian);
    96       format.setSampleType(QAudioFormat::UnSignedInt);
    96       format.setSampleType(QAudioFormat::UnSignedInt);
    97 
    97 
    98       if (QAudioDeviceInfo info(QAudioDeviceInfo::defaultInputDevice());
    98       QAudioDeviceInfo info = QAudioDeviceInfo::defaultInputDevice();
    99       if (!info.isFormatSupported(format)) {
    99       if (!info.isFormatSupported(format)) {
   100           qWarning()<<"default format not supported try to use nearest";
   100           qWarning()<<"default format not supported try to use nearest";
   101           format = info.nearestFormat(format);
   101           format = info.nearestFormat(format);
   102       }
   102       }
   103 
   103