Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class WriteAndSaveWavFile {
- public void SaveWavFile(byte[] byteArray) {
- try {
- SaveFileDialog save = new SaveFileDialog();
- save.Filter = "Wave file(*.wav)|*.wav";
- if (save.ShowDialog() == DialogResult.OK) {
- FileStream fs = File.OpenWrite("D:\test.wav");
- BinaryWriter bw = new BinaryWriter(fs);
- bw.Write(byteArray);
- bw.Close();
- fs.Close();
- }
- } catch (Exception) {
- throw new ApplicationException("fout gebeurt tijdens opslaan");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement