From 28ac10d5938dd1a5f0ba2c36980d6512fa37741d Mon Sep 17 00:00:00 2001 From: Charlie Birks Date: Thu, 13 Jul 2023 16:26:11 +0100 Subject: [PATCH] WIP: pico: run audio on core1 if enabled This probably breaks VGA (need to limit the samples per update) --- 32blit-pico/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/32blit-pico/main.cpp b/32blit-pico/main.cpp index 018ec44b4..6b9122dd1 100644 --- a/32blit-pico/main.cpp +++ b/32blit-pico/main.cpp @@ -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); } } @@ -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); @@ -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();