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 5365759 commit 2affe3aCopy full SHA for 2affe3a
source/SoundOutputPin.cpp
@@ -190,6 +190,8 @@ void SoundOutputPin::update()
190
*/
191
void SoundOutputPin::updateOutputBuffer(bool all)
192
{
193
+ target_disable_irq();
194
+
195
uint8_t *bufferEnd = outputBuffer.getBytes() + outputBuffer.length();
196
uint8_t *endPosition = all ? bufferEnd : outputBuffer.getBytes() + min(outputBuffer.length(), (int) ((1000.0f / SOUND_OUTPUT_PIN_SAMPLE_RATE) * (timeOfLastUpdate - timeOfLastPull)));
197
@@ -229,6 +231,8 @@ void SoundOutputPin::updateOutputBuffer(bool all)
229
231
// Snapshot the current sound parameters in case they are changed in flight
230
232
_periodUs = periodUs;
233
_value = value;
234
235
+ target_enable_irq();
236
}
237
238
/**
0 commit comments