aboutsummaryrefslogtreecommitdiffstats
path: root/sound/synth/emux/emux_nrpn.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 08:24:47 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:18:14 -0500
commit03da312ac080b4f5c9359c233b8812cc93a035fe (patch)
tree1a6767ca18964b53442ecfd538141b12e81b23be /sound/synth/emux/emux_nrpn.c
parentee42381e71c56328db9e9d64d19a4de7a2f09a93 (diff)
[ALSA] Remove xxx_t typedefs: Emu-X synth
Modules: Common EMU synth,SoundFont,Synth Remove xxx_t typedefs from the Emu-X synth support. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/synth/emux/emux_nrpn.c')
-rw-r--r--sound/synth/emux/emux_nrpn.c30
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 */
30typedef struct { 30struct 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
51static int send_converted_effect(nrpn_conv_table *table, int num_tables, 51static 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
181static nrpn_conv_table awe_effects[] = 182static 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
268static nrpn_conv_table gs_effects[] = 269static 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 */
284void 285void
285snd_emux_nrpn(void *p, snd_midi_channel_t *chan, snd_midi_channel_set_t *chset) 286snd_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
351static nrpn_conv_table xg_effects[] = 353static 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
359int 361int
360snd_emux_xg_control(snd_emux_port_t *port, snd_midi_channel_t *chan, int param) 362snd_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 */
371void 374void
372snd_emux_sysex(void *p, unsigned char *buf, int len, int parsed, snd_midi_channel_set_t *chset) 375snd_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);