We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d11ce67 commit 0577728Copy full SHA for 0577728
libraries/PDM/src/stm32/PDM.cpp
@@ -71,11 +71,11 @@ int PDMClass::begin(int channels, long sampleRate) {
71
72
//g_pcmbuf = (uint16_t*)_doubleBuffer.data();
73
74
- py_audio_init(channels, sampleRate, gain_db, 0.9883f);
75
-
76
- py_audio_start_streaming();
77
78
- return 1;
+ if(py_audio_init(channels, sampleRate, gain_db, 0.9883f)) {
+ py_audio_start_streaming();
+ return 1;
+ }
+ return 0;
79
}
80
81
void PDMClass::end()
@@ -139,4 +139,4 @@ void PDMsetBufferSize(int size) {
139
140
PDMClass PDM(0, 0, 0);
141
142
-#endif
+#endif
0 commit comments