-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathEchoKernel.h
43 lines (36 loc) · 849 Bytes
/
EchoKernel.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
* EchoKernel.h
* C700
*
* Created by osoumen on 12/10/12.
* Copyright 2012 __MyCompanyName__. All rights reserved.
*
*/
#pragma once
class EchoKernel
{
public:
EchoKernel();
~EchoKernel();
void Input(int samp);
int GetFxOut();
void Reset();
void SetEchoVol( int val ) { m_echo_vol = val; }
void SetFBLevel( int val ) { m_fb_lev = val; }
void SetFIRTap( int index, int val ) { m_fir_taps[index] = val; }
void SetDelayTime( int val ) { m_delay_samples = val * DELAY_UNIT; }
private:
static const int DELAY_UNIT = 512;
static const int ECHO_BUFFER_SIZE = 7680;
static const int FIR_LENGTH = 8;
static const int FILTER_STLIDE = 1;
int *mEchoBuffer;
int *mFIRbuf;
int mEchoIndex;
int mFIRIndex;
int m_echo_vol;
int m_fb_lev;
int m_fir_taps[8];
int m_delay_samples;
int m_input;
};