Announcement

Collapse
No announcement yet.

How to read an audio file from SD CARD ?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to read an audio file from SD CARD ?

    Dear technical support,
    How I can read an audio file from my SD card on my PICADILLO ? Have you any examples ?
    Regards,
    Ludok34

  • #2
    That depends on the type of audio file.

    There is the PWMAudio library (https://github.com/MajenkoLibraries/PWMAudio) which plays 16-bit little-endian RAW audio from memory. There isn't currently a library as such for playing directly from SD, but you can read from the SD card and place the data into an in-memory buffer (as long as it's only a little auto clip) to play.

    I have some old code for a different chip (dsPIC33) which reads WAV files and plays them off SD but of course that won't operate on a Picadillo. I have been meaning to port it to the PIC32 chips, but it's pretty low down my list of things to do.

    Feel free to pull apart the PWMAudio library to see how to generate the actual audio and write your own interface to it for streaming data direct from the SD card.

    Comment

    Working...
    X