This project has moved and is read-only. For the latest updates, please go here.

Converting WAVs to AIFFs

Nov 11, 2012 at 8:55 PM

I'm trying to convert from .wav to .aiff and notice there is an example of how to convert a .aiff to .wav using the AiffFileReader but there doesn't appear to be an AiffFileWriter which I'd hoped there would be.

Is there a way to use NAudio to convert .wav files to .aiff files?

Nov 12, 2012 at 7:28 AM

Unfortunately there is no AiffFileWriter in NAudio. If someone were to contribute a working one to the project I would be glad to include it. You may be able to work out how to create one yourself by examining the code for the reader.


Nov 12, 2012 at 7:54 AM

Thanks for the prompt response Mark, I'll take a look at that

Nov 22, 2012 at 11:17 PM

Hi Mark and Keith,

You're more than welcome to use the AiffFileWriter that I wrote, which is here:

It depends on an IEEE floating point library, which is here:

The AiffFileReader currently included with NAudio has its own IEEE floating point conversion methods (I wrote it before the AiffFileWrite, so I didn't think to put it in its own static class).  It should be pretty straight forward to consolidate the whole thing to work with the IEEE.cs provided.

Hope this helps,


Nov 23, 2012 at 8:53 AM

Much appreciated!

Nov 23, 2012 at 9:07 AM

hi Giawa, this is brilliant. I'll try to get this into NAudio for v1.7

thanks so much


Nov 23, 2012 at 1:35 PM

I've committed the new class, although haven't had a chance to test it yet. Any chance you could do a quick code review for me. The change is here.

many thanks for this contribution.


Nov 26, 2012 at 10:20 PM
Edited Nov 26, 2012 at 10:20 PM

Hi Mark,

I built the latest source and quickly tested both the AiffFileReader and AiffFileWriter.  Seems to work well!  Here's some quick example code to test out the new writer.

OpenFileDialog open = new OpenFileDialog();
open.Filter = "WAVE File (*.wav)|*.wav;";
if (open.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;

SaveFileDialog save = new SaveFileDialog();
save.Filter = "AIFF File (*.aif)|*.aif;";
if (save.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;

AiffFileWriter.CreateAiffFile(save.FileName, new WaveFileReader(open.FileName));



Nov 27, 2012 at 1:09 PM

that's great. thanks again