From nobody Sat Nov 29 00:36:18 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 4dJB6p72mzz6Hxn5 for ; Sat, 29 Nov 2025 00:36:18 +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 4dJB6p5Ry1z41PF for ; Sat, 29 Nov 2025 00:36:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764376578; 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=SK7WT4O+4nRWUq/DJjiNaujLEi2q6lRPAldQXtxgzbE=; b=DmvjwDaT/1RnI1KOvWnwoW/SJrkRPmNoXBBGbv+HrC+0nR8ZkDAp8HzulVTv40c3LqU6xk cBRizuH/FRGZt+60ZWvfrh1vYaFfp3U/eL9fOFPW1llk4lvsSX2MY+LYz5Cf3svk81BUmK LRlhbNW+bVFzN8B+NXvE1UHIKJBMvq72SHg6TqojBQhIr7E9+CiZycly+y/esatlndI9hJ vKScqbQOkv3PNrJeBHoNb8jOz22FDtBzPScYDWqYdU8/BJiZAyBB9JiLKYEn1gNJiZWS0q N5FGrdncyzeDR9irOceAwEJynQ+Ws7Le7WKsCzOYrl0lA9+k1Yf3ScU1Y+OA5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764376578; 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=SK7WT4O+4nRWUq/DJjiNaujLEi2q6lRPAldQXtxgzbE=; b=PiYoK6v1e/gw47KUSwjXFyZ8oN4Y9z4r4zDfy4+FD1FETQ9xJSFe/D0YjeuYhrCbg1jkTw VwbTWsADpDEI7cokgXANgwuiDhXz2nts5pbK5RoQEshwuUjSNlQXwHLKg1Ml+pzRYuZq+k VmaiqLdP+qeQBvoKydzXhTcwcox5PJP/DNo/8ZMYG9hdtDpTTpCrtmAwok8+9ZnSM6vOKZ a4FNG7ZKc5M1iBfUo9p0aw92CX6Idd8G9Gi5/ITguQHUIgYePItXh2Vxg4YtYDGRl4Nkug HFl/bV2B5shjXPzeJuCOe2r+Hdzi8KPoulgr+T8cb8CEar15gE+iihJjhKe4aA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764376578; a=rsa-sha256; cv=none; b=gEaMKa/lGWK4Nwah8yKn/gRgBgSoJPtDtMrSKeWaWArTm8GYWt5aLwry79fMGhUtLvSo0v v/rz5udZwkUql+0HGf76jbTgmP1pc4JYMilqZ3bhV1IOqyyQ3sQv1pCxq4LAut4bpdnp8Y +/X8/1IDqfbAWZ6bP5SrfJ2zmW15Y505NpmB6P7n6H2LSYE/wrfjyWpawlfq1RK5GxqCfM qSO9++0LB5yBrG+baLCeZBWA2pgb4enla3budN+L3ZNcS6HgJFYY84comJHCYUgWVOMxt2 XuoB1Yt/PO1XqokBFEkUXNZbXlEoapaz2xAjXbLtORyBES1wUc7M5bAQHfYywA== 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 4dJB6p514fz9F8 for ; Sat, 29 Nov 2025 00:36:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id df93 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 29 Nov 2025 00:36:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 8d338f99f8b1 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 8d338f99f8b1dc16d2175721c48201fce117fe43 Auto-Submitted: auto-generated Date: Sat, 29 Nov 2025 00:36:18 +0000 Message-Id: <692a4002.df93.2c462457@gitrepo.freebsd.org> The branch stable/13 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=8d338f99f8b1dc16d2175721c48201fce117fe43 commit 8d338f99f8b1dc16d2175721c48201fce117fe43 Author: Jose Luis Duran AuthorDate: 2025-11-19 15:59:25 +0000 Commit: Jose Luis Duran CommitDate: 2025-11-29 00:32:36 +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 29988c5b271d..d00ee73795aa 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 2696bacfacf4..5b219b4fd406 100644 --- a/usr.bin/beep/beep.c +++ b/usr.bin/beep/beep.c @@ -132,20 +132,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); }