Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Audio via I2S

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.

Parents Reply Children
No Data
Related