Skip to content

Commit

Permalink
pcaudiolib: update to 1.3.
Browse files Browse the repository at this point in the history
Merge pull request #30 from espeak-ng/rel-1.3

release 1.3
Merge pull request #29 from DataTriny/oss-close-device

Fix OSS device never getting closed
Merge pull request #25 from barracuda156/darwin

Fix headers for macOS
Merge pull request #21 from brad0/oss_cleanup
Cleanup header checks for OSS

OpenBSD no longer uses OSS so remove the soundcard.h header check.
FreeBSD / NetBSD / DragonFly / Linux all use sys/soundcard.h.
Merge pull request #20 from codeofdusk/build-on-macos
Check-in Mac fixes
Merge pull request #18 from zment4/master
Copy audio buffer and send for playback without blocking, fixes Windows audio choppyness
Fix latency-related buffer sizing

Turns out that eSpeak-NG (the main user of this lib) enforces a minimum
buffer size of 60ms which is also the default size. This explains why
smaller LATENCY values were inducing choppiness in the audio on some
systems. Adjust the comment accordingly,.

Also make sure computed buffer sizes don't land in the middle of a
sample frame. Doing (samplerate * channels * LATENCY) / 1000 is wrong.

Both ALSA and PulseAudio provide nice abstractions for buffer sizing
so let's use them directly. In the ALSA case in particular, we want the
period to be 60ms, not the whole buffer, so to interleave speech audio
computation and audio playback.
Fix audio choppiness on some systems

Commit a41d46e816d2 ("Fix cancellation snappiness") made espeak unusable
on the RaspberryPi due to extreme audio choppiness. This can sometimes
be observed on some PC-type systems as well, albeit much less
prominently.

Relax the timing to the smallest value that makes it work again on the
RaspberryPi.
Issue #9: update notes about build environment
  • Loading branch information
0-wiz-0 committed Dec 26, 2024
1 parent b1f593d commit 23881af
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
7 changes: 3 additions & 4 deletions audio/pcaudiolib/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# $NetBSD: Makefile,v 1.1 2024/02/29 14:15:41 bsiegert Exp $
# $NetBSD: Makefile,v 1.2 2024/12/26 11:36:55 wiz Exp $

DISTNAME= pcaudiolib-1.2
DISTNAME= pcaudiolib-1.3
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_GITHUB:=espeak-ng/}
GITHUB_PROJECT= pcaudiolib
GITHUB_RELEASE= 1.2
GITHUB_RELEASE= ${PKGVERSION_NOREV}

MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://github.com/espeak-ng/pcaudiolib/
Expand Down
10 changes: 5 additions & 5 deletions audio/pcaudiolib/distinfo
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
$NetBSD: distinfo,v 1.1 2024/02/29 14:15:41 bsiegert Exp $
$NetBSD: distinfo,v 1.2 2024/12/26 11:36:55 wiz Exp $

BLAKE2s (pcaudiolib-1.2.tar.gz) = 11dc27e944fb2edba51c0b4f1da100e7279e44e24821941e3fdd222c85b2da94
SHA512 (pcaudiolib-1.2.tar.gz) = 803e8c36646f780b9e9a98600092af366ad47ecf9cb447b9b6c82b75eb316ee65674832fc0cbfa56ee4d508ae1d0f69890f5885817e6df3e2ecef54571b936d6
Size (pcaudiolib-1.2.tar.gz) = 377066 bytes
BLAKE2s (pcaudiolib-1.3.tar.gz) = 020bd0378bacc4bb357025d4a7da572b5ed4b560dfca762df6f14830fcb8d8d5
SHA512 (pcaudiolib-1.3.tar.gz) = ed5e5bbb8fab89195d647260610d92d823dd3ac171b9d86159772674ffea973e46136e4d991a18cac393c9a8c0fa848f69cb61087e315a12a15435003a983fb2
Size (pcaudiolib-1.3.tar.gz) = 390894 bytes
SHA1 (patch-Makefile.am) = 98b94b9187db8c10980081fb2db54f4305734a71
SHA1 (patch-configure.ac) = f5cfa55793b644572ccb3d26ae82d2699204e894
SHA1 (patch-configure.ac) = 211f1fa50f673b0480632e595498f2a27ba5c9ad
SHA1 (patch-src_audio.c) = c249bf6b0efe3f6b9a6166b3ab7857314d73e297
SHA1 (patch-src_audio__priv.h) = d38ff94692362e8e801c9a7f671b8ac46bdf8b21
SHA1 (patch-src_netbsd.c) = 96ff1f35bbcee8107b33166a4daad902c9a1e1b9
10 changes: 5 additions & 5 deletions audio/pcaudiolib/patches/patch-configure.ac
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
$NetBSD: patch-configure.ac,v 1.1 2024/02/29 14:15:41 bsiegert Exp $
$NetBSD: patch-configure.ac,v 1.2 2024/12/26 11:36:55 wiz Exp $

Add NetBSD native audio support

--- configure.ac.orig 2021-07-30 12:08:56.000000000 +0000
--- configure.ac.orig 2024-12-12 14:16:30.000000000 +0000
+++ configure.ac
@@ -152,6 +152,29 @@ else
@@ -142,6 +142,29 @@ else
fi

dnl ================================================================
Expand Down Expand Up @@ -34,9 +34,9 @@ Add NetBSD native audio support
dnl Generate output.
dnl ================================================================

@@ -172,4 +195,5 @@ AC_MSG_NOTICE([
@@ -162,4 +185,5 @@ AC_MSG_NOTICE([
QSA support: ${have_qsa}
Coreaudio support: ${have_coreaudio}
Coreaudio support: ${have_coreaudio}
OSS support: ${have_oss}
+ NetBSD support: ${have_netbsd}
])

0 comments on commit 23881af

Please sign in to comment.