summaryrefslogtreecommitdiffstats
path: root/libaf/af_tools.c
diff options
context:
space:
mode:
Diffstat (limited to 'libaf/af_tools.c')
-rw-r--r--libaf/af_tools.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/libaf/af_tools.c b/libaf/af_tools.c
index 556429f4d9..82e0940fb2 100644
--- a/libaf/af_tools.c
+++ b/libaf/af_tools.c
@@ -17,16 +17,16 @@
*/
#include <math.h>
-#include <string.h>
+#include <string.h>
#include "af.h"
/* Convert to gain value from dB. Returns AF_OK if of and AF_ERROR if
fail */
int af_from_dB(int n, float* in, float* out, float k, float mi, float ma)
{
- int i = 0;
+ int i = 0;
// Sanity check
- if(!in || !out)
+ if(!in || !out)
return AF_ERROR;
for(i=0;i<n;i++){
@@ -42,9 +42,9 @@ int af_from_dB(int n, float* in, float* out, float k, float mi, float ma)
fail */
int af_to_dB(int n, float* in, float* out, float k)
{
- int i = 0;
+ int i = 0;
// Sanity check
- if(!in || !out)
+ if(!in || !out)
return AF_ERROR;
for(i=0;i<n;i++){
@@ -59,9 +59,9 @@ int af_to_dB(int n, float* in, float* out, float k)
/* Convert from ms to sample time */
int af_from_ms(int n, float* in, int* out, int rate, float mi, float ma)
{
- int i = 0;
+ int i = 0;
// Sanity check
- if(!in || !out)
+ if(!in || !out)
return AF_ERROR;
for(i=0;i<n;i++)
@@ -73,21 +73,21 @@ int af_from_ms(int n, float* in, int* out, int rate, float mi, float ma)
/* Convert from sample time to ms */
int af_to_ms(int n, int* in, float* out, int rate)
{
- int i = 0;
+ int i = 0;
// Sanity check
- if(!in || !out || !rate)
+ if(!in || !out || !rate)
return AF_ERROR;
for(i=0;i<n;i++)
out[i]=1000.0 * (float)in[i]/((float)rate);
-
+
return AF_OK;
}
/* Helper function for testing the output format */
int af_test_output(struct af_instance_s* af, af_data_t* out)
{
- if((af->data->format != out->format) ||
+ if((af->data->format != out->format) ||
(af->data->bps != out->bps) ||
(af->data->rate != out->rate) ||
(af->data->nch != out->nch)){