waveform.startOutput on MDBT42Q seems not to start, any experience out there? #4177
Replies: 1 comment
-
Posted at 2023-04-19 by @fanoush Just a guess - I'd put line 10 with the Posted at 2023-04-19 by @fanoush As for the playback, the example looks STM32 based and loads data from sd card into RAM. With nrf52 internal storage the Posted at 2023-04-19 by @gfwilliams
This is true, but I just tried here and something odd does seem to be going on. If you do repeat:true then it does work. For instance this 'pulses' the LED:
But there's some odd flickering going on right at the start which makes me think maybe the start time is set wrong. I'll see if I can figure out what's up and get back to you Posted at 2023-04-19 by @gfwilliams Ok, just fixed it I think. Try the latest cutting edge build. What was happening was since 2v13 the start time was set wrong (at time=0). After I'd made the timer improvements in 2v13 I did test waveform, but I basically booted the device up so getTime()==0 and checked the waveform almost right away with repeat=true - and in that case it worked. But otherwise it would have failed. I'm pretty surprised this was never found as the Micro:bit 2 build has a 'play' function that would have been affected by this too! ... and @fanoush is right re: Posted at 2023-04-19 by @yerpj Thanks very much @fanoush and @gfwilliams, I followed your advices and it works like a charm! So much fun with Espruino! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-04-18 by @yerpj
I try to play with sounds on my MDBT42Q module. It seems that
w.startOutput
is not doing anything. Any hint? Furthermore, event 'finish' is never emitted.My code is below:
(sound.raw is in internal storage and has been generated following the procedure explained here)
Beta Was this translation helpful? Give feedback.
All reactions