Deluge Firmware 1.3.0
Build date: 2025.04.16
Loading...
Searching...
No Matches
fm_op_kernel.h
1/*
2 * Copyright 2012 Google Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include "stdint.h"
20
21struct FmOpParams {
22 int32_t level_in; // value to be computed (from level to gain[0])
23 int32_t gain_out; // computed value (gain[1] to gain[0])
24 int32_t freq;
25 int32_t phase;
26};
27
29public:
30 // gain1 and gain2 represent linear step: gain for sample i is
31 // gain1 + (1 + i) / 64 * (gain2 - gain1)
32
33 // This is the basic FM operator. No feedback.
34 static void compute(int32_t* output, int n, const int32_t* input, int32_t phase0, int32_t freq, int32_t gain1,
35 int32_t gain2, int32_t dgain, bool add, bool neon);
36
37 // This is a sine generator, no feedback.
38 static void compute_pure(int32_t* output, int n, int32_t phase0, int32_t freq, int32_t gain1, int32_t gain2,
39 int32_t dgain, bool add, bool neon);
40
41 // One op with feedback, no add.
42 static void compute_fb(int32_t* output, int n, int32_t phase0, int32_t freq, int32_t gain1, int32_t gain2,
43 int32_t dgain, int32_t* fb_buf, int fb_gain, bool add);
44};
Definition fm_op_kernel.h:28
Definition fm_op_kernel.h:21