I just switched to Win7 Ultimate edition 64bit and now the beep functionality via internal speaker (system speaker on motherboard) does not work anymore.
Re: Guru challenge (seriously!): beep in Win7 64bit
Hey Beamer, long time no see
I am by no means a guru, won't ever be, but I usually do not back down at any challenge...
Well, as it turns out, there is absolutely no solution to this. The only workaround may be to aquire desktop speakers, or headphones and use the MessageBeep API, or System.Audio to play a sound through the desktop speakers, or headphones.
Re: Guru challenge (seriously!): beep in Win7 64bit
Hi Hannes, good to see you too!!!
I hope your reply will not scare anybody else away from this challenge! What makes you so sure that there is now way? Personally I think that there must be some kind of trick, because the speaker itself is connected and produces sound on boot up.
I would also be willing to direct all audio signals to the internal speaker as a standard setting if I knew how to do that, hoping that this would redirect my beep to the internal speaker...
Re: Guru challenge (seriously!): beep in Win7 64bit
This is a problem I came across too, but I have been able to make sound with the api.
Although, it is really choppy-poppy on 64 bit systems. On some machines it may not work at all, although I have not seen this.
The proper audio driver may be important as well, and this is very hard to get right on 64 bit systems, even if the sound seems to work fine, it may not be perfect.
This is the declaration I use.
Code:
Private Declare Function apiBeep Lib "kernel32" Alias "Beep" (ByVal dwFreq As Int32, ByVal dwDuration As Int32) As Int32
I thought I read that the issue was resolved, but it sounds terrible.
I actually never checked to see if the sound was re-routed to the external speakers, or if it really invokes the internal speaker.
For Windows 7, we resolved the issue completely – we moved all the functionality that used to be contained in Beep.Sys into the user mode system sounds agent – now when you call the Beep() API instead of manipulating the 8254 chip the call is re-routed into a user mode agent which actually plays the sounds.
Try it yourself, and make sure the driver is perfect.
The driver on CD usually is the best, and make sure the bios setting for integrated audio is toggled correctly.
Be sure to elevate as administrator, or turn off UAC when installing the driver. Some require the UAC to be off, otherwise it will say it installed correctly, but in reality it did not.
[EDIT]: this api plays syncronously, so if you call it to quickly it may ignore the call, or cue it up, causing sluggish response until finished.
Last edited by TT(n); March 18th, 2011 at 09:15 AM.
Re: Guru challenge (seriously!): beep in Win7 64bit
This is a good thread. I didn't know about this issue at all. I just have one question though..
Is all this really really needed just for a beep sound, Just to attract attention to the user? Why not use Something like FlashWindow or such like ? Surely Beep doesn't need gto be so important.
I am stupid, so I am just trying to get my head around this.
Re: Guru challenge (seriously!): beep in Win7 64bit
Originally Posted by HanneSThEGreaT
This is a good thread. I didn't know about this issue at all. I just have one question though..
Is all this really really needed just for a beep sound, Just to attract attention to the user? Why not use Something like FlashWindow or such like ? Surely Beep doesn't need gto be so important.
I am stupid, so I am just trying to get my head around this.
Hannes
Hannes,
stupid is only the one who doesn't ask.
There are several reasons for making this important:
1. As written in the linked article there is software for disabled people that uses the internal speaker.
2. What do you do if you don't have an external sound system, but want your software to give acoustic signals (i.e. you have a server and/or no monitor connected)?
3. In my case I have 2 PCs and #1 is plugged into the sound system while #2 is running my software that crunches numbers for quite a while. When it's finished I hear a beep and don't need to turn on or watch the monitor. I might also be in the next room and don't want to check the progress every few minutes.
Re: Guru challenge (seriously!): beep in Win7 64bit
I don't mean to be rude, but this was meant to be a discussion about how to enable the internal speaker, not whether or not (and why) to have external speakers or needing the internal one. If you are interested in the latter please read either my post or the link in the initial post.
My windows 7 drive is on the fritz(what a surprise), and I did not have any luck with this method.
At least it seems to be on the right track inside the device manager.
I assume you know how to take ownership of a file, but if not it's pretty easy.
Re: Guru challenge (seriously!): beep in Win7 64bit
I think this method should work.
I was getting a message that the driver was blocked.
However I was not booting from CD as my link described.
I will try again from BartPE -like CD, and post the results.
This could resolve it, or squash it.
The default beep is controlled by a driver under, c:\windows\system32\drivers\beep.sys. Maybe if you switched it out with a driver from XP/Vista it would increase the volume.
To see this driver you have to open device manager then click on View > Show hidden devices. Then under Non-Plug and Play Drivers you’ll see “Beep.” This is the driver that runs your beep. Right click on it then choose properties and go to the driver tab, then click on Driver Details… This shows the file version which looks like it’s been change with Windows 7. So replace it with an older version and see what happens.
Procedure to follow
1. Boot from an UBCD4WIN disc (or BartPE if you don’t have an SATA hard drive)
2. Take ownership of the “C:\Windows\System32\Drivers\Beep.sys” file and give the local “Administrators” Group “Full Control” permissions.
3. Rename “Beep.sys” to “Beep.old” (just in case)
4. Copy “Beep.sys” from an XP machine to this location.
Comment by obvious404 on May 9, 2010 @ 12:42 am
Thanks so much. This fix worked for me 100%.
Comment by geo on August 12, 2010 @ 11:52 pm
this works. thanks.
Last edited by TT(n); March 19th, 2011 at 11:12 PM.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.