Revision 1ea879e5 audio/rate_template.h
b/audio/rate_template.h | ||
---|---|---|
27 | 27 |
* Processed signed long samples from ibuf to obuf. |
28 | 28 |
* Return number of samples processed. |
29 | 29 |
*/ |
30 |
void NAME (void *opaque, st_sample_t *ibuf, st_sample_t *obuf,
|
|
30 |
void NAME (void *opaque, struct st_sample *ibuf, struct st_sample *obuf,
|
|
31 | 31 |
int *isamp, int *osamp) |
32 | 32 |
{ |
33 | 33 |
struct rate *rate = opaque; |
34 |
st_sample_t *istart, *iend;
|
|
35 |
st_sample_t *ostart, *oend;
|
|
36 |
st_sample_t ilast, icur, out;
|
|
34 |
struct st_sample *istart, *iend;
|
|
35 |
struct st_sample *ostart, *oend;
|
|
36 |
struct st_sample ilast, icur, out;
|
|
37 | 37 |
#ifdef FLOAT_MIXENG |
38 |
real_t t;
|
|
38 |
mixeng_real t;
|
|
39 | 39 |
#else |
40 | 40 |
int64_t t; |
41 | 41 |
#endif |
... | ... | |
84 | 84 |
#ifdef RECIPROCAL |
85 | 85 |
t = (rate->opos & UINT_MAX) * (1.f / UINT_MAX); |
86 | 86 |
#else |
87 |
t = (rate->opos & UINT_MAX) / (real_t) UINT_MAX;
|
|
87 |
t = (rate->opos & UINT_MAX) / (mixeng_real) UINT_MAX;
|
|
88 | 88 |
#endif |
89 | 89 |
out.l = (ilast.l * (1.0 - t)) + icur.l * t; |
90 | 90 |
out.r = (ilast.r * (1.0 - t)) + icur.r * t; |
Also available in: Unified diff