Hi All,
This is my first post here. I am using MKRZero and AudioZero library to play .wav file from the DAC pin. The example program uses function that plays a particular file from beginning to end. However, I want to play the file from specific time of the file.
Can someone suggest this for SAMD21 boards.
Can I use seek() or peek() function of the SD library in the code?
OK, I got its solution. One has to put file.seek(n), at the beginning of the file.play() function in the source code of the AudioZero library, where n is the number of bytes one wants to start playing, from the beginning.
However, I got another problem. Now I want to interrupt the audio playback whenever I press the keyboard attached with the usb port. I am using the Keyboardcontroller library used for the Arduino Due board. Using this library until the audio file has completed its playback, keypress is not registered.
What I understand is that I will have to use Interrupts associated with the USB port of the Cortex M0+ processor. I am studying that. I the meantime, any help will drastically reduce my work.
I will keep anyone interested updated about my progress.