mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
Kernel+Userland: Add support for using the PCSpeaker with various tones
This commit is contained in:
parent
2d27c98659
commit
11a7e21c2a
Notes:
sideshowbarker
2024-07-17 07:35:03 +09:00
Author: https://github.com/supercomputer7
Commit: 11a7e21c2a
Pull-request: https://github.com/SerenityOS/serenity/pull/17687
Reviewed-by: https://github.com/AtkinsSJ
9 changed files with 26 additions and 12 deletions
|
@ -132,9 +132,9 @@ namespace Core::System {
|
|||
|
||||
#ifdef AK_OS_SERENITY
|
||||
|
||||
ErrorOr<void> beep()
|
||||
ErrorOr<void> beep(Optional<size_t> tone)
|
||||
{
|
||||
auto rc = ::sysbeep();
|
||||
auto rc = ::sysbeep(tone.value_or(440));
|
||||
if (rc < 0)
|
||||
return Error::from_syscall("beep"sv, -errno);
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue