Possible Port to STM32/Daisy #9
-
I am interested in extending this port to work with the Daisy (stm32H7) There are no "streams" per se on the daisy. A high priority Audio Callback which passes to the i2s Codec is always available and there is a built in Tick function which counts per sample. My initial thought was that I would need to rewrite ArdStreamOut.h but it is possible I could just take care of that in the audio callback itself. below is a typical callback in Daisy `void AudioCallback(AudioHandle::InputBuffer in, AudioHandle::OutputBuffer out, size_t size)
}` |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
You did not specify what development environement you want to use, so I assume that you want to use DaisyDuino. The far bigger challenge that I see however, is that I replaced the Posix file system commands with a mechanism that takes the sound files from Program Memory and on a STM you will just not have enough! So you you will need to deactivate this in the configuration file and somehow make the file operations work in your environment e.g with an SD card. |
Beta Was this translation helpful? Give feedback.
-
I am sorry, your statement about VS Code does not make any sense. This is a Programming Editor and does not define which API to the processor you will use: You can even do your Arduino (or in your case DaisyDuino) Sketches there. I tried to look at the Daisy Spec but for some strange reason there is no information of how much PROGMEM you have available or about what file API to expect. I guess you need to figure this one out yourself. Though the AudioTools have been written primarily for Arduino, but there is a small compatibility layer that lets it run in any other environment: That's how you can compile your audio sketches on the Desktop! Further information you can find in the Wiki of the AudioTools Project. ps. |
Beta Was this translation helpful? Give feedback.
-
Taking into consideration that both the Daisy API and arduino-stk use floats, you should prefer to write your own small output class based on ArdCommonOut.h |
Beta Was this translation helpful? Give feedback.
You did not specify what development environement you want to use, so I assume that you want to use DaisyDuino.
If so, check out the following discussion
The far bigger challenge that I see however, is that I replaced the Posix file system commands with a mechanism that takes the sound files from Program Memory and on a STM you will just not have enough!
So you you will need to deactivate this in the configuration file and somehow make the file operations work in your environment e.g with an SD card.