No, this is not how it works. The problem is: you revert not only data, but also metadata. Besides, the file is compressed. Here is what you can do:
- unpack MPEG3 file to WAV (transcode)
- with WAV file, determine the size of metadata (there is a lot of documentation on the file header structure; you will need to parse it to find out where metadata ends and data starts);
- read metadata is one array of byte, say,
metadata
; - from that point, read data points in an another array of bytes, say
data
; - invert
data
(you can do it per-byte only for 8-bit audio; should it be 16-bit audio, you would need to invert per 16-bit data points); - write
metadata
immediately followed by data
in a new file; you got an inverted WAV file; - if you need, pack the resulting WAV file to MPEG3 (trancode).
It would be quite a project.
Trancoding part could be easy. I usually advice FFMpeg (libav). You can use existing utility or some .NET wrapper. I explained it all in my past answers:
how to convert image to video in C#[
^],
HTML5 and Mime, Streaming a video?[
^],
How to trim the video using Directshow!?[
^].
Determining of the WAV file metadata size (to see at what position data starts) is harder, but also not a rocket surgery. I personally have done only WAV generation, not parsing. I would take some time. You can start here:
http://www.topherlee.com/software/pcm-tut-wavformat.html[
^].
—SA