diff framework/MainWindowBase.cpp @ 736:4b58b8f44be7

If a file that looks like audio can't be opened as audio, fail immediately - don't go trying to open .wav files or whatever as sessions or annotations. That only means the error shown to the user is less helpful.
author Chris Cannam
date Wed, 05 Feb 2020 10:45:03 +0000
parents de7969894402
children 48001ed9143b 7b1d30af4b38
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp	Fri Jan 24 15:12:09 2020 +0000
+++ b/framework/MainWindowBase.cpp	Wed Feb 05 10:45:03 2020 +0000
@@ -1509,8 +1509,8 @@
             }
         }
 
-        if (audio && (status = openAudio(source, mode)) != FileOpenFailed) {
-            return status;
+        if (audio) {
+            return openAudio(source, mode);
         } else if ((status = openSession(source)) != FileOpenFailed) {
             return status;
         } else if ((status = openPlaylist(source, mode)) != FileOpenFailed) {