Skip to content

Commit dd81542

Browse files
authored
Merge pull request #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

+2-2
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)