diff --git a/lib-src/libnyquist/nyquist/nyqsrc/sliderdata.c b/lib-src/libnyquist/nyquist/nyqsrc/sliderdata.c
index 178a33f..9f0a68e 100644
a
|
b
|
void set_slider(int index, float value) |
15 | 15 | } |
16 | 16 | } |
17 | 17 | |
18 | | |
| 18 | float get_slider(int index) |
| 19 | { |
| 20 | if (index >= 0 && index < SLIDERS_MAX) { |
| 21 | return slider_array[index]; |
| 22 | } |
| 23 | else { |
| 24 | return 0.0/0.0; |
| 25 | } |
| 26 | } |
| 27 | No newline at end of file |
diff --git a/lib-src/libnyquist/nyquist/nyqsrc/sliderdata.h b/lib-src/libnyquist/nyquist/nyqsrc/sliderdata.h
index 93f0f85..fa20ecb 100644
a
|
b
|
extern float slider_array[SLIDERS_MAX]; |
10 | 10 | |
11 | 11 | /* access from the GUI to shared data */ |
12 | 12 | void set_slider(int index, float value); |
| 13 | float get_slider(int index); |
| 14 | No newline at end of file |
diff --git a/lib-src/libnyquist/nyquist/nyqsrc/sndsliders.c b/lib-src/libnyquist/nyquist/nyqsrc/sndsliders.c
index 7fd9ac6..80ebdbf 100644
a
|
b
|
LVAL xslider_read(void) |
17 | 17 | int index = getfixnum(arg); |
18 | 18 | xllastarg(); |
19 | 19 | if (index >= 0 && index < SLIDERS_MAX) { |
20 | | return cvflonum(slider_array[index]); |
| 20 | // return cvflonum(slider_array[index]); |
| 21 | return cvflonum(get_slider(index)); |
21 | 22 | } |
22 | 23 | return NIL; |
23 | 24 | } |
… |
… |
void slider__fetch(snd_susp_type a_susp, snd_list_type snd_list) |
91 | 92 | } |
92 | 93 | |
93 | 94 | n = togo; |
94 | | c_reg = slider_array[susp->index]; |
| 95 | // c_reg = slider_array[susp->index]; |
| 96 | c_reg = get_slider(susp->index); |
95 | 97 | out_ptr_reg = out_ptr; |
96 | 98 | if (n) do { /* the inner sample computation loop */ |
97 | 99 | *out_ptr_reg++ = c_reg; |