From 4c8cc0a591fc698c8b7cd93944d7813dfae96f96 Mon Sep 17 00:00:00 2001 From: h3ndrik Date: Fri, 3 Aug 2018 17:01:57 +0200 Subject: [PATCH] replace esp32s i2s_push_sample() (#116) as it is deprecated and changed behaviour between esp-idf v2.0 and v3.0. this fixes the chipmunks in #110 and #105 --- src/AudioOutputI2S.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AudioOutputI2S.cpp b/src/AudioOutputI2S.cpp index 93bfe2e..0611a09 100644 --- a/src/AudioOutputI2S.cpp +++ b/src/AudioOutputI2S.cpp @@ -188,7 +188,7 @@ bool AudioOutputI2S::ConsumeSample(int16_t sample[2]) } else { s32 = ((Amplify(ms[RIGHTCHANNEL]))<<16) | (Amplify(ms[LEFTCHANNEL]) & 0xffff); } - return i2s_push_sample((i2s_port_t)portNo, (const char *)&s32, 0); + return i2s_write_bytes((i2s_port_t)portNo, (const char*)&s32, sizeof(uint32_t), 0); #else uint32_t s32 = ((Amplify(ms[RIGHTCHANNEL]))<<16) | (Amplify(ms[LEFTCHANNEL]) & 0xffff); return i2s_write_sample_nb(s32); // If we can't store it, return false. OTW true