Updated modplay, primarily st3play

CQTexperiment
Chris Moeller 2015-06-02 00:35:19 -07:00
parent ab7e5e6966
commit c9bee1e7ae
4 changed files with 377 additions and 331 deletions

View File

@ -1,6 +1,8 @@
#ifndef _B_ARRAY_H_
#define _B_ARRAY_H_
#define BARRAY_DECORATE modplay
#include <stdlib.h>
#ifdef BARRAY_DECORATE

View File

@ -8,11 +8,13 @@
#endif
#ifdef __APPLE__
#include <TargetConditionals.h>
#if TARGET_CPU_ARM
#include <arm_neon.h>
#if TARGET_CPU_ARM || TARGET_CPU_ARM64
#define RESAMPLER_NEON
#endif
#endif
#ifdef RESAMPLER_NEON
#include <arm_neon.h>
#endif
#ifdef _MSC_VER
#define ALIGNED _declspec(align(16))
@ -470,7 +472,7 @@ static int resampler_run_blep(resampler * r, float ** out_, float * out_end)
}
last_amp += sample;
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];
}
@ -626,8 +628,8 @@ static int resampler_run_blep(resampler * r, float ** out_, float * out_end)
{
temp1 = vld1q_f32( (const float32_t *)( kernel + i ) );
temp2 = vld1q_f32( (const float32_t *) out + i * 4 );
temp1 = vmlaq_f32( temp2, temp1, samplex );
vst1q_f32( (float32_t *) out + i * 4, temp1 );
temp2 = vmlaq_f32( temp2, temp1, samplex );
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;
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];
}
@ -908,7 +910,7 @@ static int resampler_run_blam(resampler * r, float ** out_, float * out_end)
sample = in[0];
if (phase_inc < 1.0f)
sample += (in[1] - in[0]) * fphase;
sample += (in[1] - in[0]) * phase;
sample -= last_amp;
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 ) );
temp2 = vld1q_f32( (const float32_t *) out + i * 4 );
temp1 = vmlaq_f32( temp2, temp1, samplex );
vst1q_f32( (float32_t *) out + i * 4, temp1 );
temp2 = vmlaq_f32( temp2, temp1, samplex );
vst1q_f32( (float32_t *) out + i * 4, temp2 );
}
}

View File

@ -1,6 +1,8 @@
#ifndef _RESAMPLER_H_
#define _RESAMPLER_H_
#define RESAMPLER_DECORATE modplay
// Ugglay
#ifdef RESAMPLER_DECORATE
#define PASTE(a,b) a ## b

File diff suppressed because it is too large Load Diff