|
|
|
@ -1,18 +1,18 @@ |
|
|
|
|
/*
|
|
|
|
|
* Copyright 2012 Google Inc. |
|
|
|
|
*
|
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
|
* You may obtain a copy of the License at |
|
|
|
|
*
|
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
*
|
|
|
|
|
* Unless required by applicable law or agreed to in writing, software |
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, |
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
|
|
|
* See the License for the specific language governing permissions and |
|
|
|
|
* limitations under the License. |
|
|
|
|
*/ |
|
|
|
|
Copyright 2012 Google Inc. |
|
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
|
you may not use this file except in compliance with the License. |
|
|
|
|
You may obtain a copy of the License at |
|
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software |
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS, |
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
|
|
|
See the License for the specific language governing permissions and |
|
|
|
|
limitations under the License. |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
#ifndef __SYNTH_H |
|
|
|
|
#define __SYNTH_H |
|
|
|
@ -64,9 +64,14 @@ inline static T max(const T& a, const T& b) { |
|
|
|
|
#define QER(n,b) ( ((float)n)/(1<<b) ) |
|
|
|
|
|
|
|
|
|
#define FRAC_NUM float |
|
|
|
|
#define SIN_FUNC sinf |
|
|
|
|
#define COS_FUNC cosf |
|
|
|
|
//#define SIN_FUNC sinf
|
|
|
|
|
#define SIN_FUNC arm_sin_f32 // very fast but not as accurate
|
|
|
|
|
//#define COS_FUNC cosf
|
|
|
|
|
#define COS_FUNC arm_cos_f32 // very fast but not as accurate
|
|
|
|
|
#define LOG_FUNC logf |
|
|
|
|
#define EXP_FUNC expf |
|
|
|
|
#define SQRT_FUNC sqrtf |
|
|
|
|
#define ARM_SQRT_FUNC arm_sqrt_f32 // fast but not as accurate
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // __SYNTH_H
|
|
|
|
|