-
March 18th, 2011, 03:25 AM
#1
Guru challenge (seriously!): beep in Win7 64bit
Hi gurus,
I just switched to Win7 Ultimate edition 64bit and now the beep functionality via internal speaker (system speaker on motherboard) does not work anymore.
The reason is described here (basically M$ trying to clean up their code): http://blogs.msdn.com/b/larryosterma...windows-7.aspx
I used "Console.Beep(a,b)" to notify me that a process has ended.
Any ideas how to send some kind of acoustic signal through the internal speaker (any loud noise would do for my purposes).
Thanks and enjoy cracking that nut...
-
March 18th, 2011, 04:46 AM
#2
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.
-
March 18th, 2011, 05:01 AM
#3
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...
-
March 18th, 2011, 09:02 AM
#4
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.
-
March 18th, 2011, 10:04 AM
#5
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.
Hannes
-
March 18th, 2011, 11:31 AM
#6
Re: Guru challenge (seriously!): beep in Win7 64bit
If I mute my sound, because of something important, it better not BEEP when I get a high-score, or something like that!
-
March 18th, 2011, 03:22 PM
#7
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.
Making more sense now?
-
March 18th, 2011, 08:17 PM
#8
Re: Guru challenge (seriously!): beep in Win7 64bit
Who doesn't have external speakers today? Unless the hardware is corporate property and no extra/unrequired... (unrequired?) equipment was allowed?
-
March 19th, 2011, 04:34 AM
#9
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.
So any ideas on the original topic?
-
March 19th, 2011, 07:54 AM
#10
Re: Guru challenge (seriously!): beep in Win7 64bit
Have you tried to replace the Beep.sys file with an xp one?
I read that you can do this, and two people allegedly had success.
http://www.windowsreference.com/wind...-to-old-style/
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.
-
March 19th, 2011, 12:45 PM
#11
Re: Guru challenge (seriously!): beep in Win7 64bit
-
March 19th, 2011, 01:01 PM
#12
Re: Guru challenge (seriously!): beep in Win7 64bit
Originally Posted by dglienna
What's the point of reposting the link from my initial post???
-
May 10th, 2011, 03:00 PM
#13
Re: Guru challenge (seriously!): beep in Win7 64bit
Very very interesting reading indeed! TT(n) I wish I had just a quarter of your magnificent brain!
-
May 10th, 2011, 07:02 PM
#14
Re: Guru challenge (seriously!): beep in Win7 64bit
Well Hannes, considering I learned a large amount from you over the years, you need not be so humble.
-
January 24th, 2014, 03:01 PM
#15
Re: Guru challenge (seriously!): beep in Win7 64bit
Hi all Gurus,
I know this is an old thread, and I am new trying to play with beep.sys and not so knowledgeable about drivers.
I have a program that I need to work with (unfortunately I cannot change it...), and I need to hear an alarm that is driven by beep.sys into my bluetooth headset (right now in Windows 8, I hear it in the laptop speakers, and a very low ticking-like sound in the headset).
My pc is running on Windows 8.1, and I have tried all tricks and advices above (Larry's method, trying to start a second beep service wit beepxp.sys (ref solution found here: http://www.waldbauer.com/tmp/reference.php?).
At the end, I was always able to get the new beep.sys file to be used, but all I got from these solutions is that the alarm would not even ring in the notebook speakers anymore. So I am back to beginning.
I read that this could be an issue with delay for processing sounds, but I just don't know what to do to check that and do some testing...
Help!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|