about summary refs log tree commit diff
path: root/src/sf.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/sf.zig')
-rw-r--r--src/sf.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sf.zig b/src/sf.zig
index cee3118..bce6dcc 100644
--- a/src/sf.zig
+++ b/src/sf.zig
@@ -18,6 +18,7 @@
 
 const Allocator = std.mem.Allocator;
 const assert = std.debug.assert;
+const span = std.mem.span;
 const std = @import("std");
 
 const c = @import("cimport.zig");
@@ -53,6 +54,7 @@ pub const SndFile = struct {
         };
 
         var info: c.SF_INFO = undefined;
+        info.format = 0;
         const pimpl = c.sf_open(path.ptr, c_mode, &info);
         _ = c.sf_command(pimpl, c.SFC_SET_SCALE_FLOAT_INT_READ,
                          null, c.SF_TRUE);