Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5225 | alpine | 1 | #ifndef RS_SNDGEN_H |
2 | #define RS_SNDGEN_H |
||
3 | |||
4 | #include "rsgame.h" |
||
5 | |||
6 | /* |
||
7 | |||
8 | #include "rs/rsaudio.h" |
||
9 | |||
10 | typedef struct rs_sgen_reg_t { |
||
11 | int wave_length; |
||
12 | int waves_count; |
||
13 | float *wave; |
||
14 | signed short *wave_out; |
||
15 | } rs_sgen_reg_t; |
||
16 | |||
17 | extern rs_sgen_reg_t rs_sgen_reg; |
||
18 | |||
19 | void rs_sgen_init(int waves_count, int wave_length); |
||
20 | void rs_sgen_wave_out(int index); |
||
21 | void rs_sgen_term(); |
||
22 | |||
23 | void rs_sgen_func_noise(int index, int seed); |
||
24 | void rs_sgen_func_sin(int index, float freq, float p); |
||
25 | void rs_sgen_func_pm(int index, float freq, float p, float k, float freq2, float p2); |
||
26 | |||
27 | void rs_sgen_func_lowpass(int dest, int src, float alpha_start, float alpha_end, float alpha_pow); |
||
28 | void rs_sgen_func_highpass(int dest, int src, float alpha_start, float alpha_end, float alpha_pow); |
||
29 | //void rs_sgen_func_phaser(int dest, int src); |
||
30 | void rs_sgen_func_phaser(int dest, int src, float fb, float lfoPhase, float depth, float range_start, float range_end, float rate); |
||
31 | void rs_sgen_func_normalize(int dest, float amp); |
||
32 | void rs_sgen_func_limiter(int dest, float val); |
||
33 | void rs_sgen_func_reverb(int dest, int src, int echo_delay, float echo_decay_koef); |
||
34 | |||
35 | #define rs_sgen_func_copy(dst,src) rs_sgen_func_add(dst,src,dst,1.0,0.0) |
||
36 | void rs_sgen_func_add(int dest, int src1, int src2, float k1, float k2); |
||
37 | void rs_sgen_func_mult(int dest, int src1, int src2); |
||
38 | |||
39 | void rs_sgen_func_shift(int dest, int src); |
||
40 | |||
41 | //void rs_gen_func_mult_add_value(int dest, int src, float val_mult, float val_add); |
||
42 | |||
43 | */ |
||
44 | |||
45 | #endif |