| 312 | } |
| 313 | |
| 314 | void Rjp1::modulatePeriod(Rjp1Channel *channel) { |
| 315 | if (channel->modulatePeriodData) { |
| 316 | uint32 per = channel->modulatePeriodIndex; |
| 317 | int period = (channel->modulatePeriodData[per] * channel->modulatePeriodInit) / 128; |
| 318 | period = -period; |
| 319 | if (period < 0) { |
| 320 | period /= 2; |
| 321 | } |
| 322 | channel->modulatePeriodNext = period + channel->modulatePeriodInit; |
| 323 | ++per; |
| 324 | if (per == channel->modulatePeriodLimit) { |
| 325 | per = channel->modulatePeriodBase * 2; |
| 326 | } |
| 327 | channel->modulatePeriodIndex = per; |
| 328 | } |
| 329 | if (channel->freqStep != 0) { |
| 330 | channel->freqInit += channel->freqInc; |
| 331 | --channel->freqStep; |
| 332 | } |
| 333 | setChannelPeriod(channel - _channelsTable, channel->freqInit + channel->modulatePeriodNext); |
| 334 | } |
| 335 | |
| 336 | void Rjp1::setupNote(Rjp1Channel *channel, int16 period) { |
| 337 | const uint8 *note = channel->noteData; |
nothing calls this directly
no outgoing calls
no test coverage detected