Updated modplay, primarily st3play
This commit is contained in:
parent
ab7e5e6966
commit
c9bee1e7ae
4 changed files with 377 additions and 331 deletions
|
@ -1,6 +1,8 @@
|
||||||
#ifndef _B_ARRAY_H_
|
#ifndef _B_ARRAY_H_
|
||||||
#define _B_ARRAY_H_
|
#define _B_ARRAY_H_
|
||||||
|
|
||||||
|
#define BARRAY_DECORATE modplay
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#ifdef BARRAY_DECORATE
|
#ifdef BARRAY_DECORATE
|
||||||
|
|
|
@ -8,11 +8,13 @@
|
||||||
#endif
|
#endif
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#include <TargetConditionals.h>
|
#include <TargetConditionals.h>
|
||||||
#if TARGET_CPU_ARM
|
#if TARGET_CPU_ARM || TARGET_CPU_ARM64
|
||||||
#include <arm_neon.h>
|
|
||||||
#define RESAMPLER_NEON
|
#define RESAMPLER_NEON
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef RESAMPLER_NEON
|
||||||
|
#include <arm_neon.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#define ALIGNED _declspec(align(16))
|
#define ALIGNED _declspec(align(16))
|
||||||
|
@ -470,7 +472,7 @@ static int resampler_run_blep(resampler * r, float ** out_, float * out_end)
|
||||||
}
|
}
|
||||||
last_amp += sample;
|
last_amp += sample;
|
||||||
sample /= kernel_sum;
|
sample /= kernel_sum;
|
||||||
for (sample = 0, i = 0; i < SINC_WIDTH * 2; ++i)
|
for (i = 0; i < SINC_WIDTH * 2; ++i)
|
||||||
out[i] += sample * kernel[i];
|
out[i] += sample * kernel[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -626,8 +628,8 @@ static int resampler_run_blep(resampler * r, float ** out_, float * out_end)
|
||||||
{
|
{
|
||||||
temp1 = vld1q_f32( (const float32_t *)( kernel + i ) );
|
temp1 = vld1q_f32( (const float32_t *)( kernel + i ) );
|
||||||
temp2 = vld1q_f32( (const float32_t *) out + i * 4 );
|
temp2 = vld1q_f32( (const float32_t *) out + i * 4 );
|
||||||
temp1 = vmlaq_f32( temp2, temp1, samplex );
|
temp2 = vmlaq_f32( temp2, temp1, samplex );
|
||||||
vst1q_f32( (float32_t *) out + i * 4, temp1 );
|
vst1q_f32( (float32_t *) out + i * 4, temp2 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -743,7 +745,7 @@ static int resampler_run_blam(resampler * r, float ** out_, float * out_end)
|
||||||
}
|
}
|
||||||
last_amp += sample;
|
last_amp += sample;
|
||||||
sample /= kernel_sum;
|
sample /= kernel_sum;
|
||||||
for (sample = 0, i = 0; i < SINC_WIDTH * 2; ++i)
|
for (i = 0; i < SINC_WIDTH * 2; ++i)
|
||||||
out[i] += sample * kernel[i];
|
out[i] += sample * kernel[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -908,7 +910,7 @@ static int resampler_run_blam(resampler * r, float ** out_, float * out_end)
|
||||||
|
|
||||||
sample = in[0];
|
sample = in[0];
|
||||||
if (phase_inc < 1.0f)
|
if (phase_inc < 1.0f)
|
||||||
sample += (in[1] - in[0]) * fphase;
|
sample += (in[1] - in[0]) * phase;
|
||||||
sample -= last_amp;
|
sample -= last_amp;
|
||||||
|
|
||||||
if (sample)
|
if (sample)
|
||||||
|
@ -935,8 +937,8 @@ static int resampler_run_blam(resampler * r, float ** out_, float * out_end)
|
||||||
{
|
{
|
||||||
temp1 = vld1q_f32( (const float32_t *)( kernel + i ) );
|
temp1 = vld1q_f32( (const float32_t *)( kernel + i ) );
|
||||||
temp2 = vld1q_f32( (const float32_t *) out + i * 4 );
|
temp2 = vld1q_f32( (const float32_t *) out + i * 4 );
|
||||||
temp1 = vmlaq_f32( temp2, temp1, samplex );
|
temp2 = vmlaq_f32( temp2, temp1, samplex );
|
||||||
vst1q_f32( (float32_t *) out + i * 4, temp1 );
|
vst1q_f32( (float32_t *) out + i * 4, temp2 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef _RESAMPLER_H_
|
#ifndef _RESAMPLER_H_
|
||||||
#define _RESAMPLER_H_
|
#define _RESAMPLER_H_
|
||||||
|
|
||||||
|
#define RESAMPLER_DECORATE modplay
|
||||||
|
|
||||||
// Ugglay
|
// Ugglay
|
||||||
#ifdef RESAMPLER_DECORATE
|
#ifdef RESAMPLER_DECORATE
|
||||||
#define PASTE(a,b) a ## b
|
#define PASTE(a,b) a ## b
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue