diff options
author | Jamie Bullock <jamie@jamiebullock.com> | 2014-03-11 20:18:10 +0000 |
---|---|---|
committer | Jamie Bullock <jamie@jamiebullock.com> | 2014-03-11 20:18:10 +0000 |
commit | f7da913ac4778e37b123154f9687667f5f50a2f1 (patch) | |
tree | defaa3e492473e6f6382e6e16c403886c929b85e /src | |
parent | 9e63d554127ef98d9155666cf4ce486193a5a539 (diff) | |
download | LibXtract-f7da913ac4778e37b123154f9687667f5f50a2f1.tar.gz LibXtract-f7da913ac4778e37b123154f9687667f5f50a2f1.tar.bz2 LibXtract-f7da913ac4778e37b123154f9687667f5f50a2f1.zip |
Set result value before return
Diffstat (limited to 'src')
-rw-r--r-- | src/scalar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/scalar.c b/src/scalar.c index 37ea579..ea798eb 100644 --- a/src/scalar.c +++ b/src/scalar.c @@ -991,14 +991,14 @@ int xtract_midicent(const double *data, const int N, const void *argv, double *r note = 69 + log(f0 / 440.f) * 17.31234; note *= 100; note = round(note); + + *result = note; if (note > 12700 || note < 0) { return XTRACT_ARGUMENT_ERROR; } - *result = note; - return XTRACT_SUCCESS; } |