Commit d112d01
ports/stm: round-to-nearest TIM6 period in audioio
Truncating the divisor biased the realised sample rate slightly fast
(e.g. 84 MHz / 44100 = 1904.76 truncated to 1904 yields 44117.6 Hz,
~0.7 cents sharp). Round to nearest so the rate is always the closest
achievable, not the next one above.
Co-Authored-By: Claude Opus 4.7 <[email protected]>1 parent fcac2fc commit d112d01
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
446 | | - | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
447 | 449 | | |
448 | 450 | | |
449 | 451 | | |
| |||
0 commit comments