Skip to content

Commit

Permalink
fix RIFF chunks size which should not include the chunk type/length i…
Browse files Browse the repository at this point in the history
…tself
  • Loading branch information
s-u committed Oct 1, 2014
1 parent bba41d0 commit 299c1d3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: audio
Version: 0.1-5
Version: 0.1-6
Title: Audio Interface for R
Author: Simon Urbanek <[email protected]>
Maintainer: Simon Urbanek <[email protected]>
Expand Down
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
NEWS for audio package

0.1-6 (under development)
o fix RIFF chunk size which incorrectly included the header

0.1-5 2013-12-23
o minor documentation cleanups

Expand Down
2 changes: 1 addition & 1 deletion src/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ SEXP save_wave_file(SEXP where, SEXP what) {

{
const char *fName = CHAR(STRING_ELT(where, 0));
riff_header_t rh = { "RIFF", size + 44, "WAVE" };
riff_header_t rh = { "RIFF", size + 36, "WAVE" };
wav_fmt_t fmt = { "fmt ", 16, 1, chs, rate, rate * bps, bps, bits };
riff_chunk_t rc = { "data", size };
FILE *f = fopen(fName, "wb");
Expand Down

0 comments on commit 299c1d3

Please sign in to comment.