浏览代码

Merge pull request #215 from FrankBoesing/patch-1

Fix BUG for AUDIO_BLOCK_SAMPLES != 128
dds
Paul Stoffregen 8 年前
父节点
当前提交
d513b7e66a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      output_pwm.cpp

+ 1
- 1
output_pwm.cpp 查看文件

@@ -56,7 +56,7 @@ void AudioOutputPWM::begin(void)
CORE_PIN4_CONFIG = PORT_PCR_MUX(3) | PORT_PCR_DSE | PORT_PCR_SRE;
FTM1_C0V = 120; // range 120 to 375
FTM1_C1V = 0; // range 0 to 255
for (int i=0; i<256; i+=2) {
for (int i=0; i<(AUDIO_BLOCK_SAMPLES*2); i+=2) {
pwm_dma_buffer[i] = 120; // zero must not be used
pwm_dma_buffer[i+1] = 0;
}

正在加载...
取消
保存