Skip to content

Commit 8530747

Browse files
authored
Merge pull request arduino#201 from pennam/pdm_fix
PDM fix
2 parents 6d2350e + 84d787d commit 8530747

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/PDM/src/stm32/PDM.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ int PDMClass::begin(int channels, int sampleRate) {
8080
g_pcmbuf = (uint16_t*)_doubleBuffer.data();
8181
_doubleBuffer.swap(0);
8282

83-
if(py_audio_init(channels, sampleRate, gain_db, 0.9883f)) {
83+
if(py_audio_init(channels, sampleRate, _gain, 0.9883f)) {
8484
py_audio_start_streaming();
8585
_init = 1;
8686
return 1;
@@ -164,7 +164,7 @@ void PDMsetBufferSize(int size) {
164164
}
165165

166166
size_t PDMgetBufferSize() {
167-
return _instance.getBufferSize();
167+
return _instance->getBufferSize();
168168
}
169169
}
170170

0 commit comments

Comments
 (0)