Here's an update of the port to include 8.0, plus Larry's diff.
OK?

On 2026/03/30 21:22, Larry Moore wrote:
> I'm submitting a patch for consideration to improve the audio in
> asterisk-openbsd-moh.
> 
> IMHO, the audio quality is discernibly better when the files are generated
> using sox.
> 
> Thank you.
> 
> Larry.

> -BUILD_DEPENDS =              audio/madplay
> +BUILD_DEPENDS =              audio/sox

madplay was originally chosen because it was significantly faster on
some archs; this isn't such a concern now, so the higher quality makes
sense.

Index: Makefile
===================================================================
RCS file: /cvs/ports/telephony/asterisk-openbsd-moh/Makefile,v
diff -u -p -r1.38 Makefile
--- Makefile    21 May 2026 14:07:59 -0000      1.38
+++ Makefile    29 Oct 2026 19:06:19 -0000
@@ -8,13 +8,13 @@ PORTROACH=            ignore:1
 
 COMMENT =              add OpenBSD songs to Asterisk music-on-hold
 
-PKGNAME =              asterisk-openbsd-moh-7.9
+PKGNAME =              asterisk-openbsd-moh-8.0
 REL_LIST =             30 31 32 33 34 35 36 37 38 39 \
                        40 41 42 43 44 45 46 47 48 49 \
                        50 51 52 53 54 55 56 57 \
                        58a 58b 58c 58d 59a 59b \
                        60a 60b 60c 60d 60e 60f 60g 61 62 68 69 \
-                       70 73 79
+                       70 73 79 80
 .for release in ${REL_LIST}
 DISTFILES += song${release}.mp3
 .endfor
@@ -31,9 +31,9 @@ MAINTAINER=           Ian Darwin <[email protected]
 # Copyright held by Theo; ok for non-commercial-redistribution
 PERMIT_PACKAGE =       Yes
 
-SITES =                        https://ftp.openbsd.org/pub/OpenBSD/songs/
+SITES =                        https://cdn.openbsd.org/pub/OpenBSD/songs/
 
-BUILD_DEPENDS =                audio/madplay
+BUILD_DEPENDS =                audio/sox
 
 DIST_SUBDIR =          openbsd_songs
 
@@ -43,9 +43,9 @@ MOH =                 ${PREFIX}/share/asterisk/moh
 
 do-build:
 .for release in ${REL_LIST}
-       ${PREFIX}/bin/madplay -a -1.5 -Q -z -o raw:- --mono -R 8000 -a -12 \
-               ${FULLDISTDIR}/song${release}.mp3 > ${WRKDIR}/song${release}.sln
-.endfor 
+       ${PREFIX}/bin/sox -v 0.333 ${FULLDISTDIR}/song${release}.mp3 \
+               -c 1 -L -b 16 -r 8k -t raw ${WRKDIR}/song${release}.sln
+.endfor
 
 do-install:
        ${INSTALL_DATA_DIR} ${MOH}
Index: distinfo
===================================================================
RCS file: /cvs/ports/telephony/asterisk-openbsd-moh/distinfo,v
diff -u -p -r1.27 distinfo
--- distinfo    21 May 2026 14:07:59 -0000      1.27
+++ distinfo    29 Oct 2026 19:06:19 -0000
@@ -46,6 +46,7 @@ SHA256 (openbsd_songs/song69.mp3) = 8ogY
 SHA256 (openbsd_songs/song70.mp3) = 
VZ028fPibBc24Ty+b9tSUOfxDFc7kxQarCPfP8vt9IE=
 SHA256 (openbsd_songs/song73.mp3) = 
yxGxSOdcnzA/XSChAIdWGH3i8dkwJNOvjnTX47DoV88=
 SHA256 (openbsd_songs/song79.mp3) = 
fItoeZtjHHyfTTlTM9jE1HGxgM0ai9z4Fn7qFR3our0=
+SHA256 (openbsd_songs/song80.mp3) = 
Ki2Uk2xhtc1F27jtK2xE0ck7chP6R4LdLgsTdb0L0zs=
 SIZE (openbsd_songs/song30.mp3) = 2898547
 SIZE (openbsd_songs/song31.mp3) = 2912757
 SIZE (openbsd_songs/song32.mp3) = 2589676
@@ -94,3 +95,4 @@ SIZE (openbsd_songs/song69.mp3) = 653019
 SIZE (openbsd_songs/song70.mp3) = 6231770
 SIZE (openbsd_songs/song73.mp3) = 9278611
 SIZE (openbsd_songs/song79.mp3) = 5936691
+SIZE (openbsd_songs/song80.mp3) = 6091008
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/telephony/asterisk-openbsd-moh/pkg/PLIST,v
diff -u -p -r1.25 PLIST
--- pkg/PLIST   21 May 2026 14:07:59 -0000      1.25
+++ pkg/PLIST   29 Oct 2026 19:06:19 -0000
@@ -48,3 +48,4 @@ share/asterisk/moh/song69.sln
 share/asterisk/moh/song70.sln
 share/asterisk/moh/song73.sln
 share/asterisk/moh/song79.sln
+share/asterisk/moh/song80.sln

Reply via email to