Messages in this thread | | | Date | Tue, 3 Dec 1996 09:21:23 +0200 (EET) | From | Hannu Savolainen <> | Subject | Re: DMA buffer size. |
| |
On Thu, 28 Nov 1996 ganesh@cse.iitb.ernet.in wrote:
> I've never seen quake, but I had a similar problem when I wrote a simple > audio server. I had a 64k buffer, and if the server pumped out data at > 8kb/s, 8 seconds of sound would be buffered. So any change in the location > of the audio sources would lag by 8 seconds. There's a SOUND_PCM_SUBDIVIDE > ioctl which lets you use a smaller buffer, but it didn't work - there was > still an 8 second lag. So I reduced buffer size and it worked :) SOUND_PCM_SUBDIVIDE must be called very early. Calling it after first read(), write() or call to SNDCTL_DSP_GETBLKSIZE doesn't have any effect.
Using SNDCTL_DSP_SETFRAGMENT should give better results than SOUND_PCM_SUBDIVIDE. More information about programming audio can be found from http://www.4front-tech.com/pguide.
Best regards,
Hannu ----------------------------- Hannu Savolainen (hannu@voxware.pp.fi, hannu@4front-tech.com) http://personal.eunet.fi/pp/voxware/hannu.html (my home page) http://www.4Front-Tech.com/oss.html (Open Sound System (OSS)) http://personal.eunet.fi/pp/voxware (OSS Free/TASD/VoxWare)
| |