Reputation: 27673
How can I capture/redirect the sound produced by, say:
Console.Beep(400, 1000);
Either to some byte buffer or directly to a wav file would be fine.
I've searched, but only found ways to redirect the text output, not sounds.
Upvotes: 4
Views: 657
Reputation: 109567
You will not be able to redirect the beep sound.
Console.Beep()
is implemented by a call to the Windows API Beep() function
which calls into the Sound Card hardware if it can.
You have several options:
I reckon the last of those is your best bet.
Upvotes: 6