diff --git a/32blit-pico/board/vgaboard/config.cmake b/32blit-pico/board/vgaboard/config.cmake index 4dea17220..7b3463b50 100644 --- a/32blit-pico/board/vgaboard/config.cmake +++ b/32blit-pico/board/vgaboard/config.cmake @@ -1,6 +1,7 @@ set(BLIT_BOARD_NAME "VGA Board") set(BLIT_BOARD_DEFINITIONS + PICO_AUDIO_I2S_BUFFER_SAMPLE_LENGTH=256 PICO_SCANVIDEO_PLANE1_VARIABLE_FRAGMENT_DMA=1 PICO_SCANVIDEO_MAX_SCANLINE_BUFFER_WORDS=12 ) diff --git a/32blit-pico/display_scanvideo.cpp b/32blit-pico/display_scanvideo.cpp index 00982028d..f2ddf5878 100644 --- a/32blit-pico/display_scanvideo.cpp +++ b/32blit-pico/display_scanvideo.cpp @@ -13,9 +13,6 @@ static volatile int buf_index = 0; static volatile bool do_render = true; -// user render function -void render(uint32_t); - static bool do_render_soon = false; // slightly delayed to handle the queue static void fill_scanline_buffer(struct scanvideo_scanline_buffer *buffer) { diff --git a/32blit-pico/main.cpp b/32blit-pico/main.cpp index e744fce85..018ec44b4 100644 --- a/32blit-pico/main.cpp +++ b/32blit-pico/main.cpp @@ -32,7 +32,9 @@ static uint32_t random() { } static void debug(const char *message) { - fputs(message, stdout); + auto p = message; + while(*p) + putchar(*p++); usb_debug(message); } diff --git a/32blit-sdl/Audio.cpp b/32blit-sdl/Audio.cpp index 49ff6b6f5..38dab6702 100644 --- a/32blit-sdl/Audio.cpp +++ b/32blit-sdl/Audio.cpp @@ -9,6 +9,8 @@ blit::AudioChannel channels[CHANNEL_COUNT]; +static void _audio_callback(void *userdata, uint8_t *stream, int len); + Audio::Audio() { blit::api.channels = channels; @@ -35,7 +37,7 @@ Audio::~Audio() { SDL_CloseAudioDevice(audio_device); } -void _audio_bufferfill(short *buffer, int buffer_size){ +static void _audio_bufferfill(short *buffer, int buffer_size){ memset(buffer, 0, buffer_size); for(auto sample = 0; sample < buffer_size; sample++){ @@ -43,6 +45,6 @@ void _audio_bufferfill(short *buffer, int buffer_size){ } } -void _audio_callback(void *userdata, uint8_t *stream, int len){ +static void _audio_callback(void *userdata, uint8_t *stream, int len){ _audio_bufferfill((short *)stream, len / 2); } diff --git a/32blit-sdl/Audio.hpp b/32blit-sdl/Audio.hpp index 9efed2e26..0f01037fe 100644 --- a/32blit-sdl/Audio.hpp +++ b/32blit-sdl/Audio.hpp @@ -8,6 +8,3 @@ class Audio { SDL_AudioDeviceID audio_device; }; - -void _audio_bufferfill(short *pBuffer, int pBufferSize); -void _audio_callback(void *userdata, uint8_t *stream, int len);