From ad8d992fda91522c4488be832e3461444669fb8f Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sun, 4 Oct 2020 12:43:42 +0200 Subject: [PATCH] flush wavwriter data on close --- src/wavwriter.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wavwriter.rs b/src/wavwriter.rs index 58523b7..c0b324d 100644 --- a/src/wavwriter.rs +++ b/src/wavwriter.rs @@ -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(); } } } -- 2.39.5