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

save a mix

Jun 16, 2014 at 7:46 PM
Edited Jun 16, 2014 at 7:58 PM
ok this is my code:

            if (mixer2 == null)
            {
                MessageBox.Show("there is no information to generate a file");
                return;
            }
            SaveFileDialog save = new SaveFileDialog();
            save.Filter = "WAV file (*.wav)|*.wav;";
            if (save.ShowDialog() != DialogResult.OK)
            {
                MessageBox.Show("File not written");
                return;

            }
             WaveFileWriter.CreateWaveFile( save.FileName, mixer2);

          MessageBox.Show("file saved");
however once it is done, and I try to open the file in another program, the file is empty.
I know mixer2 have the data in it, because I can play it from the program I am writing.
Jun 17, 2014 at 9:26 PM
does anyone know how I can troubleshoot this ? or what might be wrong with my code
Jun 17, 2014 at 11:51 PM
markheath do you know?
I am really lost on this
Jun 29, 2014 at 11:44 PM
First thing is to check you have inputs to your mixer. Can you create WaveFile from one of the inputs?
Jun 30, 2014 at 3:05 AM
sorry, I should have closed this.
I got it to work
thanks