gzdoom-gles/src/sound/timiditypp/effect.h
Christoph Oelckers 8f7a503561 - don't let the Timidity++ player directly access the CVARs.
This may cause problems because the player runs in a different thread than the input code.
Instead the play thread will now copy their values to local variables when it starts generating output.
2018-02-24 19:36:09 +01:00

43 lines
No EOL
649 B
C++

#pragma once
#include <stdint.h>
#include "m_random.h"
#include "timidity.h"
namespace TimidityPlus
{
class Reverb;
class Effect
{
void effect_left_right_delay(int32_t *, int32_t);
void init_mtrand(void);
uint32_t frand(void);
int32_t my_mod(int32_t, int32_t);
int turn_counter = 0, tc = 0;
int status = 0;
double rate0 = 0, rate1 = 0, dr = 0;
int32_t prev[AUDIO_BUFFER_SIZE * 2] = { 0 };
FRandom rng;
Reverb *reverb;
public:
int timidity_chorus;
Effect(Reverb *_reverb, int chorus)
{
reverb = _reverb;
timidity_chorus = chorus;
init_effect();
}
void init_effect();
void do_effect(int32_t *buf, int32_t count);
};
}