From 4cb1d491eb51a31e79ea60d9aa75cc8cdcb5d991 Mon Sep 17 00:00:00 2001 From: jorgenkraghjakobsen Date: Sat, 13 Jun 2020 22:08:10 +0200 Subject: [PATCH] wip --- components/dsp_processor/dsp_processor.c | 6 +++++- main/main.c | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/components/dsp_processor/dsp_processor.c b/components/dsp_processor/dsp_processor.c index 7763b9c..b9609fe 100644 --- a/components/dsp_processor/dsp_processor.c +++ b/components/dsp_processor/dsp_processor.c @@ -197,7 +197,11 @@ static void dsp_i2s_task_handler(void *arg) dsp_audio[i*4+2] = (valint[1] & 0xff); dsp_audio[i*4+3] = ((valint[1] & 0xff00)>>8); } - i2s_write_expand(0, (char*)dsp_audio, chunk_size,16,32, &bytes_written, portMAX_DELAY); + if (bits_per_sample == 16) { + i2s_write(0,(char*)audio, chunk_size, &bytes_written, portMAX_DELAY); + } else + { i2s_write_expand(0, (char*)audio, chunk_size,16,32, &bytes_written, portMAX_DELAY); + } } break; diff --git a/main/main.c b/main/main.c index d87b26e..e4cf9b5 100644 --- a/main/main.c +++ b/main/main.c @@ -17,7 +17,6 @@ //ESP-IDF stuff #include "board.h" -//#include "audio_element.h" #include "es8388.h"