- /* Scale sample value by the velocity of the channel */\r
- TableValue = ((uint16_t)TableValue << 6) / ChannelStates[Channel].Velocity;\r
- \r
- /* Add the sample to the output waveform */\r
- OutputSample += TableValue;\r
- }\r
- \r
- /* Calculate next sample table position for this channel */\r
- ChannelStates[Channel].CurrentPos += ChannelStates[Channel].Pitch;\r
- }\r
- \r
- /* Output the sample to the PWM timer */\r
- OCR3A = OutputSample;\r