Encoding an on-disk wav file

Dec 26, 2011 at 7:02 AM

If I already have an audio file with WAV header, in order to encode it I need:

1. Open the file stream.

2. Read the wav header.

3. Everything after the wav header - pass to Speex Encoder.

4. Save wav header to a converted stream.

5. Save encoded data to a converted stream.

Is it a correct conversion sequence for an on-disk files? So far I have been able to find only streaming encoding examples, so I though I needed to make sure.