chef-boneyard / win32-sound

A Ruby library for playing and controlling sounds on MS Windows.
13 stars 3 forks source link

Beep Bug #2

Closed BE3101 closed 9 years ago

BE3101 commented 9 years ago

Thank you for writing a great gem. I have a ruby script that I'm running as a windows service for various reasons. It is controlling a serial device and when I receive input from the serial device I wanted to play a beep. I did this using Sound.beep and when I run the script from a command line it works like a champ. However, when the script starts up as a service, everything works except for the beep. To make sure it wasn't just something I had done, I modified the code to play a sound from the Windows\Media directory. That worked when the script ran as a service and also when the script ran from command line so I'm moving forward with that, but I wanted to make you aware of the bug. Please let me know if you have any other questions or need any additional details.

djberg96 commented 9 years ago

I don't think this is a bug in win32-sound. From what I've read online it's just a limitation of the underlying Beep() function. That said, I'm not totally certain, as it doesn't seem to be something people try often.

BE3101 commented 9 years ago

Thanks for the response. You could be right. I didn't really look into the beep. I just played the sound file and that worked like a champ. Thanks for writing a great gem.

Sent from my iPhone

On Jul 1, 2015, at 10:21 AM, Daniel Berger notifications@github.com wrote:

I don't think this is a bug in win32-sound. From what I've read online it's just a limitation of the underlying Beep() function. That said, I'm not totally certain, as it doesn't seem to be something people try often.

— Reply to this email directly or view it on GitHub.

djberg96 commented 9 years ago

No problem. I'm going to go ahead and close this for now. If it does turn out to be an issue on my end we can reopen it later.