From 6dce5594c5899157ea12119ed4d3c00998e0cf00 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 18 Mar 2025 14:06:35 -0500 Subject: [PATCH] show audio buffer next to screen in 512x342 --- src/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.c b/src/main.c index ced093c..16050ce 100644 --- a/src/main.c +++ b/src/main.c @@ -106,6 +106,7 @@ static int umac_cursor_x = 0; static int umac_cursor_y = 0; static int umac_cursor_button = 0; +#define umac_get_audio_offset() (RAM_SIZE - 768) #if USE_PSRAM static void copy_framebuffer() { uint32_t *src = (uint32_t*)(umac_ram + umac_get_fb_offset()); @@ -125,6 +126,11 @@ static void copy_framebuffer() { *dest++ = *src++ ^ 0xfffffffful; } } + uint16_t *src16 = (uint16_t*)(umac_ram + umac_get_audio_offset()); + for(int i=0; i<370; i++) { + uint32_t *dest = umac_framebuffer_mirror + LONGS_PER_OUTPUT_ROW * i; + *dest = *src16++; + } #else #error Unsupported display geometry for framebuffer mirroring #endif