Files
JaySynth/Source/synth/noise.h
T
jens 843c6e300c - initial import
git-svn-id: http://moon:8086/svn/software/trunk/projects/JaySynth@37 b431acfa-c32f-4a4a-93f1-934dc6c82436
2014-10-25 07:27:55 +00:00

39 lines
1.1 KiB
C

// --------------------------------------------------------------
// --------------------------------------------------------------
#ifndef _NOISE_H_
#define _NOISE_H_
#include "synth_defs.h"
#define NOISE_LFSR_POLY 0xD0000001
#define NOISE_LFSR_MAX 0xFFFFFFFF
// --------------------------------------------------------------
// Types
// --------------------------------------------------------------
typedef struct _snoise_gen_t
{
long state;
} noise_gen_t;
// --------------------------------------------------------------
#if defined(__cplusplus)
extern "C" {
#endif
// --------------------------------------------------------------
// Exported functions
// --------------------------------------------------------------
void Noise_Init(noise_gen_t *pObj, UINT32 seed);
void Noise_Free(noise_gen_t *pObj);
synth_float_t Noise_Uniform(noise_gen_t *pObj, synth_float_t vmax, synth_float_t mu);
synth_float_t Noise_Gaussian(noise_gen_t *pObj, synth_float_t std, synth_float_t mu);
#if defined(__cplusplus)
}
#endif
// --------------------------------------------------------------
#endif // _NOISE_H_