|
|
| version 1.13, 2011/01/15 14:15:21 | version 1.14, 2011/02/04 14:43:55 |
|---|---|
| Line 54 void opngen_initialize(UINT rate) { | Line 54 void opngen_initialize(UINT rate) { |
| UINT ratebit; | UINT ratebit; |
| int i; | int i; |
| char sft; | |
| int j; | int j; |
| double pom; | double pom; |
| long detune; | |
| double freq; | double freq; |
| UINT32 calcrate; | UINT32 calcrate; |
| Line 73 void opngen_initialize(UINT rate) { | Line 75 void opngen_initialize(UINT rate) { |
| for (i=0; i<EVC_ENT; i++) { | for (i=0; i<EVC_ENT; i++) { |
| #ifdef OPNGENX86 | #ifdef OPNGENX86 |
| char sft; | |
| sft = ENVTBL_BIT; | sft = ENVTBL_BIT; |
| while(sft < (ENVTBL_BIT + 8)) { | while(sft < (ENVTBL_BIT + 8)) { |
| pom = (double)(1 << sft) / pow(10.0, EG_STEP*(EVC_ENT-i)/20.0); | pom = (double)(1 << sft) / pow(10.0, EG_STEP*(EVC_ENT-i)/20.0); |
| Line 133 void opngen_initialize(UINT rate) { | Line 134 void opngen_initialize(UINT rate) { |
| for (i=0; i<4; i++) { | for (i=0; i<4; i++) { |
| for (j=0; j<32; j++) { | for (j=0; j<32; j++) { |
| #if (FREQ_BITS >= 21) | detune = dttable[i*32 + j]; |
| freq = FREQBASE4096 * dttable[i*32 + j] * | sft = ratebit + (FREQ_BITS - 21); |
| (1 << (FREQ_BITS-21)); | if (sft >= 0) { |
| #else | detune <<= sft; |
| freq = FREQBASE4096 * dttable[i*32 + j] / | } |
| (1 << (21-FREQ_BITS)); | else { |
| #endif | detune >>= (0 - sft); |
| detunetable[i][j] = (long)freq; | } |
| detunetable[i+4][j] = (long)-freq; | |
| detunetable[i][j] = detune; | |
| detunetable[i+4][j] = -detune; | |
| } | } |
| } | } |
| for (i=0; i<4; i++) { | for (i=0; i<4; i++) { |