pkgsrc/games/abuse/patches/patch-ag
2002-07-16 14:26:20 +00:00

41 lines
1,001 B
Text

$NetBSD: patch-ag,v 1.1 2002/07/16 14:26:20 agc Exp $
--- imlib/readwav.c 2002/07/16 13:34:29 1.1
+++ imlib/readwav.c 2002/07/16 13:34:58
@@ -71,6 +71,10 @@
wav_tag tag;
pcm_wave pcm;
+ char *riff = "RIFF";
+ char *wave = "WAVE";
+ char *fmt = "fmt ";
+ char *d = "data";
bFILE *fp=open_file(filename,"wb");
if (fp->open_failure())
@@ -81,13 +85,13 @@
}
/*************** Write the chunk ***************************/
- fp->write("RIFF",4);
+ fp->write(riff,4);
fp->write_long(data_size+36);
- fp->write("WAVE",4);
+ fp->write(wave,4);
/************** Write the tag *******************************/
- fp->write("fmt ",4);
+ fp->write(fmt,4);
fp->write_long(16);
@@ -100,7 +104,7 @@
fp->write_short(8); // 8 bits per sample
/************* Write data tag ******************************/
- fp->write("data",4);
+ fp->write(d,4);
fp->write_long(data_size);
/************ Now write sample data ************************/