LengthFinder to use sound_library

Feeling a bit defeated :frowning: Trying make what seems so simple work.

There’s one call to talkie in the file. I thought it could just be changed to sound_library instead, but there’s types, and declarations and stuff, and I admittedly don’t know how it works.

I tried by adding
#include "../sound/sound_library.h"
to the top, then changed
talkie.SayNumber(led_ + 1);
sound_library_.SayNumber(led_ + 1,SAY_WHOLE);

error says

error: 'SoundQueue' does not name a type
   45 |   SoundQueue<16> sound_queue_;


sound_library.h:47:13: error: 'SoundToPlay' has not been declared
   47 |   void Play(SoundToPlay stp) { sound_queue_.Play(stp); }

Not understanding how it could maybe be declared out of order?

I think the solution is to move SountToPlay and SoundQueue into a new file in sound/ and then include that ile from sound_library.h.

The tougher problem is that including sound_library from length_finder.h will use up some flash memory for some people. (Any prop that doesn’t already use sound_library.h)

ok… if LengthFinder<> is not a used style, then it is not compiled?
And it’s sort of meant as a one time, temporary tool, yes?
Maybe that makes the memory part not such a big deal?

Unfortunately, I don’t think I have the chops to move the parts around as suggested anyway.
Just thought it would be kinda cool to use wavs instead of talkie.

Hmm, it may be true for the sound library itself, but it’s not true for the effects that are in the sound library (mnum and clrlst). However, I have an idea for how to possibly fix that…

1 Like