Skip to content

Commit

Permalink
Corrected shifted micro for startMozzi on RP2040
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcombriat authored May 10, 2024
1 parent fc3e0f9 commit 2b0d752
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/MozziGuts_impl_RP2040.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ static void startAudio() {
micros_per_update = 1000000l / MOZZI_AUDIO_RATE;
do {
next_audio_update = make_timeout_time_us(micros_per_update);
next_audio_update_shifted = to_us_since_boot(next_audio_update);
next_audio_update_shifted = to_us_since_boot(next_audio_update) << 8;
// See audioOutputCallback(), above. In _theory_ some interrupt stuff might delay us, here, causing us to miss the first beat (and everything that follows)
} while (hardware_alarm_set_target(audio_update_alarm_num, next_audio_update));

Expand Down

0 comments on commit 2b0d752

Please sign in to comment.