xref: /third_party/alsa-utils/speaker-test/pink.h (revision c72fcc34)
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/alsa-utils/speaker-test/
1c72fcc34Sopenharmony_ci#define PINK_MAX_RANDOM_ROWS   (30)
2c72fcc34Sopenharmony_ci#define PINK_RANDOM_BITS       (24)
3c72fcc34Sopenharmony_ci#define PINK_RANDOM_SHIFT      ((sizeof(long)*8)-PINK_RANDOM_BITS)
4c72fcc34Sopenharmony_ci
5c72fcc34Sopenharmony_citypedef struct
6c72fcc34Sopenharmony_ci{
7c72fcc34Sopenharmony_ci  long      pink_rows[PINK_MAX_RANDOM_ROWS];
8c72fcc34Sopenharmony_ci  long      pink_running_sum;   /* Used to optimize summing of generators. */
9c72fcc34Sopenharmony_ci  int       pink_index;        /* Incremented each sample. */
10c72fcc34Sopenharmony_ci  int       pink_index_mask;    /* Index wrapped by ANDing with this mask. */
11c72fcc34Sopenharmony_ci  float     pink_scalar;       /* Used to scale within range of -1.0 to +1.0 */
12c72fcc34Sopenharmony_ci} pink_noise_t;
13c72fcc34Sopenharmony_ci
14c72fcc34Sopenharmony_civoid initialize_pink_noise( pink_noise_t *pink, int num_rows );
15c72fcc34Sopenharmony_cifloat generate_pink_noise_sample( pink_noise_t *pink );
16

Indexes created Thu Nov 07 10:32:03 CST 2024