Hello,
I decided to write this topic after passing few hours to try to get info on this forum and other sources on Internet without success.
Hope this help people having the same issue than myself and not formed about programming issues (or total newbies about programming).
I wrote my debug process if you're interested...
Context :
- You bought the Make your Uno Kit
- You processed the soldering exercises, your Arduino Uno passed the tests as well as the synth Board with the first Test sketch (Link >> Testing The Synth Shield/Test Sketch)
- Now, you want to process the Advanced sketch using the Mozzi library. You installed it using the library manager and copy/paste the code provided by the "Make your Uno" Tutorial, but you get a compilation error on the Arduino IDE :
'AudioOutput_t' does not name a type
AudioOutput_t updateAudio(){
exit status 1
Compilation error: 'AudioOutput_t' does not name a type
Resolving the issue
If you have the above compilation error :
- verify you installed the latest version of the Mozzi librarie !! (at this time it's v.1.1.1) if not, update it in Arduino IDE.
- try to compile again : Success !!
- To the Arduino team : in the Mozzi installation image, it's very confusing because the installed version is writen with a very small font whereas the first (not installed) version is writen with a big font. Easy to make a mistake about it. A "version requirements" would be appreciated when using a external librarie (for your tutorial update).
Debug
Well, the compilation error means that the IDE compiler doesn't know 'AudioOutput_t' as a type (well, yeah, i'm paraphrasing ).
I looked at the beginning of the Mozzi code : 'AudioOutput_t' wasn't defined at all, whereas I could find other variables definitions for 'AutoMap.h', 'Smooth.h' and 'tables/cos2048_int8.h', along with some other variables definitions.
But it didn't mean that a type should be defined at this place as there were just variables at the moment in the code.
As it was writen, it seemed that the code meant to redefine an already existing method attached to the 'AudioOutput_t' type.
So the issue could come directly from the Mozzi library installation folder.
I opened it (C:/Users/user/.../ARDUINO/libraries/Mozzi in my case) : in the Mozzi root folder, I found 'MozziGuts.h', 'Oscil.h', 'Smooth.h' and 'AutoMap.h',..., but no files named 'AudioOutput_t' type (...and no 'tables/cos2048_int8.h' file, but I didn't have an error about it so I didn't care much). And nothing in the subfolders either.
And then, I realized that I installed the first available version of Mozzi (1.0.3), not the latest (1.1.1). The "Make your Uno advanced test" tutorial was maybe writen for the latest Mozzi versions ?
So I came back to the IDE and installed the 1.1.1 version and the compiling process as well as the upload to the Arduino worked perfectly !!
Tested successfuly with the 1.1.0 version of Mozzi library as well.
With the update, new files appeared int the Mozzi folder and among them 'AudioOutput.h' (which is not included as the other files at the beginning of the code but I don't know why)