C#C
C#3y ago
Majinko :D

❔ Reading a WAV file

I am trying to read wav files and save the DATA to a float array, but the array has a length of about 40 with all wav files I have tried to use.
I think the issue is reading the bytes as up until then the sample rate, bit depth works fine. The issue could be the WAV files themselves aswell as they are downloaded from youtube.
The code is from stackoverflow: https://stackoverflow.com/questions/8754111/how-to-read-the-data-in-a-wav-file-to-an-array and it is the post by P i
(the one that is just one readWav() function)
Stack Overflow
I need to get all the samples of a wav file into an array (or two if you need to do that to keep the stereo) so that I can apply some modifications to them. I was wondering if this is easily done (
Was this page helpful?