1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:17:36 +00:00

Kernel+Userland: Add support for using the PCSpeaker with various tones

This commit is contained in:
Liav A 2023-03-01 22:05:04 +02:00 committed by Sam Atkins
parent 2d27c98659
commit 11a7e21c2a
9 changed files with 26 additions and 12 deletions

View file

@ -4,11 +4,16 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibCore/ArgsParser.h>
#include <LibCore/System.h>
#include <LibMain/Main.h>
ErrorOr<int> serenity_main(Main::Arguments)
ErrorOr<int> serenity_main(Main::Arguments arguments)
{
TRY(Core::System::beep());
Optional<size_t> tone;
Core::ArgsParser args_parser;
args_parser.add_option(tone, "Beep tone", "beep-tone", 'f', "Beep tone (frequency in Hz)");
args_parser.parse(arguments);
TRY(Core::System::beep(tone));
return 0;
}