diff --git a/src/multimedia/qqtaudiomanager.cpp b/src/multimedia/qqtaudiomanager.cpp index 5377a965..9ab848a7 100644 --- a/src/multimedia/qqtaudiomanager.cpp +++ b/src/multimedia/qqtaudiomanager.cpp @@ -41,6 +41,13 @@ void QQtAudioManager::startInput() { stopInput(); mInputManager = new QAudioInput ( mInputDeviceInfo, mInputAudioFormat, this ); + if ( QAudio::NoError != mInputManager->error() ) + { + pline() << mInputDeviceInfo.deviceName() << mInputAudioFormat.sampleSize() << mInputAudioFormat.sampleRate() << + mInputAudioFormat.channelCount() << "open failed, errcode:" << mInputManager->error(); + delete mInputManager; + return; + } mInputDevice = mInputManager->start(); connect ( mInputDevice, SIGNAL ( readyRead() ), this, SIGNAL ( readyRead() ) ); } @@ -76,6 +83,13 @@ void QQtAudioManager::startOutput() { stopOutput(); mOutputManager = new QAudioOutput ( mOutputDeviceInfo, mOutputAudioFormat, this ); + if ( QAudio::NoError != mOutputManager->error() ) + { + pline() << mOutputDeviceInfo.deviceName() << mOutputAudioFormat.sampleSize() << mOutputAudioFormat.sampleRate() << + mOutputAudioFormat.channelCount() << "open failed, errcode:" << mOutputManager->error(); + delete mOutputManager; + return; + } mOutputDevice = mOutputManager->start(); } diff --git a/test/voicetest/main.cpp b/test/voicetest/main.cpp index 2e54b246..cb603a08 100644 --- a/test/voicetest/main.cpp +++ b/test/voicetest/main.cpp @@ -9,7 +9,7 @@ int main ( int argc, char* argv[] ) MainWindow w; w.show(); - moveFull ( &w ); + w.showMaximized(); return a.exec(); }