flush wavwriter data on close
authorKostya Shishkov <kostya.shishkov@gmail.com>
Sun, 4 Oct 2020 10:43:42 +0000 (12:43 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Sun, 4 Oct 2020 10:43:42 +0000 (12:43 +0200)
src/wavwriter.rs

index 58523b720d3c117c7f2cfe38c219de603a99398f..c0b324dc19215288151e3d500c4234ae99f9b5dd 100644 (file)
@@ -157,6 +157,7 @@ impl<'a> Drop for WavWriter<'a> {
             let res = self.io.write_u32le((size - 8) as u32);
             let res = self.io.seek(SeekFrom::Start(self.data_pos - 4));
             let res = self.io.write_u32le(((size as u64) - self.data_pos) as u32);
+            let res = self.io.flush();
         }
     }
 }