| 37 | namespace Audio { |
| 38 | |
| 39 | Paula::Paula(bool stereo, int rate, uint32 interruptFreq, FilterMode filterMode, int periodScaleDivisor) : |
| 40 | _stereo(stereo), _rate(rate), _periodScale((double)kPalPaulaClock / (rate * periodScaleDivisor)), _intFreq(interruptFreq) { |
| 41 | |
| 42 | _filterState.mode = filterMode; |
| 43 | _filterState.ledFilter = false; |
| 44 | filterResetState(); |
| 45 | |
| 46 | _filterState.a0[0] = filterCalculateA0(rate, 6200); |
| 47 | _filterState.a0[1] = filterCalculateA0(rate, 20000); |
| 48 | _filterState.a0[2] = filterCalculateA0(rate, 7000); |
| 49 | |
| 50 | clearVoices(); |
| 51 | _voice[0].panning = PANNING_RIGHT; |
| 52 | _voice[1].panning = PANNING_LEFT; |
| 53 | _voice[2].panning = PANNING_LEFT; |
| 54 | _voice[3].panning = PANNING_RIGHT; |
| 55 | |
| 56 | if (_intFreq == 0) |
| 57 | _intFreq = _rate; |
| 58 | |
| 59 | _curInt = 0; |
| 60 | _timerBase = 1; |
| 61 | _playing = false; |
| 62 | _end = true; |
| 63 | volumeMax[0] = 0x40; |
| 64 | volumeMax[1] = 0x40; |
| 65 | volumeMax[2] = 0x40; |
| 66 | volumeMax[3] = 0x40; |
| 67 | } |
| 68 | |
| 69 | Paula::~Paula() { |
| 70 | } |
nothing calls this directly
no outgoing calls
no test coverage detected