This relates to playing audio files over i2s.
So far I have managed to replay audio files using the method suggested in the SDK i2s example files - basically sending one block of audio data after another. What bothers me is the "end of file" conditions, at the moment I need to send one extra empty block. The i2s example also doesn't properly consider "end of file"...
Does anyone have an idea how to stop a i2s transaction once all data is output?
Example:
- assume block (buffer size) is 128 bytes
- assume audio file is 10000 bytes
- -> one needs to send 79 blocks
How can I terminate i2s after 78 blocks and 16 bytes?
How can I terminate i2s from within data_handler ()?
Any help / ideas are greatly appreciated
M.