adafruit / Adafruit_NeoTrellisM4

Example sketches for the NeoTrellis M4 board
51 stars 34 forks source link

sixteen_step_sequencer AudioStream.h: No such file or directory #21

Closed slootsky closed 5 years ago

slootsky commented 5 years ago

When I'm atempting to compile sixteen_step_sequencer, I'm getting the error AudioStream.h: No such file or directory I don't see an audiostream library available in libraries.

I see that this is available in core/teensy3 - should I be getting them from there?

Thanks!

ladyada commented 5 years ago

see https://learn.adafruit.com/adafruit-neotrellis-m4/arduino-libraries

slootsky commented 5 years ago

Thank you!

I'm not finding the adafruit QSPI library in the library manager. (but I was able to find the rest)

Is it something I'm likely doing wrong?

ladyada commented 5 years ago

oops that ones deprecated, ya dont need it

slootsky commented 5 years ago

okay, cool.

In sampler.cpp and recorder.cpp, line 11 includes it and line 12 has an extern reference for it.

11: #include "Adafruit_QSPI_GD25Q.h" 12: Adafruit_QSPI_GD25Q flash;

if I comment those lines out in both files, then I get the following errors.
(looks like there are some #defines missing)

In file included from `C:\Users\slootsky\AppData\Local\Temp\arduino_build_967743\sketch\sampler.cpp:9:0:`

C:\Users\slootsky\AppData\Local\Temp\arduino_build_967743\sketch\sampler.cpp: In member function 'void Sampler::playSound(uint8_t)':

recorder.h:14:23: error: 'W25Q16BV_BLOCKSIZE' was not declared in this scope

 #define REC_FILESIZE (W25Q16BV_BLOCKSIZE*REC_BLOCKS_PER_FILE)

                       ^

C:\Users\slootsky\AppData\Local\Temp\arduino_build_967743\sketch\sampler.cpp:130:24: note: in expansion of macro 'REC_FILESIZE'

   recordings[num].play(REC_FILESIZE*num);

                        ^

C:\Users\slootsky\AppData\Local\Temp\arduino_build_967743\sketch\sampler.cpp: In member function 'void AudioPlayQspiRaw::play(uint32_t)':

sampler.cpp:137:2: error: 'flash' was not declared in this scope

  flash.readMemory(addr, (byte*)&length, sizeof(uint32_t), false);

  ^

sampler.cpp:139:17: error: 'W25Q16BV_SECTORSIZE' was not declared in this scope

  _addr = addr + W25Q16BV_SECTORSIZE;

                 ^

C:\Users\slootsky\AppData\Local\Temp\arduino_build_967743\sketch\sampler.cpp: In member function 'virtual void AudioPlayQspiRaw::update()':

sampler.cpp:161:3: error: 'flash' was not declared in this scope

   flash.readMemory(_addr, (uint8_t *)out, AUDIO_BLOCK_SAMPLES*2, false);

   ^

Multiple libraries were found for "Audio.h"
 Used: C:\Users\slootsky\Documents\Arduino\libraries\Audio-master
 Not used: C:\Users\slootsky\Documents\Arduino\libraries\Audio
Multiple libraries were found for "Wire.h"
 Used: C:\Users\slootsky\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.5.2\libraries\Wire
 Not used: C:\Users\slootsky\Documents\Arduino\libraries\Wire
C:\Users\slootsky\AppData\Local\Temp\arduino_build_967743\sketch\recorder.cpp: In member function 'void Recorder::begin()':

recorder.cpp:20:8: error: 'flash' was not declared in this scope

   if (!flash.begin()){

        ^

C:\Users\slootsky\AppData\Local\Temp\arduino_build_967743\sketch\recorder.cpp: In member function 'void Recorder::startRecording(uint8_t)':

recorder.cpp:32:2: error: 'flash' was not declared in this scope

  flash.eraseBlock(BLOCK(slot*REC_FILESIZE));

  ^

In file included from C:\Users\slootsky\AppData\Local\Temp\arduino_build_967743\sketch\recorder.cpp:9:0:

recorder.h:14:23: error: 'W25Q16BV_BLOCKSIZE' was not declared in this scope

 #define REC_FILESIZE (W25Q16BV_BLOCKSIZE*REC_BLOCKS_PER_FILE)

                       ^

C:\Users\slootsky\AppData\Local\Temp\arduino_build_967743\sketch\recorder.h:16:26: note: in definition of macro 'BLOCK'

 #define BLOCK(x) ((int)((x)/W25Q16BV_BLOCKSIZE))

                          ^

C:\Users\slootsky\AppData\Local\Temp\arduino_build_967743\sketch\recorder.cpp:32:30: note: in expansion of macro 'REC_FILESIZE'

  flash.eraseBlock(BLOCK(slot*REC_FILESIZE));

                              ^

recorder.cpp:33:37: error: 'W25Q16BV_SECTORSIZE' was not declared in this scope

  _currentAddr = REC_FILESIZE*slot + W25Q16BV_SECTORSIZE;

                                     ^

In file included from C:\Users\slootsky\AppData\Local\Temp\arduino_build_967743\sketch\recorder.cpp:9:0:

C:\Users\slootsky\AppData\Local\Temp\arduino_build_967743\sketch\recorder.cpp: In member function 'void Recorder::stopRecording()':

recorder.h:14:23: error: 'W25Q16BV_BLOCKSIZE' was not declared in this scope

 #define REC_FILESIZE (W25Q16BV_BLOCKSIZE*REC_BLOCKS_PER_FILE)

                       ^

C:\Users\slootsky\AppData\Local\Temp\arduino_build_967743\sketch\recorder.cpp:44:22: note: in expansion of macro 'REC_FILESIZE'

      if(_totalSize < REC_FILESIZE - W25Q16BV_SECTORSIZE){

                      ^

recorder.cpp:44:37: error: 'W25Q16BV_SECTORSIZE' was not declared in this scope

      if(_totalSize < REC_FILESIZE - W25Q16BV_SECTORSIZE){

                                     ^

recorder.cpp:45:5: error: 'flash' was not declared in this scope

     flash.writeMemory(_currentAddr, (byte*)queue1.readBuffer(), AUDIO_BLOCK_SAMPLES*2);

     ^

recorder.cpp:57:5: error: 'flash' was not declared in this scope

     flash.eraseSector(SECTOR(REC_FILESIZE*_slot));

     ^

In file included from C:\Users\slootsky\AppData\Local\Temp\arduino_build_967743\sketch\recorder.cpp:9:0:

recorder.h:14:23: error: 'W25Q16BV_BLOCKSIZE' was not declared in this scope

 #define REC_FILESIZE (W25Q16BV_BLOCKSIZE*REC_BLOCKS_PER_FILE)

                       ^

C:\Users\slootsky\AppData\Local\Temp\arduino_build_967743\sketch\recorder.h:15:27: note: in definition of macro 'SECTOR'

 #define SECTOR(x) ((int)((x)/W25Q16BV_SECTORSIZE))

                           ^

C:\Users\slootsky\AppData\Local\Temp\arduino_build_967743\sketch\recorder.cpp:57:30: note: in expansion of macro 'REC_FILESIZE'

     flash.eraseSector(SECTOR(REC_FILESIZE*_slot));

                              ^

recorder.h:15:30: error: 'W25Q16BV_SECTORSIZE' was not declared in this scope

 #define SECTOR(x) ((int)((x)/W25Q16BV_SECTORSIZE))

                              ^

C:\Users\slootsky\AppData\Local\Temp\arduino_build_967743\sketch\recorder.cpp:57:23: note: in expansion of macro 'SECTOR'

     flash.eraseSector(SECTOR(REC_FILESIZE*_slot));

                       ^

C:\Users\slootsky\AppData\Local\Temp\arduino_build_967743\sketch\recorder.cpp: In member function 'void Recorder::continueRecording()':

recorder.h:14:23: error: 'W25Q16BV_BLOCKSIZE' was not declared in this scope

 #define REC_FILESIZE (W25Q16BV_BLOCKSIZE*REC_BLOCKS_PER_FILE)

                       ^

C:\Users\slootsky\AppData\Local\Temp\arduino_build_967743\sketch\recorder.cpp:65:18: note: in expansion of macro 'REC_FILESIZE'

  if(_totalSize < REC_FILESIZE - W25Q16BV_SECTORSIZE){

                  ^

recorder.cpp:65:33: error: 'W25Q16BV_SECTORSIZE' was not declared in this scope

  if(_totalSize < REC_FILESIZE - W25Q16BV_SECTORSIZE){

                                 ^

recorder.cpp:67:3: error: 'flash' was not declared in this scope

   flash.writeMemory(_currentAddr, (byte*)queue1.readBuffer(), AUDIO_BLOCK_SAMPLES*2);

   ^
ladyada commented 5 years ago

i bumped the version to 1.2.0 - when the library manager picks it up in ~1 hr, plz update this library :)

slootsky commented 5 years ago

awesome! that got it compiling! Thank you so much.