Play wave file from SD card

Post here first, or if you can't find a relevant section!
Post Reply
saeed144
Posts: 15
Joined: Mon Sep 21, 2020 10:11 am

Play wave file from SD card

Post by saeed144 »

Hi everyone
I'm going to make a wave player with my BluePill
BluePill does not have DAC so I have to use PWM
What shoud I do? can anyone help guide me and show the steps?

mrburnette
Posts: 262
Joined: Thu Dec 19, 2019 1:23 am
Answers: 1

Re: Play wave file from SD card

Post by mrburnette »

Not specific to .wav, but old forum had MP3 info:

https://www.google.com/search?q=MP3+sit ... oforum.com

http://stm32duinoforum.com/forum/viewtopic.php?t=243

Also, the massive STM32 thread on Arduino.cc has some posts.
Construct your Google query as:
stm32 + WAV site:forum.arduino.cc

Ray

saeed144
Posts: 15
Joined: Mon Sep 21, 2020 10:11 am

Re: Play wave file from SD card

Post by saeed144 »

Actually I don't want to use any extra module , micro has to decode the wave file , I read the MP3 topic but that's a little bit different abut what I want

mrburnette
Posts: 262
Joined: Thu Dec 19, 2019 1:23 am
Answers: 1

Re: Play wave file from SD card

Post by mrburnette »

AN3126
2.2.3 .WAV file format
The .WAV file format is a subset of the Resource Interchange File Format (RIFF)
specification used for the storage of multimedia files. A RIFF file starts with a file header
followed by a sequence of data chunks. A .WAV file is often just a RIFF file with a single
"WAVE" chunk consisting of two sub-chunks:
1. a fmt chunk, specifying the data format
2. a data chunk, containing the actual sample data.
The WAVE file format starts with the RIFF header: it indicates the file length.
Next, the fmt chunk describes the sample format, it contains information about the format of
the wave audio (PCM / ...), the number of channels (mono/stereo), the sample rate (number
of samples per seconds, e.g. 22050), and the sample data size (e.g. 8 bit / 16 bit). Finally,
the data chunk contains the sample data.
Googling around, it seems the F4 has some examples.

STM32-centric HAL WAV library

saeed144
Posts: 15
Joined: Mon Sep 21, 2020 10:11 am

Re: Play wave file from SD card

Post by saeed144 »

They use I2S , but I don't want to use I2S, micro controller should decode wave file and play it with PWM or DAC(PWM is desired because my STM32F103C8T6 doesn't have DAC)

Post Reply

Return to “General discussion”