From nobody Sat Nov 29 00:35:42 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dJB664bZlz6HxL0 for ; Sat, 29 Nov 2025 00:35:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dJB662NtMz40jr for ; Sat, 29 Nov 2025 00:35:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764376542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xO+m2PwEbLpsC/7ryMeQvBbSvQnI23DxQhb7YV/aEWY=; b=i7KERvZOl9j5/PmyvcnNh10j6GEPsUfAm5WJw5D3yA+QJ3YBLcnGqEEjlTWj3Op/Yc+3pb In+fMQpigLwA4cwx7leq9Uk8FoA7KLXEhl4zy2g5nD08vaE4lHXWFeChVBhWmndB0NceHK ynQkTDnHgrbOK3OumshvQWEYXkEMLv2nR9bGN82T68ByLO6pFhHokCY7VEVHl8hLuXUz6A 9QEcY7jnwNfb/QMzNJsw81SDQIhzqBBmFoqFmcKqjWXCxGV7dikDyqFM5k59AdL5WITuYF TdWYkfl0g2pNa+HWipJ4KNbtPPaT5uPGGi2D6s8MHxG0bhgkjwOvIXKoRkT82w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764376542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xO+m2PwEbLpsC/7ryMeQvBbSvQnI23DxQhb7YV/aEWY=; b=NX3MvBqg1Kyjhh99/k7XvegoNQoVGnnQYguMFfEXPwr0ZcRL0LceZIRjdg60DOipIoWuxM Plkzh7fTY863co/t2sTSckvU7xuiwFrbwo97rIvtI194EfaHFLevD4q7h/ZGf+cwzLGqfX oamdd6W75jrMMRlw1jpdu7nkYnQeeU2CNC5fQLne546Z4mj9MLehbf4rdj608VgDe1jd29 o4KZebwT73mCOIxzdoLxwd1uQ8D2qUigKn9uJ+qtH5EanXxldNWsaWdX9eR1zfmw1Fl8NS O5kKRR5w4ewa8K4My8oSSn9qg70DikiMdNObZPjqr+XbhMRfGyAkFzVtJZALxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764376542; a=rsa-sha256; cv=none; b=U2clyVh2oiWvfOpg5nnSwAJsChvBNRtaHHtQJ+Y1OJ+Kfiegspe7w81gjK4z3gy9aYvs4u 4zaANcUKyoMYevPrBj57Kb9ewzmXUSU+20M3vQXM9nkNAHhx2hmM3phQdiDaRPmZgfhRHY KTVmdDe6nxiFVDdaLaZ99inA1+/Bz8kUXt0YWPJJJR3SDxkEbVUtwIVr37a1bw2QaxLici Sp3OU9Xd5jRLlmWv0k0aPzrFPmL0RBIAKIhCz6OU30YrNTJcHx3aByy7UYtQ1mh5vinWD0 FTv4ifn3tzWKGDEW88bvf+lMp7+iRoVW+b7uejVW/AIHWNs225wse9P2gVKZXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dJB661tXkz98s for ; Sat, 29 Nov 2025 00:35:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ce53 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 29 Nov 2025 00:35:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 6bda3655b827 - stable/15 - beep: Sort usage and man page options List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6bda3655b8272aa9fd1301df3346aca4d5b0d39c Auto-Submitted: auto-generated Date: Sat, 29 Nov 2025 00:35:42 +0000 Message-Id: <692a3fde.ce53.1d0b82fa@gitrepo.freebsd.org> The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=6bda3655b8272aa9fd1301df3346aca4d5b0d39c commit 6bda3655b8272aa9fd1301df3346aca4d5b0d39c Author: Jose Luis Duran AuthorDate: 2025-11-19 15:59:25 +0000 Commit: Jose Luis Duran CommitDate: 2025-11-29 00:30:21 +0000 beep: Sort usage and man page options Sort usage and man page options, mention possible minimum and maximum values, fix punctuation marks, and cleanup the man page. PR: 291092 Reviewed by: pauamma_gundo.com, christos MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53827 (cherry picked from commit 55d98b024f25403f60efe04f90a391014b6bc388) --- usr.bin/beep/beep.1 | 55 ++++++++++++++++++++++++++++------------------------- usr.bin/beep/beep.c | 19 +++++++++--------- 2 files changed, 39 insertions(+), 35 deletions(-) diff --git a/usr.bin/beep/beep.1 b/usr.bin/beep/beep.1 index 732f2ae261cd..a13d220a7882 100644 --- a/usr.bin/beep/beep.1 +++ b/usr.bin/beep/beep.1 @@ -21,53 +21,55 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 4, 2021 -.Dt beep 1 +.Dd November 19, 2025 +.Dt BEEP 1 .Os .Sh NAME .Nm beep .Nd play a beep sound .Sh SYNOPSIS .Nm -.Op Fl F Ar frequency +.Op Fl Bh .Op Fl D Ar duration_ms -.Op Fl r Ar sample_rate_hz +.Op Fl F Ar frequency_hz .Op Fl d Ar oss_device .Op Fl g Ar gain -.Op Fl B -.Op Fl h +.Op Fl r Ar sample_rate_hz .Sh DESCRIPTION The .Nm -utility is used to playback a beep on the soundcard. +utility is used to play a beep on the sound card. .Pp The options are as follows: -.Bl -tag -width "-f device" -.It Fl F -Sets the center frequency of the beep in Hz. -The default is 440 Hz . -.It Fl D -Sets the duration of the beep in milliseconds. -The default is 150 ms . -.It Fl d -Sets the soundcard to use. -The default is /dev/dsp . -.It Fl r -Sets the soundcard samplerate in Hz. -The default is 48000 Hz. -.It Fl g -Sets the waveform gain, between 0 and 100 inclusively. -The default is 75. +.Bl -tag -width "-r sample_rate_hz" .It Fl B Runs the .Nm utility in the background. +.It Fl D Ar duration_ms +Sets the duration of the beep in milliseconds, +between 50\~ms and 2000\~ms inclusively. +The default is 150\~ms. +.It Fl F Ar frequency_hz +Sets the center frequency of the beep in Hz. +The default is 440\~Hz. +.It Fl d Ar oss_device +Sets the OSS device to use. +The default is +.Pa /dev/dsp . +.It Fl g Ar gain +Sets the waveform gain, between 0 and 100 inclusively. +The default is 75. .It Fl h Display summary of options. +.It Fl r Ar sample_rate_hz +Sets the sound card sample rate in Hz, +between 8000\~Hz and 48000\~Hz inclusively. +The default is 48000\~Hz. .El .Sh EXAMPLES -.Pp -Playback default beep sound using /dev/dsp . +Play default beep sound on +.Pa /dev/dsp : .Bl -tag -width Ds -offset indent .It $ beep .El @@ -77,6 +79,7 @@ Playback default beep sound using /dev/dsp . .Sh HISTORY The .Nm -utility first appeared in FreeBSD 14.0. +utility first appeared in +.Fx 14.0 . .Sh AUTHORS .An Hans Petter Selasky Aq Mt hselasky@FreeBSD.org diff --git a/usr.bin/beep/beep.c b/usr.bin/beep/beep.c index 9d274770ad75..d16ad5b699c3 100644 --- a/usr.bin/beep/beep.c +++ b/usr.bin/beep/beep.c @@ -133,20 +133,21 @@ wave_function_16(float phase, float power) static void usage(void) { - fprintf(stderr, "Usage: %s [parameters]\n" - "\t" "-F \n" + fprintf(stderr, "Usage: %s [-Bh] [-D duration_ms] [-F frequency_hz] " + "[-d oss_device] [-g gain] [-r sample_rate_hz]\n" + "\t" "-B Run in background\n" "\t" "-D \n" - "\t" "-r \n" - "\t" "-d \n" + "\t" "-F \n" + "\t" "-d \n" "\t" "-g \n" - "\t" "-B Run in background\n" - "\t" "-h Show usage\n", + "\t" "-h Show usage\n" + "\t" "-r \n", getprogname(), - DEFAULT_HZ, DURATION_MIN, DURATION_MAX, DURATION_DEF, - SAMPLE_RATE_MIN, SAMPLE_RATE_MAX, SAMPLE_RATE_DEF, + DEFAULT_HZ, DEFAULT_DEVICE, - GAIN_MIN, GAIN_MAX, GAIN_DEF); + GAIN_MIN, GAIN_MAX, GAIN_DEF, + SAMPLE_RATE_MIN, SAMPLE_RATE_MAX, SAMPLE_RATE_DEF); exit(1); }