I have a WAV file with 2^16 values between 0 to 2. I'd like to change it to have 2^8 values... which means it will has less information but will take less space.
I have the formula for the conversion but i don't know how to access the data.
I've read the file as following:
wave = new NAudio.Wave.WaveChannel32(new NAudio.Wave.WaveFileReader(open.FileName));
while (wave.Position < wave.Length)
{
read = wave.Read(buffer,0,16348);
}
now i can use either the wave or the buffer.
how can i modify the wave to have 2^8 ? i am suppose to pass of each value and to convert it.. but i don't know how to access the values for the conversion.
if for example i had an array of floats which represent the wav file I'll know how to continue.