Forward Console .Beep

How can I capture / redirect the sound created by, say:

Console.Beep(400, 1000); 

Either in some byte buffer, or directly in the wav file will be fine.

I searched, but found ways to redirect text output, not sounds.

+4
source share
1 answer

You cannot redirect the sound.

Console.Beep() is implemented by calling the Windows API Beep() function , which calls the sound card hardware, if possible.

You have several options:

I think the last one is the best choice.

+6
source

Source: https://habr.com/ru/post/1484180/


All Articles