Mercurial > hg > libxtract
diff src/scalar.c @ 115:6c5ece9cba3a
- Added to pd example the ability to differentiate between different
argv types (XTRACT_FLOAT, XTRACT_INT) and pass the correct data type
to the xtract[]() function
- Added xtract_flatness_db() details to descriptors.c
- Fixes to tonality and xtract_subbands descriptors
- Added Pd examples for 'subband mean' and tonality calculated using subbands
author | Jamie Bullock <jamie@postlude.co.uk> |
---|---|
date | Sat, 16 Feb 2008 20:13:05 +0000 |
parents | 72a9a393d5bd |
children | 2b2d0609e44f |
line wrap: on
line diff
--- a/src/scalar.c Fri Feb 15 15:49:49 2008 +0000 +++ b/src/scalar.c Sat Feb 16 20:13:05 2008 +0000 @@ -535,14 +535,14 @@ int xtract_flatness_db(const float *data, const int N, const void *argv, float *result){ - float flatness_db; + float flatness; - flatness_db = *(float *)argv; + flatness = *(float *)argv; - if (flatness_db <= 0) - flatness_db = XTRACT_LOG_LIMIT; + if (flatness <= 0) + flatness = XTRACT_LOG_LIMIT; - *result = 10 * log10f(flatness_db); + *result = 10 * log10f(flatness); return XTRACT_SUCCESS;