shredder929
Junior Member level 3
- Joined
- Jul 1, 2019
- Messages
- 27
- Helped
- 1
- Reputation
- 2
- Reaction score
- 2
- Trophy points
- 3
- Location
- Massachusetts
- Activity points
- 408
I'm trying to play audio using the ST32F407 Discovery board. I'm working off this app note.
The source files are located here under Tools & Software, named "STSW-STM32068". Project is the Audio playback & record, Flash configuration.
The sample audio is a short clip that's stored in hex on audio_sample.c. What I'm trying to do is change that to the audio I want (my cat's meow).
I've converted the mp3 I have to a 16-bit PCM, 16kHz sample rate wav file, and then used Octave to turn that into a string of hex values that I can copy paste into audio_sample.c. When I load this onto the board, all that comes out is a short, sharp squeak.
I then tried going the other way around. I took the hex data from the source file, and used Octave to write it to a wave file. The result was just a bunch of clicks.
The size difference is enormous too. My cat's meow sample is 2 seconds long, while the included audio sample is roughly 6 seconds. The text for the first is 169KB while the other is 3.6MB. What am I missing here? It seems like it should be really simple but there's some sort of mismatch I'm not getting.
The source files are located here under Tools & Software, named "STSW-STM32068". Project is the Audio playback & record, Flash configuration.
The sample audio is a short clip that's stored in hex on audio_sample.c. What I'm trying to do is change that to the audio I want (my cat's meow).
I've converted the mp3 I have to a 16-bit PCM, 16kHz sample rate wav file, and then used Octave to turn that into a string of hex values that I can copy paste into audio_sample.c. When I load this onto the board, all that comes out is a short, sharp squeak.
I then tried going the other way around. I took the hex data from the source file, and used Octave to write it to a wave file. The result was just a bunch of clicks.
The size difference is enormous too. My cat's meow sample is 2 seconds long, while the included audio sample is roughly 6 seconds. The text for the first is 169KB while the other is 3.6MB. What am I missing here? It seems like it should be really simple but there's some sort of mismatch I'm not getting.