mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-27 16:31:31 +00:00
Slightly shuffles preprocessor use, the better for testing.
This commit is contained in:
parent
808e4e8537
commit
5242362f31
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#include <Accelerate/Accelerate.h>
|
#include <Accelerate/Accelerate.h>
|
||||||
|
#define USE_ACCELERATE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -50,7 +51,7 @@ class FIRFilter {
|
|||||||
@returns The result of applying the filter.
|
@returns The result of applying the filter.
|
||||||
*/
|
*/
|
||||||
inline short apply(const short *src, size_t stride = 1) const {
|
inline short apply(const short *src, size_t stride = 1) const {
|
||||||
#ifdef __APPLE__
|
#ifdef USE_ACCELERATE
|
||||||
short result;
|
short result;
|
||||||
vDSP_dotpr_s1_15(filter_coefficients_.data(), 1, src, vDSP_Stride(stride), &result, filter_coefficients_.size());
|
vDSP_dotpr_s1_15(filter_coefficients_.data(), 1, src, vDSP_Stride(stride), &result, filter_coefficients_.size());
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user