From nobody Sat Nov 29 00:36:00 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 4dJB6T10mBz6HxmH for ; Sat, 29 Nov 2025 00:36:01 +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 4dJB6S5klrz40nb for ; Sat, 29 Nov 2025 00:36:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764376560; 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=PJyAMGx1Dg0NiQeJQIf1+IQfe0RdOkVsy4izjRBK5VQ=; b=shQwtcjmYWxv+zF/5O2ljKTyRX0dcsq4YD3xUmRZCkTMgbBkzKPW91F29tHCK+asXV53Lr LPHxK1uYI8e6zvObQG7zhayOAXo/ykSoLzXFho54Mx2QdOVGZWuB9e5anApERRKWOIEF3D fIItTTi6Ni+IifTAaQmr93Lw93aX1tMdW+g8Yl9r0NSb1i221Ik0ScCSZ7n414A+MRsyku pHEo2cpxqElJ2tO04AR8ByBKDKRNRkg0vGe4eBj9pWeG59xR4eeRQCAbVD2WPvshqMQmia /jdR32gc0+gm6jMu4hfXeb4pwtMusaNg6QqJnBo4M9UYL5G5Dm60A5SkQjnxZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764376560; 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=PJyAMGx1Dg0NiQeJQIf1+IQfe0RdOkVsy4izjRBK5VQ=; b=iSOSlVfx9Siqum10xct0p3go3APA01OwHnwvQjpMIC6c89zAZ3nBrJfRLNPqleVE0suz5+ hZq39rKyC9rmPSLN+xu7KeBtjtSnhXdJ914ggOlgMw04aUQDfC6PVSMRTCq1s3ffetH2Pr T7zr6Lukqrpwg9Pr+d5Xh7oH6V8LHLzHZqbJDaulfMHIK6oj8PJr1+mxWlxGOrTSZa8HGL gO4UPaoyZ2+IP4gKJ9lXTJ0dkq+htemvuOxxX+Cv0xff2OquXRbIFDI+DeyZ1ifEuJPbx2 7uA/T99jIDnvBrBXYajqELA5whHq/f9LjF2a4TZdaaXu+THh2suDmPT+ri9z/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764376560; a=rsa-sha256; cv=none; b=D2GVvkXr1DmSB1xm5YLTu0ebBdAg0wq4r9YIQJnm1l2W2x70mjHsV1I12/0y9FgYB1M3BX V6EpHTwbAsVN//C5u2Tf65CWSyr3BqzJT5blpCQ9n8jusgBPll4N3TypgESRX2CsMX7qXd U4i76GVMt0TU5nMIh1g86cYl+N0LBq0iqpxpIS1vd9GOdMwCNnHerQSJES4hcW61JpDGtm A85fUFZSvW3QMZETvJpVF5gnNqEcomZzBhhtwrDwCW7T1jAp3HZ2fxm6x4PlRkmpOZkUNi ixGAURBJYndCrt7ka4XOoULFCKF4EWqB4DTNYFzeBNlBEWJ8R+8b2NHNUxINsw== 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 4dJB6S5CRyz8m9 for ; Sat, 29 Nov 2025 00:36:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ddaf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 29 Nov 2025 00:36:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 4c10ec9bd43f - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 4c10ec9bd43feb86394dc2dc1c16f1c15d4b0285 Auto-Submitted: auto-generated Date: Sat, 29 Nov 2025 00:36:00 +0000 Message-Id: <692a3ff0.ddaf.7a52ab76@gitrepo.freebsd.org> The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=4c10ec9bd43feb86394dc2dc1c16f1c15d4b0285 commit 4c10ec9bd43feb86394dc2dc1c16f1c15d4b0285 Author: Jose Luis Duran AuthorDate: 2025-11-19 15:59:25 +0000 Commit: Jose Luis Duran CommitDate: 2025-11-29 00:31:57 +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); }