Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

Simple Question about Reading WAV-File Samples

Hi there,

I managed to setup the audio core for the DE1 Board. I can record my voice and I can playback it also. The only problem I have is when I try reading samples from a WAV-file

I know the structure of the WAV-File. In my case I just want to read RAW data from it, so there is no compression. I read the first 44 Bytes of a WAV-File. When the Data-Section begins,

I read the each sample, and I store them in a Word and I send them to the Audio Core (WM8731)

The problem however is the sound is distorted, and I have no idea why. I tried to reproduce this error while using the SD-Card-Audio from Altera. Normally the Demo works fine, all the WAV-Files

playing well, but the same error occurs when I put a "printf("......") in the while-loop when I write something to the Audio-core. In this case I get the same error. The Audio is distorted.

I guess it is distorted because it is playing too slow.

Please give me some advice, I am a beginner, and I already managed to implement the SD-Card on my own, I did a lot of stuff with DE1 on my own, and this is really getting annoying because

I have no more Ideas where I should start to solve my problem.

Below you can find a jpeg of the wav-filehttps://www.alteraforum.com/forum/attachment.php?attachmentid=8317
No RepliesBe the first to reply