From owner-freebsd-multimedia Sat Sep 6 16:46:32 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id QAA09499 for multimedia-outgoing; Sat, 6 Sep 1997 16:46:32 -0700 (PDT) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id QAA09494 for ; Sat, 6 Sep 1997 16:46:28 -0700 (PDT) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id AAA14019; Sun, 7 Sep 1997 00:35:24 +0200 From: Luigi Rizzo Message-Id: <199709062235.AAA14019@labinfo.iet.unipi.it> Subject: Re: snd970904.tgz - can't hear anything while sampling from CD. To: jacob@jblhome.ping.dk (Jacob Bohn Lorensen) Date: Sun, 7 Sep 1997 00:35:24 +0200 (MET DST) Cc: multimedia@FreeBSD.ORG In-Reply-To: <87oh675q0n.fsf@pippin.jblhome.ping.dk> from "Jacob Bohn Lorensen" at Sep 6, 97 00:55:49 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-multimedia@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > Oh, by the way, I just tried playing "xboing" with sound - it hangs > after a while, syslog saying: ok, i tried xboing myself and found the problem. in sound.c around line 740 apply the following patch case SNDCTL_DSP_SYNC: printf("dsp sync\n"); splx(s); - snd_sync(d, 1, d->bufsize - 1); + snd_sync(d, 1, d->bufsize - 4); break ; case SNDCTL_DSP_SPEED: d->play_speed = *(int *)arg ; since dma transfers are not initiated with less than 4 bytes and xboing happens to use files with 4n+3 samples. BTW I think xboing has a fundamental problem: it sends requests to the child process to play sounds, but does not check when the sound is over. In my case, using a P5-133 the game goes faster than the sounds, at some point the pipe between the parent and the child fills up, and the game blocks until the buffer has flushed (several seconds). it should be really designed differently, so that a request for a new sound flushes the buffer immediately and starts with the new one. Cheers Luigi