lkml.org 
[lkml]   [1996]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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)


\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.027 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site