diff options
Diffstat (limited to 'sndfile-stream.lua')
-rw-r--r-- | sndfile-stream.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sndfile-stream.lua b/sndfile-stream.lua index 1c394b8..ba5a0f3 100644 --- a/sndfile-stream.lua +++ b/sndfile-stream.lua @@ -113,7 +113,7 @@ function Stream:save(filename, format) local frame_buffer = sndfile.frame_type(channels) - self:foreach(function(frame) + for frame in self:iter() do -- NOTE: This should be (hopefully) automatically -- unrolled for single-channel streams -- Otherwise each loop copies an entire frame. @@ -129,7 +129,7 @@ function Stream:save(filename, format) -- (i.e. multichannel streams) -- FIXME: Check return value hnd:writef(frame_buffer) - end) + end hnd:close() end |