Search code examples
androidaudioheaderrecordingwave

Changing wave header in mp3 file


Is it possible to change the wave header in an existing mp3 file? I need it to be 8 or 16 bits per sample.

Any tips about how to proceed? I am totally stuck.

Thank you very much


Solution

  • Which wave header are you referring to? Are you talking about the frame header? In any case, it doesn't contain a bits-per-sample field because such information would be meaningless to store in the compressed mp3 stream.
    It's up to the decoder/player to decide how many bits to use per sample when generating an uncompressed PCM stream from the mp3.

    In case you mean that you've slapped a RIFF header onto an mp3 file to be able to import it into various old programs, you can find the format of that header here.