Need help with audio library on DOS...
I am facing what is for me a really complicated situation. I program C but not this advanced (I mean direct hardware access etc).
Here is the background:
I am using DJGPP.
I am programming a DOS program that will play wave files on certain functions (moving through the menus, running functions, etc)
Today's motherboards come with AC97 sound boards that do not have drivers compatible with DOS.
MAME (a videogame emulator) does have a library that uses the AC97 boards with no problems. It is named WSS and is made by Shigeaki Sakamaki (the email address of the author is unknown)
I managed to make a standalone DOS wav player using the library. It works perfectly.
I like to add the WSS library to the SEAL Audio library, which is another neat audio library that also has a mixer, filters and etc, and has functions for everything I need on my program. SEAL is here: http://www.sonicspot.com/sealsdk/sealsdk.html
Here comes my problem:
I added WSS to the SEAL library and it sounds, but SLOWLY, it looks as it is taking 100% of the CPU, and returns control to my program when it wants. The main functions are easy: openaudio for detecting and initializing the board (this one works great) and updateaudio which is called every clock_per_second from my program.
Updateaudio is the issue here. I made a neat package with everything I'm using, and some examples, like the standalone player, my partially-working driver for SEAL and the driver I derived my work from, and the MAME code that makes use of WSS and has a working updateaudio function through it. Everything is commented and has a description. I've been stuck and fighting with this for more than a week and I'm on the point of needing help desperatedly. I can pay for the time needed to look at it and to point me in the right direction. Any help will be more than appreciated.
Package is here: http://22.214.171.124/sources.zip (85kb)