aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/gus/gus_sample.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/isa/gus/gus_sample.c')
-rw-r--r--sound/isa/gus/gus_sample.c42
1 files changed, 26 insertions, 16 deletions
diff --git a/sound/isa/gus/gus_sample.c b/sound/isa/gus/gus_sample.c
index 4290e03acd51..9e0c55ab25b2 100644
--- a/sound/isa/gus/gus_sample.c
+++ b/sound/isa/gus/gus_sample.c
@@ -28,9 +28,9 @@
28 * 28 *
29 */ 29 */
30 30
31static void select_instrument(snd_gus_card_t * gus, snd_gus_voice_t * v) 31static void select_instrument(struct snd_gus_card * gus, struct snd_gus_voice * v)
32{ 32{
33 snd_seq_kinstr_t *instr; 33 struct snd_seq_kinstr *instr;
34 34
35#if 0 35#if 0
36 printk("select instrument: cluster = %li, std = 0x%x, bank = %i, prg = %i\n", 36 printk("select instrument: cluster = %li, std = 0x%x, bank = %i, prg = %i\n",
@@ -53,7 +53,8 @@ static void select_instrument(snd_gus_card_t * gus, snd_gus_voice_t * v)
53 * 53 *
54 */ 54 */
55 55
56static void event_sample(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v) 56static void event_sample(struct snd_seq_event *ev, struct snd_gus_port *p,
57 struct snd_gus_voice *v)
57{ 58{
58 if (v->sample_ops && v->sample_ops->sample_stop) 59 if (v->sample_ops && v->sample_ops->sample_stop)
59 v->sample_ops->sample_stop(p->gus, v, SAMPLE_STOP_IMMEDIATELY); 60 v->sample_ops->sample_stop(p->gus, v, SAMPLE_STOP_IMMEDIATELY);
@@ -67,7 +68,8 @@ static void event_sample(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t
67 select_instrument(p->gus, v); 68 select_instrument(p->gus, v);
68} 69}
69 70
70static void event_cluster(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v) 71static void event_cluster(struct snd_seq_event *ev, struct snd_gus_port *p,
72 struct snd_gus_voice *v)
71{ 73{
72 if (v->sample_ops && v->sample_ops->sample_stop) 74 if (v->sample_ops && v->sample_ops->sample_stop)
73 v->sample_ops->sample_stop(p->gus, v, SAMPLE_STOP_IMMEDIATELY); 75 v->sample_ops->sample_stop(p->gus, v, SAMPLE_STOP_IMMEDIATELY);
@@ -75,50 +77,58 @@ static void event_cluster(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_
75 select_instrument(p->gus, v); 77 select_instrument(p->gus, v);
76} 78}
77 79
78static void event_start(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v) 80static void event_start(struct snd_seq_event *ev, struct snd_gus_port *p,
81 struct snd_gus_voice *v)
79{ 82{
80 if (v->sample_ops && v->sample_ops->sample_start) 83 if (v->sample_ops && v->sample_ops->sample_start)
81 v->sample_ops->sample_start(p->gus, v, ev->data.sample.param.position); 84 v->sample_ops->sample_start(p->gus, v, ev->data.sample.param.position);
82} 85}
83 86
84static void event_stop(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v) 87static void event_stop(struct snd_seq_event *ev, struct snd_gus_port *p,
88 struct snd_gus_voice *v)
85{ 89{
86 if (v->sample_ops && v->sample_ops->sample_stop) 90 if (v->sample_ops && v->sample_ops->sample_stop)
87 v->sample_ops->sample_stop(p->gus, v, ev->data.sample.param.stop_mode); 91 v->sample_ops->sample_stop(p->gus, v, ev->data.sample.param.stop_mode);
88} 92}
89 93
90static void event_freq(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v) 94static void event_freq(struct snd_seq_event *ev, struct snd_gus_port *p,
95 struct snd_gus_voice *v)
91{ 96{
92 if (v->sample_ops && v->sample_ops->sample_freq) 97 if (v->sample_ops && v->sample_ops->sample_freq)
93 v->sample_ops->sample_freq(p->gus, v, ev->data.sample.param.frequency); 98 v->sample_ops->sample_freq(p->gus, v, ev->data.sample.param.frequency);
94} 99}
95 100
96static void event_volume(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v) 101static void event_volume(struct snd_seq_event *ev, struct snd_gus_port *p,
102 struct snd_gus_voice *v)
97{ 103{
98 if (v->sample_ops && v->sample_ops->sample_volume) 104 if (v->sample_ops && v->sample_ops->sample_volume)
99 v->sample_ops->sample_volume(p->gus, v, &ev->data.sample.param.volume); 105 v->sample_ops->sample_volume(p->gus, v, &ev->data.sample.param.volume);
100} 106}
101 107
102static void event_loop(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v) 108static void event_loop(struct snd_seq_event *ev, struct snd_gus_port *p,
109 struct snd_gus_voice *v)
103{ 110{
104 if (v->sample_ops && v->sample_ops->sample_loop) 111 if (v->sample_ops && v->sample_ops->sample_loop)
105 v->sample_ops->sample_loop(p->gus, v, &ev->data.sample.param.loop); 112 v->sample_ops->sample_loop(p->gus, v, &ev->data.sample.param.loop);
106} 113}
107 114
108static void event_position(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v) 115static void event_position(struct snd_seq_event *ev, struct snd_gus_port *p,
116 struct snd_gus_voice *v)
109{ 117{
110 if (v->sample_ops && v->sample_ops->sample_pos) 118 if (v->sample_ops && v->sample_ops->sample_pos)
111 v->sample_ops->sample_pos(p->gus, v, ev->data.sample.param.position); 119 v->sample_ops->sample_pos(p->gus, v, ev->data.sample.param.position);
112} 120}
113 121
114static void event_private1(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v) 122static void event_private1(struct snd_seq_event *ev, struct snd_gus_port *p,
123 struct snd_gus_voice *v)
115{ 124{
116 if (v->sample_ops && v->sample_ops->sample_private1) 125 if (v->sample_ops && v->sample_ops->sample_private1)
117 v->sample_ops->sample_private1(p->gus, v, (unsigned char *)&ev->data.sample.param.raw8); 126 v->sample_ops->sample_private1(p->gus, v, (unsigned char *)&ev->data.sample.param.raw8);
118} 127}
119 128
120typedef void (gus_sample_event_handler_t)(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v); 129typedef void (gus_sample_event_handler_t)(struct snd_seq_event *ev,
121 130 struct snd_gus_port *p,
131 struct snd_gus_voice *v);
122static gus_sample_event_handler_t *gus_sample_event_handlers[9] = { 132static gus_sample_event_handler_t *gus_sample_event_handlers[9] = {
123 event_sample, 133 event_sample,
124 event_cluster, 134 event_cluster,
@@ -131,11 +141,11 @@ static gus_sample_event_handler_t *gus_sample_event_handlers[9] = {
131 event_private1 141 event_private1
132}; 142};
133 143
134void snd_gus_sample_event(snd_seq_event_t *ev, snd_gus_port_t *p) 144void snd_gus_sample_event(struct snd_seq_event *ev, struct snd_gus_port *p)
135{ 145{
136 int idx, voice; 146 int idx, voice;
137 snd_gus_card_t *gus = p->gus; 147 struct snd_gus_card *gus = p->gus;
138 snd_gus_voice_t *v; 148 struct snd_gus_voice *v;
139 unsigned long flags; 149 unsigned long flags;
140 150
141 idx = ev->type - SNDRV_SEQ_EVENT_SAMPLE; 151 idx = ev->type - SNDRV_SEQ_EVENT_SAMPLE;