forked from cgestes/multifxvst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTAFadeInOut.h
36 lines (30 loc) · 1.02 KB
/
TAFadeInOut.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
#pragma once
class CTAFadeInOut
{
public:
CTAFadeInOut(void);
virtual ~CTAFadeInOut(void);
//#### Configuration ####
void SetFadeIn(float start = 1.0,float stop = 0.0);
void SetSampleRate(double samplerate);//futur use
void SetFadeLenght(double lenght_ms) ;//futur use
void SetFadeOut(float start = 0.0,float stop = 1.0);
bool Fade(){return fade;}
//#### Process function ####
//return true si le fondu est atteint completement
bool FonduBuffer(float ** dest,float ** source,float ** afondre,long size);
//copy source dans dest
static void CopyBuffer(float ** dest, float ** source,long size);
//additionne dest et source met le resultat dans dest
static void AddBuffer(float ** dest, float ** source,long size);
//#### Internal members ####
protected:
bool fade; //fade actif
bool fadein; //fade in or fade out
//value between 0.0f and 1.0f
float current; //current fade value
float start; //start fade value
float stop;
float inc; //incrément
//float stop;
};