[SDL] Problems with 8 bpp
weaver at earthcorp.com
Mon Apr 10 17:11:02 PDT 2000
Mattias Engdegård wrote:
> [ reformatted to fit ]
> >It seems that FreeBSD's native sound driver have a very long internal
> >buffer (about 64KB or 3 seconds on 22KHz 8 bit sound), and all calls
> >to select() after sending data with write() erroneously returns
> >immediately until this large buffer will be filled.
> SDL sets the number and size of fragments in DSP_ReopenAudio(), but perhaps
> the BSD audio drivers refuse to behave.
> (You are using OSS drivers, aren't you?)
Yes, it refuses to use provided parameters. I've just digged into kernel sources
and found that actually buffer for each driver is specified by using #define, and
size of it remains constant from reboot to reboot. I've also found confirmation of
my assumptions - buffer for my specific driver was set to 64KB. I'm using
OSS-compatable (well, partially in fact) FreeBSD's pcm driver.
> Have you tried SDL_DSP_NOSELECT? It should use timer-based audio delay instead
> of selecting on the descriptor.
Yes, I've tried. It helps somewhat, but do not solve the problem completly, as in
this case the SDL does not know exactly how much audio is in buffer and tend to
send more audio that has been played (FUDGE_...), so after several minutes of
playing this case actually degrades to the case with non-working select().
More information about the SDL