Hi all, I am playing an audio file. I read it as a byte[] and then I need to normalize the audio by putting values into range of [-1,1]. I want to then put each flo
byte[]
You can use Buffer.BlockCopy like this:
float[] floats = new float[] { 0.43f, 0.45f, 0.47f }; byte[] result = new byte[sizeof(float) * floats.Length]; Buffer.BlockCopy(floats, 0, result, 0, result.Length);