Lines Matching +full:0 +full:xfe

23 #define 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)
68 for (i = 0; i < nvoices; i++) {
74 #if 0 // seems not necessary
76 terminate_note1(emu, key, chan, 0);
80 for (i = 0; i < nvoices; i++) {
89 if (vp == NULL || vp->ch < 0)
111 if (emu->ops.prepare(vp) >= 0)
117 for (i = 0; i < emu->max_voices; i++) {
132 fx->flag[EMUX_FX_SAMPLE_START] = 0;
133 fx->flag[EMUX_FX_COARSE_SAMPLE_START] = 0;
159 for (ch = 0; ch < emu->max_voices; ch++) {
191 int ch, do_again = 0;
194 for (ch = 0; ch < emu->max_voices; ch++) {
209 emu->timer_active = 0;
232 for (ch = 0; ch < emu->max_voices; ch++) {
261 for (i = 0; i < emu->max_voices; i++) {
286 for (i = 0; i < emu->max_voices; i++) {
324 snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, 0,
358 for (i = 0; i < emu->max_voices; i++) {
398 for (i = 0; i < emu->max_voices; i++) {
401 terminate_voice(emu, vp, 0);
408 vp->time = 0;
411 emu->use_time = 0;
433 for (i = 0; i < emu->max_voices; i++) {
437 terminate_voice(emu, vp, 0);
459 for (i = 0; i < emu->max_voices; i++) {
463 terminate_voice(emu, vp, 0);
510 #if 0 // not used
513 0xEAC0, 0xE0C8, 0xD740, 0xCE20, 0xC560, 0xBD08, 0xB500, 0xAD58,
514 0xA5F8, 0x9EF0, 0x9830, 0x91C0, 0x8B90, 0x85A8, 0x8000, 0x7A90
518 #define LO_BYTE(v) ((v) & 0xff)
519 #define HI_BYTE(v) (((v) >> 8) & 0xff)
550 if (LO_BYTE(parm->modatkhld) >= 0x80 && parm->moddelay >= 0x8000) {
551 parm->moddelay = 0xbfff;
553 if (pitch > 0xffff)
554 pitch = 0xffff;
557 LIMITVALUE(vp->ftarget, 0, 255);
566 if (pitch != 0xffff) {
568 if (pitch & 0x800) vp->ptarget += (vp->ptarget*0x102e)/0x2710;
569 if (pitch & 0x400) vp->ptarget += (vp->ptarget*0x764)/0x2710;
570 if (pitch & 0x200) vp->ptarget += (vp->ptarget*0x389)/0x2710;
572 if (vp->ptarget > 0xffff) vp->ptarget = 0xffff;
574 vp->ptarget = 0xffff;
576 if (LO_BYTE(parm->modatkhld) >= 0x80) {
577 parm->modatkhld &= ~0xff;
578 parm->modatkhld |= 0x7f;
582 vp->vtarget = 0;
583 #if 0 /* FIXME: this leads to some clicks.. */
584 if (LO_BYTE(parm->volatkhld) >= 0x80 && parm->voldelay >= 0x8000) {
585 parm->voldelay = 0xbfff;
586 vp->vtarget = voltarget[vp->avol % 0x10] >> (vp->avol >> 4);
590 if (LO_BYTE(parm->volatkhld) >= 0x80) {
591 parm->volatkhld &= ~0xff;
592 parm->volatkhld |= 0x7f;
600 0x00,0x03,0x06,0x09,0x0c,0x0f,0x12,0x14,0x17,0x1a,0x1d,0x20,0x22,0x25,0x28,0x2a,
601 0x2d,0x30,0x32,0x35,0x37,0x3a,0x3c,0x3f,0x41,0x44,0x46,0x49,0x4b,0x4d,0x50,0x52,
602 0x54,0x57,0x59,0x5b,0x5d,0x60,0x62,0x64,0x66,0x68,0x6a,0x6c,0x6f,0x71,0x73,0x75,
603 0x77,0x79,0x7b,0x7c,0x7e,0x80,0x82,0x84,0x86,0x88,0x89,0x8b,0x8d,0x8f,0x90,0x92,
604 0x94,0x96,0x97,0x99,0x9a,0x9c,0x9e,0x9f,0xa1,0xa2,0xa4,0xa5,0xa7,0xa8,0xaa,0xab,
605 0xad,0xae,0xaf,0xb1,0xb2,0xb3,0xb5,0xb6,0xb7,0xb9,0xba,0xbb,0xbc,0xbe,0xbf,0xc0,
606 0xc1,0xc2,0xc3,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,
607 0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdc,0xdd,0xde,0xdf,
608 0xdf,0xe0,0xe1,0xe2,0xe2,0xe3,0xe4,0xe4,0xe5,0xe6,0xe6,0xe7,0xe8,0xe8,0xe9,0xe9,
609 0xea,0xeb,0xeb,0xec,0xec,0xed,0xed,0xee,0xee,0xef,0xef,0xf0,0xf0,0xf1,0xf1,0xf1,
610 0xf2,0xf2,0xf3,0xf3,0xf3,0xf4,0xf4,0xf5,0xf5,0xf5,0xf6,0xf6,0xf6,0xf7,0xf7,0xf7,
611 0xf7,0xf8,0xf8,0xf8,0xf9,0xf9,0xf9,0xf9,0xf9,0xfa,0xfa,0xfa,0xfa,0xfb,0xfb,0xfb,
612 0xfb,0xfb,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfd,0xfd,0xfd,0xfd,0xfd,0xfd,0xfd,
613 0xfd,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,
614 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
615 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
624 /* pan & loop start (pan 8bit, MSB, 0:right, 0xff:left) */
625 if (vp->reg.fixpan > 0) /* 0-127 */
629 if (vp->reg.pan >= 0) /* 0-127 */
633 LIMITVALUE(pan, 0, 255);
639 if (pan == 0)
640 vp->aaux = 0xff;
642 vp->aaux = (-pan) & 0xff;
645 return 0;
653 return 0;
662 * So volume becomes maximum when avol is 0 (no attenuation), and
668 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63,
669 0x63, 0x2b, 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22,
670 0x21, 0x20, 0x1f, 0x1e, 0x1e, 0x1d, 0x1c, 0x1b, 0x1b, 0x1a,
671 0x19, 0x19, 0x18, 0x17, 0x17, 0x16, 0x16, 0x15, 0x15, 0x14,
672 0x14, 0x13, 0x13, 0x13, 0x12, 0x12, 0x11, 0x11, 0x11, 0x10,
673 0x10, 0x10, 0x0f, 0x0f, 0x0f, 0x0e, 0x0e, 0x0e, 0x0e, 0x0d,
674 0x0d, 0x0d, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0b, 0x0b, 0x0b,
675 0x0b, 0x0a, 0x0a, 0x0a, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09,
676 0x08, 0x08, 0x08, 0x08, 0x08, 0x07, 0x07, 0x07, 0x07, 0x06,
677 0x06, 0x06, 0x06, 0x06, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04,
678 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02,
679 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
680 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
684 0x32, 0x31, 0x30, 0x2f, 0x2e, 0x2d, 0x2c, 0x2b, 0x2a, 0x2a,
685 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x24, 0x23, 0x22, 0x21,
686 0x21, 0x20, 0x1f, 0x1e, 0x1e, 0x1d, 0x1c, 0x1c, 0x1b, 0x1a,
687 0x1a, 0x19, 0x19, 0x18, 0x18, 0x17, 0x16, 0x16, 0x15, 0x15,
688 0x14, 0x14, 0x13, 0x13, 0x13, 0x12, 0x12, 0x11, 0x11, 0x10,
689 0x10, 0x10, 0x0f, 0x0f, 0x0f, 0x0e, 0x0e, 0x0e, 0x0d, 0x0d,
690 0x0d, 0x0c, 0x0c, 0x0c, 0x0b, 0x0b, 0x0b, 0x0b, 0x0a, 0x0a,
691 0x0a, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x08, 0x08, 0x08,
692 0x08, 0x08, 0x07, 0x07, 0x07, 0x07, 0x07, 0x06, 0x06, 0x06,
693 0x06, 0x06, 0x06, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
694 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03,
695 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01,
696 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00
700 0x7f, 0x6c, 0x62, 0x5a, 0x54, 0x50, 0x4b, 0x48, 0x45, 0x42,
701 0x40, 0x3d, 0x3b, 0x39, 0x38, 0x36, 0x34, 0x33, 0x31, 0x30,
702 0x2f, 0x2d, 0x2c, 0x2b, 0x2a, 0x29, 0x28, 0x27, 0x26, 0x25,
703 0x24, 0x24, 0x23, 0x22, 0x21, 0x21, 0x20, 0x1f, 0x1e, 0x1e,
704 0x1d, 0x1d, 0x1c, 0x1b, 0x1b, 0x1a, 0x1a, 0x19, 0x18, 0x18,
705 0x17, 0x17, 0x16, 0x16, 0x15, 0x15, 0x15, 0x14, 0x14, 0x13,
706 0x13, 0x12, 0x12, 0x11, 0x11, 0x11, 0x10, 0x10, 0x0f, 0x0f,
707 0x0f, 0x0e, 0x0e, 0x0e, 0x0d, 0x0d, 0x0d, 0x0c, 0x0c, 0x0c,
708 0x0b, 0x0b, 0x0b, 0x0a, 0x0a, 0x0a, 0x09, 0x09, 0x09, 0x09,
709 0x08, 0x08, 0x08, 0x07, 0x07, 0x07, 0x07, 0x06, 0x06, 0x06,
710 0x06, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03,
711 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
712 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
729 LIMITVALUE(expression_vol, 0, 127);
731 /* 0 - 127 */
736 LIMITVALUE(vol, 0, 127);
743 LIMITVALUE(main_vol, 0, 127);
748 vol += ((0x100 - vol) * expressiontab[expression_vol])/128;
752 LIMITVALUE(master_vol, 0, 127);
763 LIMITVALUE(vol, 0, 255);
765 return 0; /* value unchanged */
769 && LO_BYTE(vp->reg.parm.volatkhld) < 0x7d) {
775 vp->acutoff = (atten * vp->reg.parm.cutoff + 0xa0) >> 7;
786 * 0xE000 is no pitch offset at 44100Hz sample.
797 if (vp->reg.fixkey >= 0) {
804 if (chan->midi_pitchbend != 0) {
826 /* 0xe000: root pitch */
827 offset += 0xe000 + vp->reg.rate_offset;
830 LIMITVALUE(offset, 0, 0xffff);
832 return 0; /* unchanged */
901 for (i = 0; i < emu->max_voices; i++) {
907 vp->time = 0;