Skip to content

Commit

Permalink
WIP: pico: run audio on core1 if enabled
Browse files Browse the repository at this point in the history
This probably breaks VGA (need to limit the samples per update)
  • Loading branch information
Daft-Freak committed Jul 17, 2023
1 parent 475e412 commit 28ac10d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions 32blit-pico/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,11 @@ void core1_main() {
multicore_lockout_victim_init();

init_display_core1();
init_audio();

while(true) {
update_display_core1();
update_audio(::now());
sleep_us(1);
}
}
Expand Down Expand Up @@ -185,7 +187,9 @@ int main() {
init_input();
init_fs();
init_usb();
#if !defined(ENABLE_CORE1)
init_audio();
#endif

#if defined(ENABLE_CORE1)
multicore_launch_core1(core1_main);
Expand All @@ -204,7 +208,9 @@ int main() {
update_display(now);
update_input();
int ms_to_next_update = tick(::now());
#if !defined(ENABLE_CORE1)
update_audio(now);
#endif
update_led();
update_usb();
update_multiplayer();
Expand Down

0 comments on commit 28ac10d

Please sign in to comment.