I am hunting a weird bug in maestro-3 driver. It seems to be working fine
for anything but Doom and Quake
More precisely, Doom has ‘delayed’ sound, as if all sound effects are being
buffered before playing. Delay is about 1-2 secs, very consistent. It does
not happen with MPEG video, only Doom. I can’t deduce anything from log
file, it seems like everything works perfectly. Any ideas what could
possibly cause that effect?
Quake does not have sound at all because aquire() always fails within
ado_shm_alloc(), which is first function in the acquire(). Exactly,
shm_ctl() inside it returns ‘Function not implemented’ which I take it can
not mean anything but a memory corruption. I am really confused - this
happens even immediately upon driver load and no code is being executed
before that except for ctrl_init(). The DMA size passed from io-audio is
same as for Doom (64*4096) yet this only happens with Quake. The only
difference I can see is, capabilities() function is being called only once
before failing aquire() is called. In all other cases (different
applications) the capabilities() is always called twice before aquire().
What does it mean? Why once or twice?
One differense about Quake I’ve heard of, it seems to be using MMAP mode. I
tried to run aplay in MMAP mode and it seems to work. Anyway, I don’t see
how MMAP mode would affect anything, it probably would only make any
difference after aquire(). Does Quake do anything else differently?
This all does not make sense to me. The ctrl_init() works same way for all
apps, immediately after that Doom asks for 64*4096 bytes DMA buffer and
ado_shm_alloc() works, Quake asks for same thing in the same order and
shm_ctl() inside ado_shm_alloc() misteriously fails. If same DLL fails in
the same execution path with the same arguments, it can only mean one thing:
corruption happens somewhere else in io-audio.
It does not seem to be fatal. I can continue using driver with other
applications after failing Quake.
I also tried to use ADO_DEBUG/ado_memory_dump to trace possible corruption
in driver, but apparently ado_alloc_debug/ado_free_debug are undefined, so
driver does not load. Why is that?
Thanks,
- igor