Link to home
Start Free TrialLog in
Avatar of dpnguyen
dpnguyen

asked on

PC Speaker Access

Hi Everyone,

  I'm writing an opengl program for Windows 95 and want to add some sound.  The "Beep" and "MessageBeep" functions work but are to slow with response time (it is a real time simulation I'm writing).  

  I've come along some faq's that have told me about how the speaker is addressed on port 21 and things like that.  I haven't done any hardware programming before and have not been able to find C code to learn from (although I have found lots of pascal code).  

  If anyone knows functions the names of some functions, url's, or even routines that would help, I would greatly appreciate it.

  -David

Avatar of eburley
eburley

I was gonna work up an example from some old asm code, but my code ended up throwing a priveleged instruction, and that's probably why Beep and MessageBeep are slow.
are you trying to do sound via a soundcard or just directly thru the speaker?
ASKER CERTIFIED SOLUTION
Avatar of duneram
duneram

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dpnguyen

ASKER

Duneram:

  Thanks for the reply.  I was looking for a solution that had to do with directly accessing the PC speaker.  All I want it to do is beep, nothing fancy, just a beep, but in real time.  I don't even want to have my program touch the sound card at any time, just the pc speaker.  I just wanted to know if there is way using VC++ to do it.

  Gracias