Lines Matching +full:0 +full:x63
23 …efine LIMITVALUE(x, a, b) do { if ((x) < (a)) (x) = (a); else if ((x) > (b)) (x) = (b); } while (0)
24 #define LIMITMAX(x, a) do {if ((x) > (a)) (x) = (a); } while (0)
69 for (i = 0; i < nvoices; i++) { in snd_emux_note_on()
75 #if 0 // seems not necessary in snd_emux_note_on()
77 terminate_note1(emu, key, chan, 0); in snd_emux_note_on()
81 for (i = 0; i < nvoices; i++) { in snd_emux_note_on()
90 if (vp == NULL || vp->ch < 0) in snd_emux_note_on()
112 if (emu->ops.prepare(vp) >= 0) in snd_emux_note_on()
118 for (i = 0; i < emu->max_voices; i++) { in snd_emux_note_on()
134 fx->flag[EMUX_FX_SAMPLE_START] = 0; in snd_emux_note_on()
135 fx->flag[EMUX_FX_COARSE_SAMPLE_START] = 0; in snd_emux_note_on()
162 for (ch = 0; ch < emu->max_voices; ch++) { in snd_emux_note_off()
196 int ch, do_again = 0; in snd_emux_timer_callback()
199 for (ch = 0; ch < emu->max_voices; ch++) { in snd_emux_timer_callback()
214 emu->timer_active = 0; in snd_emux_timer_callback()
239 for (ch = 0; ch < emu->max_voices; ch++) { in snd_emux_key_press()
270 for (i = 0; i < emu->max_voices; i++) { in snd_emux_update_channel()
297 for (i = 0; i < emu->max_voices; i++) { in snd_emux_update_port()
336 snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, 0, in snd_emux_control()
371 for (i = 0; i < emu->max_voices; i++) { in terminate_note1()
413 for (i = 0; i < emu->max_voices; i++) { in snd_emux_terminate_all()
416 terminate_voice(emu, vp, 0); in snd_emux_terminate_all()
423 vp->time = 0; in snd_emux_terminate_all()
426 emu->use_time = 0; in snd_emux_terminate_all()
450 for (i = 0; i < emu->max_voices; i++) { in snd_emux_sounds_off_all()
454 terminate_voice(emu, vp, 0); in snd_emux_sounds_off_all()
478 for (i = 0; i < emu->max_voices; i++) { in exclusive_note_off()
482 terminate_voice(emu, vp, 0); in exclusive_note_off()
530 #if 0 // not used
533 0xEAC0, 0xE0C8, 0xD740, 0xCE20, 0xC560, 0xBD08, 0xB500, 0xAD58,
534 0xA5F8, 0x9EF0, 0x9830, 0x91C0, 0x8B90, 0x85A8, 0x8000, 0x7A90
538 #define LO_BYTE(v) ((v) & 0xff)
539 #define HI_BYTE(v) (((v) >> 8) & 0xff)
570 if (LO_BYTE(parm->modatkhld) >= 0x80 && parm->moddelay >= 0x8000) { in setup_voice()
571 parm->moddelay = 0xbfff; in setup_voice()
573 if (pitch > 0xffff) in setup_voice()
574 pitch = 0xffff; in setup_voice()
577 LIMITVALUE(vp->ftarget, 0, 255); in setup_voice()
586 if (pitch != 0xffff) { in setup_voice()
588 if (pitch & 0x800) vp->ptarget += (vp->ptarget*0x102e)/0x2710; in setup_voice()
589 if (pitch & 0x400) vp->ptarget += (vp->ptarget*0x764)/0x2710; in setup_voice()
590 if (pitch & 0x200) vp->ptarget += (vp->ptarget*0x389)/0x2710; in setup_voice()
592 if (vp->ptarget > 0xffff) vp->ptarget = 0xffff; in setup_voice()
594 vp->ptarget = 0xffff; in setup_voice()
596 if (LO_BYTE(parm->modatkhld) >= 0x80) { in setup_voice()
597 parm->modatkhld &= ~0xff; in setup_voice()
598 parm->modatkhld |= 0x7f; in setup_voice()
602 vp->vtarget = 0; in setup_voice()
603 #if 0 /* FIXME: this leads to some clicks.. */ in setup_voice()
604 if (LO_BYTE(parm->volatkhld) >= 0x80 && parm->voldelay >= 0x8000) { in setup_voice()
605 parm->voldelay = 0xbfff; in setup_voice()
606 vp->vtarget = voltarget[vp->avol % 0x10] >> (vp->avol >> 4); in setup_voice()
610 if (LO_BYTE(parm->volatkhld) >= 0x80) { in setup_voice()
611 parm->volatkhld &= ~0xff; in setup_voice()
612 parm->volatkhld |= 0x7f; in setup_voice()
620 0x00,0x03,0x06,0x09,0x0c,0x0f,0x12,0x14,0x17,0x1a,0x1d,0x20,0x22,0x25,0x28,0x2a,
621 0x2d,0x30,0x32,0x35,0x37,0x3a,0x3c,0x3f,0x41,0x44,0x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,0xff,0xff,0xff,0xff,0xff,
635 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
644 /* pan & loop start (pan 8bit, MSB, 0:right, 0xff:left) */ in calc_pan()
645 if (vp->reg.fixpan > 0) /* 0-127 */ in calc_pan()
649 if (vp->reg.pan >= 0) /* 0-127 */ in calc_pan()
653 LIMITVALUE(pan, 0, 255); in calc_pan()
659 if (pan == 0) in calc_pan()
660 vp->aaux = 0xff; in calc_pan()
662 vp->aaux = (-pan) & 0xff; in calc_pan()
665 return 0; in calc_pan()
673 return 0; in calc_pan()
682 * So volume becomes maximum when avol is 0 (no attenuation), and
688 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63,
689 0x63, 0x2b, 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22,
690 0x21, 0x20, 0x1f, 0x1e, 0x1e, 0x1d, 0x1c, 0x1b, 0x1b, 0x1a,
691 0x19, 0x19, 0x18, 0x17, 0x17, 0x16, 0x16, 0x15, 0x15, 0x14,
692 0x14, 0x13, 0x13, 0x13, 0x12, 0x12, 0x11, 0x11, 0x11, 0x10,
693 0x10, 0x10, 0x0f, 0x0f, 0x0f, 0x0e, 0x0e, 0x0e, 0x0e, 0x0d,
694 0x0d, 0x0d, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0b, 0x0b, 0x0b,
695 0x0b, 0x0a, 0x0a, 0x0a, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09,
696 0x08, 0x08, 0x08, 0x08, 0x08, 0x07, 0x07, 0x07, 0x07, 0x06,
697 0x06, 0x06, 0x06, 0x06, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04,
698 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02,
699 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
700 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
704 0x32, 0x31, 0x30, 0x2f, 0x2e, 0x2d, 0x2c, 0x2b, 0x2a, 0x2a,
705 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x24, 0x23, 0x22, 0x21,
706 0x21, 0x20, 0x1f, 0x1e, 0x1e, 0x1d, 0x1c, 0x1c, 0x1b, 0x1a,
707 0x1a, 0x19, 0x19, 0x18, 0x18, 0x17, 0x16, 0x16, 0x15, 0x15,
708 0x14, 0x14, 0x13, 0x13, 0x13, 0x12, 0x12, 0x11, 0x11, 0x10,
709 0x10, 0x10, 0x0f, 0x0f, 0x0f, 0x0e, 0x0e, 0x0e, 0x0d, 0x0d,
710 0x0d, 0x0c, 0x0c, 0x0c, 0x0b, 0x0b, 0x0b, 0x0b, 0x0a, 0x0a,
711 0x0a, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x08, 0x08, 0x08,
712 0x08, 0x08, 0x07, 0x07, 0x07, 0x07, 0x07, 0x06, 0x06, 0x06,
713 0x06, 0x06, 0x06, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
714 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03,
715 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01,
716 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00
720 0x7f, 0x6c, 0x62, 0x5a, 0x54, 0x50, 0x4b, 0x48, 0x45, 0x42,
721 0x40, 0x3d, 0x3b, 0x39, 0x38, 0x36, 0x34, 0x33, 0x31, 0x30,
722 0x2f, 0x2d, 0x2c, 0x2b, 0x2a, 0x29, 0x28, 0x27, 0x26, 0x25,
723 0x24, 0x24, 0x23, 0x22, 0x21, 0x21, 0x20, 0x1f, 0x1e, 0x1e,
724 0x1d, 0x1d, 0x1c, 0x1b, 0x1b, 0x1a, 0x1a, 0x19, 0x18, 0x18,
725 0x17, 0x17, 0x16, 0x16, 0x15, 0x15, 0x15, 0x14, 0x14, 0x13,
726 0x13, 0x12, 0x12, 0x11, 0x11, 0x11, 0x10, 0x10, 0x0f, 0x0f,
727 0x0f, 0x0e, 0x0e, 0x0e, 0x0d, 0x0d, 0x0d, 0x0c, 0x0c, 0x0c,
728 0x0b, 0x0b, 0x0b, 0x0a, 0x0a, 0x0a, 0x09, 0x09, 0x09, 0x09,
729 0x08, 0x08, 0x08, 0x07, 0x07, 0x07, 0x07, 0x06, 0x06, 0x06,
730 0x06, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03,
731 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
732 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
749 LIMITVALUE(expression_vol, 0, 127); in calc_volume()
751 /* 0 - 127 */ in calc_volume()
756 LIMITVALUE(vol, 0, 127); in calc_volume()
763 LIMITVALUE(main_vol, 0, 127); in calc_volume()
768 vol += ((0x100 - vol) * expressiontab[expression_vol])/128; in calc_volume()
772 LIMITVALUE(master_vol, 0, 127); in calc_volume()
783 LIMITVALUE(vol, 0, 255); in calc_volume()
785 return 0; /* value unchanged */ in calc_volume()
789 && LO_BYTE(vp->reg.parm.volatkhld) < 0x7d) { in calc_volume()
795 vp->acutoff = (atten * vp->reg.parm.cutoff + 0xa0) >> 7; in calc_volume()
806 * 0xE000 is no pitch offset at 44100Hz sample.
817 if (vp->reg.fixkey >= 0) { in calc_pitch()
824 if (chan->midi_pitchbend != 0) { in calc_pitch()
846 /* 0xe000: root pitch */ in calc_pitch()
847 offset += 0xe000 + vp->reg.rate_offset; in calc_pitch()
849 LIMITVALUE(offset, 0, 0xffff); in calc_pitch()
851 return 0; /* unchanged */ in calc_pitch()
921 for (i = 0; i < emu->max_voices; i++) { in snd_emux_init_voices()
927 vp->time = 0; in snd_emux_init_voices()