1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-25 03:32:01 +00:00

Slightly shuffles preprocessor use, the better for testing.

This commit is contained in:
Thomas Harte 2020-02-16 17:53:26 -05:00
parent 808e4e8537
commit 5242362f31

View File

@ -11,6 +11,7 @@
#ifdef __APPLE__
#include <Accelerate/Accelerate.h>
#define USE_ACCELERATE
#endif
#include <vector>
@ -50,7 +51,7 @@ class FIRFilter {
@returns The result of applying the filter.
*/
inline short apply(const short *src, size_t stride = 1) const {
#ifdef __APPLE__
#ifdef USE_ACCELERATE
short result;
vDSP_dotpr_s1_15(filter_coefficients_.data(), 1, src, vDSP_Stride(stride), &result, filter_coefficients_.size());
return result;