Skip to content

Commit ca85aca

Browse files
authored
i2s_zero_dma_buffer() in class initialization #626
1 parent e8735f1 commit ca85aca

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/Audio.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
*
66
* Created on: Oct 26.2018
77
*
8-
* Version 3.0.7x
9-
* Updated on: Dec 13.2023
8+
* Version 3.0.7y
9+
* Updated on: Dec 15.2023
1010
* Author: Wolle (schreibfaul1)
1111
*
1212
*/
@@ -230,7 +230,7 @@ Audio::Audio(bool internalDAC /* = false */, uint8_t channelEnabled /* = I2S_SLO
230230
i2s_driver_install((i2s_port_t)m_i2s_num, &m_i2s_config, 0, NULL);
231231
m_f_forceMono = false;
232232
}
233-
i2s_zero_dma_buffer((i2s_port_t) m_i2s_num);
233+
234234
#endif // ESP_IDF_VERSION_MAJOR == 5
235235
for(int i = 0; i < 3; i++) {
236236
m_filter[i].a0 = 1;
@@ -240,6 +240,7 @@ Audio::Audio(bool internalDAC /* = false */, uint8_t channelEnabled /* = I2S_SLO
240240
m_filter[i].b2 = 0;
241241
}
242242
computeLimit(); // first init, vol = 21, vol_steps = 21
243+
i2s_zero_dma_buffer((i2s_port_t) m_i2s_num);
243244
}
244245
//---------------------------------------------------------------------------------------------------------------------
245246
void Audio::setBufsize(int rambuf_sz, int psrambuf_sz) {

src/Audio.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
*
44
* Created on: Oct 28,2018
55
*
6-
* Version 3.0.7x
7-
* Updated on: Dec 13.2023
6+
* Version 3.0.7y
7+
* Updated on: Dec 15.2023
88
* Author: Wolle (schreibfaul1)
99
*/
1010

0 commit comments

Comments
 (0)