playing a sound more than once #724
-
In streams-memory_raw-i2s you should playing a raw file from memory, with most of the constuctors at the global level. Once the copier.copy has finished playing/streaming the sound, how do I 'requeue' it for playing again ? i.e. the sort of use case where a button press plays a sound every time. I've had a look through the examples, wifi and discussions, but I'm drawing a blank. Sorry if this is something very simply. I need the copier object at global level so it can be repeatedly called in the loop, but it seems that once it's did a 'copy' that is it.. so I need a new copier object ? Is there any chance someone could put a simple modified example here based on streams-memory_raw-i2s, but which plays the sound in a loop ? and or each time a function is called ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
You should not look in the examples but in the class documentation. Hint: There is a easy solution where you can request the object to loop or a more difficult one where you restart when it is finished... |
Beta Was this translation helpful? Give feedback.
You should not look in the examples but in the class documentation.
Hint: There is a easy solution where you can request the object to loop or a more difficult one where you restart when it is finished...