Commit 3108f02f35685bd57486e198277c600e09d98b13

[CRASH] audioinput and audiooutput examples crash when no devices are
available.

Task-number:QTBUG-7783
Reviewed-by:Justin McPherson
examples/multimedia/audioinput/audioinput.cpp
(3 / 0)
  
213213
214214 if(format.sampleSize() != 16) {
215215 qWarning()<<"audio device doesn't support 16 bit samples, example cannot run";
216 audioInput = 0;
217 button->setDisabled(true);
218 button2->setDisabled(true);
216219 return;
217220 }
218221
examples/multimedia/audiooutput/audiooutput.cpp
(3 / 0)
  
179179
180180 if(settings.sampleSize() != 16) {
181181 qWarning()<<"audio device doesn't support 16 bit samples, example cannot run";
182 button->setDisabled(true);
183 button2->setDisabled(true);
184 audioOutput = 0;
182185 return;
183186 }
184187

Comments

Add a new comment:

Login or create an account to post a comment

Add your comment