[python-win32] winsound.Beep not producing any output - windows 10 2004 64 bit

Todd Fiske toddfiske at gmail.com
Wed Jul 22 08:00:16 EDT 2020


Hi Jacob,

winsound.Beep() operates on the built-in computer speaker, which is
not always included these days.

winsound.PlaySound() plays over the sound card and whatever speakers
are connected to them.

You could probably find the speaker header pins on the motherboard and
get a little PC speaker for a couple bucks to play the old timey
square wave sounds from Beep.

Alternately there are several Python synth modules that can be used to
generate tones. A popular one is called pyo. Most of them are probably
overkill for doing what Beep does, but they can be fun rabbit holes to
explore.

https://wiki.python.org/moin/PythonInMusic

Todd

On 7/22/20, jacob kruger <jacob at blindza.co.za> wrote:
> Hi there
>
>
> Not too important, but, bit odd in that, like subject line says, using
> something like the following 2 lines of code produces no audio output at
> all:
>
> import winsound
>
> winsound.Beep(3200, 500)
>
>
> Not too sure when this started happening, and, if it realtes to windows
> version, etc., or just possibly other software have installed here, but
> anyway.
>
>
> winsound.PlaySound() function does still cooperate, so, it's not like
> winsound itself is messing up audio output channels, but, just wondering
> what could cause this, and, if there are any simple alternatives, in
> case I just want to use it to either generate tones based on
> frequencies, or use it let me know when something has finished off in
> the background?
>
>
> Jacob Kruger
> Skype: BlindZA
> "...resistance is futile...but, acceptance is versatile..."
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> https://mail.python.org/mailman/listinfo/python-win32
>


More information about the python-win32 mailing list