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
This commit is contained in:
h3ndrik authored and Earle F. Philhower, III committed 2018-08-03 08:01:57 -07:00
1 parent 88ce6c9476
commit 4c8cc0a591
1 file changed
+1 -1
+1 -1
View File
@@ -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