|
|
| version 1.8, 2003/12/08 00:55:33 | version 1.9, 2004/02/03 08:24:40 |
|---|---|
| Line 52 static const int fmslot[4] = {0, 2, 1, 3 | Line 52 static const int fmslot[4] = {0, 2, 1, 3 |
| void opngen_initialize(UINT rate) { | void opngen_initialize(UINT rate) { |
| UINT ratebit; | |
| int i; | int i; |
| int j; | int j; |
| double pom; | double pom; |
| double freq; | double freq; |
| UINT32 calcrate; | UINT32 calcrate; |
| calcrate = rate * 55466 / 44100; | if (rate == 44100) { |
| ratebit = 0; | |
| opncfg.calc1024 = FMDIV_ENT * 44100 / 55466; | } |
| else if (rate == 22050) { | |
| ratebit = 1; | |
| } | |
| else { | |
| ratebit = 2; | |
| } | |
| calcrate = (OPNA_CLOCK / 72) >> ratebit; | |
| opncfg.calc1024 = FMDIV_ENT * 44100 / (OPNA_CLOCK / 72); | |
| for (i=0; i<EVC_ENT; i++) { | for (i=0; i<EVC_ENT; i++) { |
| #ifdef OPNGENX86 | #ifdef OPNGENX86 |