Suggestion: AudioMemory(x)

Frank B

Senior Member
Form time to time, but regulary, poeple use too low numbers for AudioMemory().
Is it possible to modify the GUI-Tool to add a line "#define _AudioMem xy" to the output ? It could be calculated from the number of objects (plus a reserve , perhaps?).
The sketch can use it in setup: AudioMemory(_AudioMem);
 
Taking your idea further, I always thought it odd that the GUI Tool doesn't also create a basic setup() routine to do all of the audio-required setup things...such as the AudioMemory command. By not including a default setup(), a new user has to know to go lookup what the minimum required setup commands are. That's a hurdle that is easily removed simply by including a default setup() as part of the GUI Tool output.

In addition to the AudioMemory command, the setup() should include the basic setup commands for the SGTL5000 object, if it is included in the project. You know, like the SGTL5000.enable() command. Seems like the perfect thing to include as part of the GUI-generated code.

Chip
 
Is it possible to modify the GUI-Tool to add a line "#define _AudioMem xy" to the output ?

Yes, but it's complicated. Some time ago I wrote a lengthy message about the details and some ideas about adding usage estimates to the metadata for each object.

Higher on my wish list for the design tool is metadata to indicate hardware resource usage, where dragging additional objects that conflict with already-placed ones would be disallowed and a (hopefully well written) message would appear.
 
Yes, but it's complicated. Some time ago I wrote a lengthy message about the details and some ideas about adding usage estimates to the metadata for each object.

Higher on my wish list for the design tool is metadata to indicate hardware resource usage, where dragging additional objects that conflict with already-placed ones would be disallowed and a (hopefully well written) message would appear.

Yes, that would be great, too.

The audio-lib is really great. We (DD4WH and me) needed a few days, not even a week, to create a long-wave direct conversion receiver with decoding of the German 77.5kHz time-signal - with audio-lib std-components + audioshield only (with sampling @ 176.4 or 192 kHz).
 
Last edited:
...
Higher on my wish list for the design tool is metadata to indicate hardware resource usage, where dragging additional objects that conflict with already-placed ones would be disallowed and a (hopefully well written) message would appear.

If you have a list of known conflicts on a linkable info comment and get the metadata to detect it your 'well written message' could just be a link to the conflict info comment with a note on the conflicting point by the metadata 'name'?
 
Back
Top