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 36fd799 commit cb94719Copy full SHA for cb94719
libraries/I2S/src/I2S.cpp
@@ -194,6 +194,11 @@ int I2SClass::read()
194
195
read(&sample, _bitsPerSample / 8);
196
197
+ if (_bitsPerSample == 16 && (sample & 0x8000)) {
198
+ // sign extend value
199
+ sample |= 0xffff0000;
200
+ }
201
+
202
return sample;
203
}
204
@@ -212,6 +217,11 @@ int I2SClass::peek()
212
217
__enable_irq();
213
218
214
219
220
221
222
223
224
215
225
216
226
227
0 commit comments