Lines Matching refs:channel
166 opm_key_on(u_char channel)
168 writeopm(0x08, opm0->sc_vdata[channel].sm << 3 | channel);
172 opm_key_off(u_char channel)
174 writeopm(0x08, channel);
178 opm_set_voice(int channel, struct opm_voice *voice)
180 memcpy(&opm0->sc_vdata[channel], voice, sizeof(struct opm_voice));
182 opm_set_voice_sub(0x40 + channel, &voice->m1);
183 opm_set_voice_sub(0x48 + channel, &voice->m2);
184 opm_set_voice_sub(0x50 + channel, &voice->c1);
185 opm_set_voice_sub(0x58 + channel, &voice->c2);
186 writeopm(0x20 + channel, 0xc0 | (voice->fb & 0x7) << 3 |
213 opm_set_volume(int channel, int volume)
217 switch (opm0->sc_vdata[channel].con) {
219 value = opm0->sc_vdata[channel].m1.tl + volume;
220 writeopm(0x60 + channel, ((value > 0x7f) ? 0x7f : value));
223 value = opm0->sc_vdata[channel].m2.tl + volume;
224 writeopm(0x68 + channel, ((value > 0x7f) ? 0x7f : value));
226 value = opm0->sc_vdata[channel].c1.tl + volume;
227 writeopm(0x70 + channel, ((value > 0x7f) ? 0x7f : value));
232 value = opm0->sc_vdata[channel].c2.tl + volume;
233 writeopm(0x78 + channel, ((value > 0x7f) ? 0x7f : value));
238 opm_set_key(int channel, int tone)
240 writeopm(0x28 + channel, tone >> 8);
241 writeopm(0x30 + channel, tone & 0xff);