27 lines
833 B
Plaintext
27 lines
833 B
Plaintext
$OpenBSD: patch-src_player_mixer_c,v 1.1 2005/07/11 06:28:31 espie Exp $
|
|
--- src/player/mixer.c.orig Mon Jul 11 08:24:13 2005
|
|
+++ src/player/mixer.c Mon Jul 11 08:26:58 2005
|
|
@@ -562,10 +562,12 @@ int xmp_smix_on (struct xmp_control *ctl
|
|
cnt = smix_numbuf = ctl->numbuf;
|
|
|
|
smix_buffer = calloc (sizeof (void *), cnt);
|
|
- smix_buf32b = calloc (sizeof (int), OUT_MAXLEN);
|
|
+ smix_buf32b = calloc (sizeof (int), OUT_MAXLEN+2);
|
|
if (!(smix_buffer && smix_buf32b))
|
|
return XMP_ERR_ALLOC;
|
|
|
|
+ smix_buf32b+=2;
|
|
+
|
|
while (cnt--) {
|
|
if (!(smix_buffer[cnt] = calloc (SMIX_RESMAX, OUT_MAXLEN)))
|
|
return XMP_ERR_ALLOC;
|
|
@@ -587,7 +589,7 @@ void xmp_smix_off ()
|
|
|
|
//synth_deinit ();
|
|
|
|
- free (smix_buf32b);
|
|
+ free (smix_buf32b-2);
|
|
free (smix_buffer);
|
|
smix_buf32b = NULL;
|
|
smix_buffer = NULL;
|