Mercurial > hg > libxtract
changeset 208:d85e4b9aeb82
Set *result to note value in xtract_midicent(). Fixes bug.
author | Jamie Bullock <jamie@jamiebullock.com> |
---|---|
date | Tue, 11 Mar 2014 19:27:30 +0000 |
parents | 5357a64124f1 |
children | 2bd416a4a0de |
files | src/scalar.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/scalar.c Tue Mar 11 19:27:02 2014 +0000 +++ b/src/scalar.c Tue Mar 11 19:27:30 2014 +0000 @@ -987,7 +987,7 @@ { double f0 = *(double *)argv; double note = 0.0; - + note = 69 + log(f0 / 440.f) * 17.31234; note *= 100; note = round(note); @@ -997,6 +997,8 @@ return XTRACT_ARGUMENT_ERROR; } + *result = note; + return XTRACT_SUCCESS; }