af: remove unused functions

This commit is contained in:
wm4
2015-04-01 21:39:40 +02:00
parent 4987c1906d
commit f5603cba23
2 changed files with 0 additions and 34 deletions

View File

@@ -159,9 +159,7 @@ double af_calc_delay(struct af_stream *s);
int af_test_output(struct af_instance *af, struct mp_audio *out);
int af_from_dB(int n, float *in, float *out, float k, float mi, float ma);
int af_to_dB(int n, float *in, float *out, float k);
int af_from_ms(int n, float *in, int *out, int rate, float mi, float ma);
int af_to_ms(int n, int *in, float *out, int rate);
float af_softclip(float a);
#endif /* MPLAYER_AF_H */

View File

@@ -40,24 +40,6 @@ int af_from_dB(int n, float* in, float* out, float k, float mi, float ma)
return AF_OK;
}
/* Convert from gain value to dB. Returns AF_OK if of and AF_ERROR if
* fail. gain=0 will become -200 dB. k is just a multiplier. */
int af_to_dB(int n, float* in, float* out, float k)
{
int i = 0;
// Sanity check
if(!in || !out)
return AF_ERROR;
for(i=0;i<n;i++){
if(in[i] == 0.0)
out[i]=-200.0;
else
out[i]=k*log10(in[i]);
}
return AF_OK;
}
/* Convert from ms to sample time */
int af_from_ms(int n, float* in, int* out, int rate, float mi, float ma)
{
@@ -72,20 +54,6 @@ int af_from_ms(int n, float* in, int* out, int rate, float mi, float ma)
return AF_OK;
}
/* Convert from sample time to ms */
int af_to_ms(int n, int* in, float* out, int rate)
{
int i = 0;
// Sanity check
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;
}
/*
* test if output format matches
* af: audio filter