summaryrefslogtreecommitdiff
path: root/libs/ardour/source.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-10-08 15:26:38 +0200
committerRobin Gareus <robin@gareus.org>2015-10-08 15:26:38 +0200
commit4e39f13991ecb4f29b7748810bb11c3fef244058 (patch)
tree9bbbd01b807dd612f9150d653682815adfc2e417 /libs/ardour/source.cc
parent4c26225ddc4c04365a694a77287ce3a812bc4935 (diff)
fix return value for transient load
Diffstat (limited to 'libs/ardour/source.cc')
-rw-r--r--libs/ardour/source.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/ardour/source.cc b/libs/ardour/source.cc
index c9d5bb243e..f6c591a5b1 100644
--- a/libs/ardour/source.cc
+++ b/libs/ardour/source.cc
@@ -187,6 +187,7 @@ Source::set_been_analysed (bool yn)
int
Source::load_transients (const string& path)
{
+ int rv = 0;
FILE *tf;
if (! (tf = g_fopen (path.c_str (), "rb"))) {
return -1;
@@ -196,6 +197,7 @@ Source::load_transients (const string& path)
while (!feof (tf) && !ferror(tf)) {
double val;
if (1 != fscanf (tf, "%lf", &val)) {
+ rv = -1;
break;
}
@@ -204,6 +206,7 @@ Source::load_transients (const string& path)
}
::fclose (tf);
+ return rv;
}
string