xtd.console - Reference Guide  0.0.1
Modern c++17 library to manage terminal on Windows, macOS and Linux.

§ beep() [2/2]

template<class Char >
static bool xtd::basic_console< Char >::beep ( unsigned int  frequency,
unsigned int  duration 
)
inlinestaticnoexcept

Plays the sound of a beep of a specified frequency and duration through the console speaker.

Parameters
frequencyThe frequency of the beep, ranging from 37 to 32767 hertz
durationThe duration of the beep measured in milliseconds
Returns
false if ranging out of range; otherwise true.
Example
This example demonstrates the beep method by playing the first few notes of a song through the console speaker.