mirror of
https://github.com/radio95-rnt/fm95.git
synced 2026-02-27 03:23:54 +01:00
fixes
This commit is contained in:
@@ -78,7 +78,7 @@ float get_next_sample(Oscillator *osc) {
|
|||||||
#ifdef PREEMPHASIS
|
#ifdef PREEMPHASIS
|
||||||
typedef struct {
|
typedef struct {
|
||||||
float alpha;
|
float alpha;
|
||||||
float prev_sample
|
float prev_sample;
|
||||||
} PreEmphasis;
|
} PreEmphasis;
|
||||||
|
|
||||||
void init_pre_emphasis(PreEmphasis *pe) {
|
void init_pre_emphasis(PreEmphasis *pe) {
|
||||||
@@ -88,7 +88,7 @@ void init_pre_emphasis(PreEmphasis *pe) {
|
|||||||
|
|
||||||
float apply_pre_emphasis(PreEmphasis *pe, float sample) {
|
float apply_pre_emphasis(PreEmphasis *pe, float sample) {
|
||||||
float audio = sample-pe->alpha*pe->prev_sample;
|
float audio = sample-pe->alpha*pe->prev_sample;
|
||||||
pe->prevsample = audio;
|
pe->prev_sample = audio;
|
||||||
return audio;
|
return audio;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user