Remove an unneeded parameter from the resampler
This commit is contained in:
parent
68faef5b84
commit
41b2c2f3bb
@ -323,7 +323,7 @@ ALvoid MixSource(ALsource *Source, ALCdevice *Device, ALuint SamplesToDo)
|
|||||||
|
|
||||||
/* Now resample, then filter and mix to the appropriate outputs. */
|
/* Now resample, then filter and mix to the appropriate outputs. */
|
||||||
Source->Params.Resample(&SrcData[BufferPrePadding], DataPosFrac,
|
Source->Params.Resample(&SrcData[BufferPrePadding], DataPosFrac,
|
||||||
increment, 1, ResampledData, DstBufferSize);
|
increment, ResampledData, DstBufferSize);
|
||||||
|
|
||||||
{
|
{
|
||||||
DirectParams *directparms = &Source->Params.Direct;
|
DirectParams *directparms = &Source->Params.Direct;
|
||||||
|
@ -6,27 +6,23 @@
|
|||||||
#include "alAuxEffectSlot.h"
|
#include "alAuxEffectSlot.h"
|
||||||
|
|
||||||
|
|
||||||
static __inline ALfloat point32(const ALfloat *vals, ALint step, ALint frac)
|
static __inline ALfloat point32(const ALfloat *vals, ALint frac)
|
||||||
{ return vals[0]; (void)step; (void)frac; }
|
{ return vals[0]; (void)frac; }
|
||||||
static __inline ALfloat lerp32(const ALfloat *vals, ALint step, ALint frac)
|
static __inline ALfloat lerp32(const ALfloat *vals, ALint frac)
|
||||||
{ return lerp(vals[0], vals[step], frac * (1.0f/FRACTIONONE)); }
|
{ return lerp(vals[0], vals[1], frac * (1.0f/FRACTIONONE)); }
|
||||||
static __inline ALfloat cubic32(const ALfloat *vals, ALint step, ALint frac)
|
static __inline ALfloat cubic32(const ALfloat *vals, ALint frac)
|
||||||
{ return cubic(vals[-step], vals[0], vals[step], vals[step+step],
|
{ return cubic(vals[-1], vals[0], vals[1], vals[2], frac * (1.0f/FRACTIONONE)); }
|
||||||
frac * (1.0f/FRACTIONONE)); }
|
|
||||||
|
|
||||||
#define DECL_TEMPLATE(Sampler) \
|
#define DECL_TEMPLATE(Sampler) \
|
||||||
void Resample_##Sampler##_C(const ALfloat *data, ALuint frac, \
|
void Resample_##Sampler##_C(const ALfloat *data, ALuint frac, \
|
||||||
ALuint increment, ALuint NumChannels, ALfloat *RESTRICT OutBuffer, \
|
ALuint increment, ALfloat *RESTRICT OutBuffer, ALuint BufferSize) \
|
||||||
ALuint BufferSize) \
|
|
||||||
{ \
|
{ \
|
||||||
ALuint pos = 0; \
|
ALuint pos = 0; \
|
||||||
ALfloat value; \
|
|
||||||
ALuint i; \
|
ALuint i; \
|
||||||
\
|
\
|
||||||
for(i = 0;i < BufferSize+1;i++) \
|
for(i = 0;i < BufferSize+1;i++) \
|
||||||
{ \
|
{ \
|
||||||
value = Sampler(data + pos*NumChannels, NumChannels, frac); \
|
OutBuffer[i] = Sampler(data + pos, frac); \
|
||||||
OutBuffer[i] = value; \
|
|
||||||
\
|
\
|
||||||
frac += increment; \
|
frac += increment; \
|
||||||
pos += frac>>FRACTIONBITS; \
|
pos += frac>>FRACTIONBITS; \
|
||||||
|
@ -10,9 +10,9 @@ struct DirectParams;
|
|||||||
struct SendParams;
|
struct SendParams;
|
||||||
|
|
||||||
/* C resamplers */
|
/* C resamplers */
|
||||||
void Resample_point32_C(const ALfloat *src, ALuint frac, ALuint increment, ALuint NumChannels, ALfloat *RESTRICT dst, ALuint dstlen);
|
void Resample_point32_C(const ALfloat *src, ALuint frac, ALuint increment, ALfloat *RESTRICT dst, ALuint dstlen);
|
||||||
void Resample_lerp32_C(const ALfloat *src, ALuint frac, ALuint increment, ALuint NumChannels, ALfloat *RESTRICT dst, ALuint dstlen);
|
void Resample_lerp32_C(const ALfloat *src, ALuint frac, ALuint increment, ALfloat *RESTRICT dst, ALuint dstlen);
|
||||||
void Resample_cubic32_C(const ALfloat *src, ALuint frac, ALuint increment, ALuint NumChannels, ALfloat *RESTRICT dst, ALuint dstlen);
|
void Resample_cubic32_C(const ALfloat *src, ALuint frac, ALuint increment, ALfloat *RESTRICT dst, ALuint dstlen);
|
||||||
|
|
||||||
|
|
||||||
/* C mixers */
|
/* C mixers */
|
||||||
|
@ -80,8 +80,7 @@ struct ALbuffer;
|
|||||||
struct DirectParams;
|
struct DirectParams;
|
||||||
struct SendParams;
|
struct SendParams;
|
||||||
|
|
||||||
typedef void (*ResamplerFunc)(const ALfloat *src, ALuint frac,
|
typedef void (*ResamplerFunc)(const ALfloat *src, ALuint frac, ALuint increment,
|
||||||
ALuint increment, ALuint NumChannels,
|
|
||||||
ALfloat *RESTRICT dst, ALuint dstlen);
|
ALfloat *RESTRICT dst, ALuint dstlen);
|
||||||
|
|
||||||
typedef ALvoid (*DryMixerFunc)(struct ALsource *self, ALCdevice *Device,
|
typedef ALvoid (*DryMixerFunc)(struct ALsource *self, ALCdevice *Device,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user