changeset 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 fda54e91ca05
children 497d80d3b9c4
files framework/MainWindowBase.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
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) {