Skip to content

Commit

Permalink
Update MicroPython to fix silent frames issue
Browse files Browse the repository at this point in the history
Remove our workaround
  • Loading branch information
microbit-matt-hillsdon committed May 28, 2024
1 parent b887f22 commit 34e45b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/micropython-microbit-v2
11 changes: 1 addition & 10 deletions src/microbithal_js.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,16 +455,7 @@ void microbit_hal_audio_raw_set_rate(uint32_t sample_rate) {
}

void microbit_hal_audio_raw_write_data(const uint8_t *buf, size_t num_samples) {
bool silence = true;
for (const uint8_t *sample = buf; sample < buf + num_samples; ++sample) {
if (*sample != 128) {
silence = false;
break;
}
}
if (!silence) {
mp_js_hal_audio_write_data(buf, num_samples);
}
mp_js_hal_audio_write_data(buf, num_samples);
}

void microbit_hal_audio_speech_init(uint32_t sample_rate) {
Expand Down

0 comments on commit 34e45b3

Please sign in to comment.