Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Sep 1997 00:35:24 +0200 (MET DST)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        jacob@jblhome.ping.dk (Jacob Bohn Lorensen)
Cc:        multimedia@FreeBSD.ORG
Subject:   Re: snd970904.tgz - can't hear anything while sampling from CD.
Message-ID:  <199709062235.AAA14019@labinfo.iet.unipi.it>
In-Reply-To: <87oh675q0n.fsf@pippin.jblhome.ping.dk> from "Jacob Bohn Lorensen" at Sep 6, 97 00:55:49 am

next in thread | previous in thread | raw e-mail | index | archive | help
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709062235.AAA14019>