adamish / pxt-billy

A text to speech extension for Micro:bit using Makecode
MIT License
6 stars 2 forks source link

Crash after repeated use #1

Closed adamish closed 1 year ago

adamish commented 1 year ago

Crashed with 020 :( after the following

music.setBuiltInSpeakerEnabled(false)

for (let i = 0; i < 200; i++) {
    if (i % 10 == 0) {
           basic.showNumber(i)
    }
    billy.say("Hello")
}
adamish commented 1 year ago

https://support.microbit.org/support/solutions/articles/19000016969-micro-bit-error-codes says 020 is out of memory.

adamish commented 1 year ago

Issue appears to be that the addChannel() was being called repeatedly, Resolved by addChannel into the lazy init for sampleSource

adamish commented 1 year ago

Repeated test case above, now passes. Tagged as 0.0.21.

https://github.com/adamish/pxt-billy/pull/2

adamish commented 1 year ago

Closing