Compilation Error After Updating Library #1459
-
After updating the "arduino-audio-tools" library, a number of arduino programs that would normally compile don't anymore. One common use case that I like to implement is to organize the byte arrays data structures into MemoryStream array for easy lookup and playback of audio tracks. As an example of my problem, here is the example code provided for reading a byte stream on the flash memory:
When I attempt to compile this code with the musicArray data structure instead of the original music MemoryStream object, here is the error output:
Is there something that would need to be changed to adapt my code around the library updates? If that isn't the case would there be another way to organize MemoryStream data structures into a sort-of "lookup table"? Thank you in advance, this library has been super helpful in easily adding audio to ESP32 projects. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I committed a correction. I removed the copy and move constructors because there was a risk of some inconsistent memory and I thought it would not be needed. I have added the proper implementations now that should cover the different cases.. |
Beta Was this translation helpful? Give feedback.
-
Sorry to revive the thread, but after updating the library the code does compile, but now it seems to throw an error if I wrap a memorystream in an array. This fragment will not throw a runtime error :
vs. this toy example for wrapping a MemoryStream in an array:
When I upload the code to an actual esp32, it seems to throw a particular error:
Would this have something to do with the copying of the bytearray? |
Beta Was this translation helpful? Give feedback.
-
I think it needs to be MemoryStream musicArray[] = {MemoryStream(englishBriefingAudio, englishBriefingAudioLength)}; |
Beta Was this translation helpful? Give feedback.
I committed a correction. I removed the copy and move constructors because there was a risk of some inconsistent memory and I thought it would not be needed. I have added the proper implementations now that should cover the different cases..