There are several ways to do it.
My recommendation is to write a custom wave class which can read and write wave files, because unlike some other music files, the main info of a wave file is stored in its header.
Here's the detailed wave file format specification. https://ccrma.stanford.edu/courses/422/projects/WaveFormat/
Another way to bypass the painful decoding is using a third party library, such as NAudio.