File: white.alg

package info (click to toggle)
audacity 1.2.4b-2.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 24,136 kB
  • ctags: 20,445
  • sloc: ansic: 139,567; cpp: 55,998; sh: 24,963; lisp: 3,772; makefile: 1,683; python: 272
file content (24 lines) | stat: -rw-r--r-- 560 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
(WHITE-ALG
(NAME "white")
(ARGUMENTS ("time_type" "t0") ("rate_type" "sr") ("time_type" "d"))
(STATE )
(TERMINATE (AFTER "d"))
(INNER-LOOP "output = (sample_type) (rand() * rand_scale - 1.0);")
(SAMPLE-RATE "sr")
(SUPPORT-HEADER "
/* CHANGE LOG
 * --------------------------------------------------------------------
 * 28Apr03 rbd all systems now use rand(), based on DM's modifications
 */

#include <stdlib.h>
#include <math.h>

/* rand returns from 0 to RAND_MAX. Scale and offset
 * to get range from -1 to +1
 */
#define rand_scale (2.0/RAND_MAX)

")
)