summaryrefslogtreecommitdiff
path: root/audio/jack/patches/patch-ao
blob: 191e2864be79608d8c96dd164451e982041f216f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$NetBSD: patch-ao,v 1.2 2008/11/16 11:22:55 bjs Exp $

We want to make sure there's no garbage in the output buffer, otherwise
untoward stuff can happen.

--- drivers/oss/oss_driver.c.orig	2008-11-11 17:36:43.000000000 -0500
+++ drivers/oss/oss_driver.c
@@ -1042,6 +1042,7 @@ static void *io_thread (void *param)
 			pthread_mutex_lock(&driver->mutex_out);
 			memcpy(localbuf, driver->outdevbuf, 
 				driver->outdevbufsize);
+			memset(driver->outdevbuf, 0x00, driver->outdevbufsize);
 			pthread_mutex_unlock(&driver->mutex_out);
 
 			io_res = write(driver->outfd, localbuf,