MythTV  master
pink.h
Go to the documentation of this file.
1 #ifndef AUDIOPINK
2 #define AUDIOPINK
3 
4 #include "mythexp.h"
5 
6 #define PINK_MAX_RANDOM_ROWS (30)
7 #define PINK_RANDOM_BITS (24)
8 #define PINK_RANDOM_SHIFT ((sizeof(long)*8)-PINK_RANDOM_BITS)
9 
10 typedef struct
11 {
12  long pink_rows[PINK_MAX_RANDOM_ROWS];
13  long pink_running_sum; /* Used to optimize summing of generators. */
14  int pink_index; /* Incremented each sample. */
15  int pink_index_mask; /* Index wrapped by ANDing with this mask. */
16  float pink_scalar; /* Used to scale within range of -1.0 to +1.0 */
17 } pink_noise_t;
18 
19 void initialize_pink_noise( pink_noise_t *pink, int num_rows );
21 
22 #endif
int pink_index_mask
Definition: pink.h:15
float generate_pink_noise_sample(pink_noise_t *pink)
Definition: pink.c:56
#define PINK_MAX_RANDOM_ROWS
Definition: pink.h:6
void initialize_pink_noise(pink_noise_t *pink, int num_rows)
Definition: pink.c:41
long pink_running_sum
Definition: pink.h:13
int pink_index
Definition: pink.h:14
float pink_scalar
Definition: pink.h:16