defragster
Senior Member+
@defragster
As I was working on something different I was relooking at the Talkie library. It looks like the latest incarnation of Talkie does a bit of rework to support the Teensies: https://github.com/ArminJo/Talkie. but not the PWM version that we put together. Just a FYI. Most the lib is the same.
Wow - that was "03-26-2016, 05:02 PM" - quite a few updates since then including Teensy.
And the includes the nonBlocking Queue work including the "FIFO_BUFFER_SIZE 24" depth as @defragster wrote it - used the same 'SayQ()' name and added some other Q()'s - though uses real var names better than 'o' and 't':
Updated the PULL requested - includes indicated change to .active() return value.
Modified sample from Adrian (using Prop Shield) to demonstrate usage of .say() and all added methods of "Talkie voice"...
Edits to Talkie.cpp and .h and keywords.txt :: Removed the delay(25) from .say using .sayQ
Called it sayQ() because I added a 24 sound queue managed in the code so not one but 25 sounds can be pushed into a queue for playing sequentially without user attention or delay.
.active() - is **false** on silence, else **returns count** of sounds yet to play
.sayQ() - returns the space left in queue
.sayQ(0) empties the que and stops audio out
.say(0) empties the que and stops audio out
.say() is otherwise 'unchanged' - it will block
Added example of all methods: SayQAcorn.ino
Core Talkie code unchanged, except for cascaded timer to update synthesis data
Just noticed new "GNU General Public License" prior/current code was "released under GPLv2 license."