Page 1 of 1

Beep Function doesn't work

Posted: 27. Aug 2009, 05:32
by Tailmon
Well, I think that every programmer knows the WinApi function called Beep( Frequency ) and Borland C/C++ functions called sound, nosound, etc
ok, I was programming some things in virtual machines and I could watch that Virtualbox ignores those functions and also it ignores every System speaker call,
my question is why isn't it implemented in virtualbox?, why does virtualbox ignore every kind of System speaker call?
I tested with a windows 95 and windows XP guests in my Windows Vista Home premium x64 host and my Ubuntu 9.04 host, and either the result was the same, System speaker doesn't run

PD I have the system speaker coneccted in my host computer and my hosts programs that use it works excellent, only it doesn't work whih VBOx

Re: Beep Function doesn't work

Posted: 27. Aug 2009, 11:31
by Sasquatch
Recent computers no longer have a pc speaker in them. It doesn't matter if it's connected or not on the Host, Windows will always have this device, but as you noticed, VB doesn't work with it. They just didn't hook up the cable to the virtual motherboard. I'm guessing that it's too much trouble and annoyance to have it (ever worked with Linux in VMWare? It's a living nightmare where you hear a beep every time you use tab completion or go one character too far).

Only thing that you can do, is change your program code to use the sound card and play a sound using that (like the system error beep when you DO have an audio card installed).

Re: Beep Function doesn't work

Posted: 27. Aug 2009, 14:18
by Tailmon
Well, I was testing, and I could see that in VMware it works, but, I don't like Vmware :| (it's too heavy, and It doesn't have opengl aceleration :/)
and I couldn't use it, because, really I have to use the system beep (like I'm a student, some programs I have to do with some functions because the teacher says that I have to use it :()
only I have a question more, can I use some program or soft that it could redirect the beep calls to the sound card?
thanks for the answer, I wanted to confirm that :D

Re: Beep Function doesn't work

Posted: 27. Aug 2009, 14:37
by Sasquatch
Why shouldn't that be possible? I know that my laptop does it in hardware mode, I hear a beep through my laptop speakers instead a separate speaker. I know it's going through my sound card, because I can mute it with the audio keys :). Software should be able to do just that too. Shouldn't be too hard to find, now would it?

Re: Beep Function doesn't work

Posted: 27. Aug 2009, 19:37
by Tailmon
ok thanks for the answer, now I have to google it xD :D