diff options
Diffstat (limited to 'sound/synth/emux/emux_nrpn.c')
-rw-r--r-- | sound/synth/emux/emux_nrpn.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/sound/synth/emux/emux_nrpn.c b/sound/synth/emux/emux_nrpn.c index 25edff9e1fc2..c6917ba2c934 100644 --- a/sound/synth/emux/emux_nrpn.c +++ b/sound/synth/emux/emux_nrpn.c | |||
@@ -27,11 +27,11 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | /* NRPN / CC -> Emu8000 parameter converter */ | 29 | /* NRPN / CC -> Emu8000 parameter converter */ |
30 | typedef struct { | 30 | struct nrpn_conv_table { |
31 | int control; | 31 | int control; |
32 | int effect; | 32 | int effect; |
33 | int (*convert)(int val); | 33 | int (*convert)(int val); |
34 | } nrpn_conv_table; | 34 | }; |
35 | 35 | ||
36 | /* effect sensitivity */ | 36 | /* effect sensitivity */ |
37 | 37 | ||
@@ -48,8 +48,9 @@ typedef struct { | |||
48 | * convert NRPN/control values | 48 | * convert NRPN/control values |
49 | */ | 49 | */ |
50 | 50 | ||
51 | static int send_converted_effect(nrpn_conv_table *table, int num_tables, | 51 | static int send_converted_effect(struct nrpn_conv_table *table, int num_tables, |
52 | snd_emux_port_t *port, snd_midi_channel_t *chan, | 52 | struct snd_emux_port *port, |
53 | struct snd_midi_channel *chan, | ||
53 | int type, int val, int mode) | 54 | int type, int val, int mode) |
54 | { | 55 | { |
55 | int i, cval; | 56 | int i, cval; |
@@ -178,7 +179,7 @@ static int fx_conv_Q(int val) | |||
178 | } | 179 | } |
179 | 180 | ||
180 | 181 | ||
181 | static nrpn_conv_table awe_effects[] = | 182 | static struct nrpn_conv_table awe_effects[] = |
182 | { | 183 | { |
183 | { 0, EMUX_FX_LFO1_DELAY, fx_lfo1_delay}, | 184 | { 0, EMUX_FX_LFO1_DELAY, fx_lfo1_delay}, |
184 | { 1, EMUX_FX_LFO1_FREQ, fx_lfo1_freq}, | 185 | { 1, EMUX_FX_LFO1_FREQ, fx_lfo1_freq}, |
@@ -265,7 +266,7 @@ static int gs_vib_delay(int val) | |||
265 | return -(val - 64) * gs_sense[FX_VIBDELAY] / 50; | 266 | return -(val - 64) * gs_sense[FX_VIBDELAY] / 50; |
266 | } | 267 | } |
267 | 268 | ||
268 | static nrpn_conv_table gs_effects[] = | 269 | static struct nrpn_conv_table gs_effects[] = |
269 | { | 270 | { |
270 | {32, EMUX_FX_CUTOFF, gs_cutoff}, | 271 | {32, EMUX_FX_CUTOFF, gs_cutoff}, |
271 | {33, EMUX_FX_FILTERQ, gs_filterQ}, | 272 | {33, EMUX_FX_FILTERQ, gs_filterQ}, |
@@ -282,9 +283,10 @@ static nrpn_conv_table gs_effects[] = | |||
282 | * NRPN events | 283 | * NRPN events |
283 | */ | 284 | */ |
284 | void | 285 | void |
285 | snd_emux_nrpn(void *p, snd_midi_channel_t *chan, snd_midi_channel_set_t *chset) | 286 | snd_emux_nrpn(void *p, struct snd_midi_channel *chan, |
287 | struct snd_midi_channel_set *chset) | ||
286 | { | 288 | { |
287 | snd_emux_port_t *port; | 289 | struct snd_emux_port *port; |
288 | 290 | ||
289 | port = p; | 291 | port = p; |
290 | snd_assert(port != NULL, return); | 292 | snd_assert(port != NULL, return); |
@@ -348,7 +350,7 @@ static int xg_release(int val) | |||
348 | return -(val - 64) * xg_sense[FX_RELEASE] / 64; | 350 | return -(val - 64) * xg_sense[FX_RELEASE] / 64; |
349 | } | 351 | } |
350 | 352 | ||
351 | static nrpn_conv_table xg_effects[] = | 353 | static struct nrpn_conv_table xg_effects[] = |
352 | { | 354 | { |
353 | {71, EMUX_FX_CUTOFF, xg_cutoff}, | 355 | {71, EMUX_FX_CUTOFF, xg_cutoff}, |
354 | {74, EMUX_FX_FILTERQ, xg_filterQ}, | 356 | {74, EMUX_FX_FILTERQ, xg_filterQ}, |
@@ -357,7 +359,8 @@ static nrpn_conv_table xg_effects[] = | |||
357 | }; | 359 | }; |
358 | 360 | ||
359 | int | 361 | int |
360 | snd_emux_xg_control(snd_emux_port_t *port, snd_midi_channel_t *chan, int param) | 362 | snd_emux_xg_control(struct snd_emux_port *port, struct snd_midi_channel *chan, |
363 | int param) | ||
361 | { | 364 | { |
362 | return send_converted_effect(xg_effects, ARRAY_SIZE(xg_effects), | 365 | return send_converted_effect(xg_effects, ARRAY_SIZE(xg_effects), |
363 | port, chan, param, | 366 | port, chan, param, |
@@ -369,10 +372,11 @@ snd_emux_xg_control(snd_emux_port_t *port, snd_midi_channel_t *chan, int param) | |||
369 | * receive sysex | 372 | * receive sysex |
370 | */ | 373 | */ |
371 | void | 374 | void |
372 | snd_emux_sysex(void *p, unsigned char *buf, int len, int parsed, snd_midi_channel_set_t *chset) | 375 | snd_emux_sysex(void *p, unsigned char *buf, int len, int parsed, |
376 | struct snd_midi_channel_set *chset) | ||
373 | { | 377 | { |
374 | snd_emux_port_t *port; | 378 | struct snd_emux_port *port; |
375 | snd_emux_t *emu; | 379 | struct snd_emux *emu; |
376 | 380 | ||
377 | port = p; | 381 | port = p; |
378 | snd_assert(port != NULL, return); | 382 | snd_assert(port != NULL, return); |