Compiling for x86\_64
The only problem i have so far (and it is a big one) is that it isn't reading the example files (bells, voice, and voice2) because it says they have malformed headers or something. I hope its just the files and not the program itself,
Unfortunately this is very likely a problem with the program. Different processors expect different alignment of words in memory. For example, if you declare a C data structure of { int32, int8, int32 } and one processor A expects int32's to be on 16bit boundaries and another processor Bexpects int32's to be on 32bit boundaries, the C data structure will be represented in memory differently:
A: { int32, int8, pad8, int32 }
B: { int32, int8, pad8, pad8, pad8, int32 }
The padding is just empty space to align the data on the correct word boundaries.
The problem occurs when the program's assumptions of data layout in memory do not match what the compiler does, and instead of reading a file format word by word and populating the data structure, reads a chunk of data and assumes that it matches the data format in memory.
Compare this with problems transferring data between big-endian and little-endian machines - you have to translate to and from the file format, not assume that the data in the file will match the data in memory for all architectures.