Skip to content

Commit dd81542

Browse files
authored
Merge pull request adafruit#10280 from tannewt/fix_audio_buffer_realloc
Fix audio buffer realloc
2 parents 08d964d + 2c179ad commit dd81542

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ports/raspberrypi/audio_dma.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,9 @@ audio_dma_result audio_dma_setup_playback(
248248

249249
if (!single_buffer) {
250250
#ifdef PICO_RP2350
251-
dma->buffer[1] = (uint8_t *)port_realloc(dma->buffer[0], max_buffer_length, true);
251+
dma->buffer[1] = (uint8_t *)port_realloc(dma->buffer[1], max_buffer_length, true);
252252
#else
253-
dma->buffer[1] = (uint8_t *)m_realloc(dma->buffer[0],
253+
dma->buffer[1] = (uint8_t *)m_realloc(dma->buffer[1],
254254
#if MICROPY_MALLOC_USES_ALLOCATED_SIZE
255255
dma->buffer_length[1], // Old size
256256
#endif

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy