Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package pcaudiolib for openSUSE:Factory 
checked in at 2022-05-06 18:59:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pcaudiolib (Old)
 and      /work/SRC/openSUSE:Factory/.pcaudiolib.new.1538 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "pcaudiolib"

Fri May  6 18:59:00 2022 rev:4 rq:974989 version:1.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/pcaudiolib/pcaudiolib.changes    2019-04-23 
14:41:29.429656153 +0200
+++ /work/SRC/openSUSE:Factory/.pcaudiolib.new.1538/pcaudiolib.changes  
2022-05-06 18:59:15.273351042 +0200
@@ -1,0 +2,8 @@
+Wed May  4 09:14:39 UTC 2022 - Ferdinand Thiessen <[email protected]>
+
+- Update to version 1.2
+  * Fix cancellation snappiness
+  * Alsa: fixed sample_size calculation, multiply with channel count.
+  * Fix some typos
+
+-------------------------------------------------------------------

Old:
----
  pcaudiolib-1.1.tar.gz

New:
----
  pcaudiolib-1.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ pcaudiolib.spec ++++++
--- /var/tmp/diff_new_pack.djive0/_old  2022-05-06 18:59:15.785351601 +0200
+++ /var/tmp/diff_new_pack.djive0/_new  2022-05-06 18:59:15.789351606 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package pcaudiolib
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,12 +18,12 @@
 
 %define sover   0
 Name:           pcaudiolib
-Version:        1.1
+Version:        1.2
 Release:        0
 Summary:        Portable C Audio Library
 License:        GPL-3.0-or-later
 Group:          Development/Libraries/C and C++
-Url:            http://reecedunn.co.uk/espeak-for-android
+URL:            https://reecedunn.co.uk/espeak-for-android
 Source:         
https://github.com/espeak-ng/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
 BuildRequires:  gcc-c++
 BuildRequires:  libtool
@@ -55,7 +55,7 @@
 %build
 ./autogen.sh
 %configure --disable-static --disable-silent-rules
-make %{?_smp_mflags}
+%make_build
 
 %install
 %make_install

++++++ pcaudiolib-1.1.tar.gz -> pcaudiolib-1.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pcaudiolib-1.1/CHANGELOG.md 
new/pcaudiolib-1.2/CHANGELOG.md
--- old/pcaudiolib-1.1/CHANGELOG.md     2018-02-27 08:23:12.000000000 +0100
+++ new/pcaudiolib-1.2/CHANGELOG.md     2021-08-18 10:03:58.000000000 +0200
@@ -1,6 +1,13 @@
 # Change Log
 
-## 1.1 - (In Development)
+## 1.2 - \[18 Aug 2021\]
+
+*  Fix cancellation snappiness
+*  Fix build on non-linux
+*  Alsa: fixed sample_size calculation, multiply with channel count.
+*  Fix some typos
+
+## 1.1 - \[27 Feb 2018\]
 
 *  Fix handling EBADFD, EPIPE and short write when writing to the ALSA device.
 *  Fix audio echos when using `snd_pcm_drop` in ALSA devices.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pcaudiolib-1.1/README.md new/pcaudiolib-1.2/README.md
--- old/pcaudiolib-1.1/README.md        2018-02-27 08:23:12.000000000 +0100
+++ new/pcaudiolib-1.2/README.md        2021-08-18 10:03:58.000000000 +0200
@@ -1,4 +1,4 @@
-# Portible C Audio Library
+# Portable C Audio Library 1.2
 
 - [Build Dependencies](#build-dependencies)
   - [Debian](#debian)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pcaudiolib-1.1/configure.ac 
new/pcaudiolib-1.2/configure.ac
--- old/pcaudiolib-1.1/configure.ac     2018-02-27 08:23:12.000000000 +0100
+++ new/pcaudiolib-1.2/configure.ac     2021-08-18 10:03:58.000000000 +0200
@@ -1,5 +1,5 @@
 AC_PREREQ([2.65])
-AC_INIT([pcaudiolib], [1.1], [https://github.com/rhdunn/pcaudiolib/issues], 
[], [https://github.com/rhdunn/pcaudiolib])
+AC_INIT([pcaudiolib], [1.2], [https://github.com/rhdunn/pcaudiolib/issues], 
[], [https://github.com/rhdunn/pcaudiolib])
 AM_INIT_AUTOMAKE()
 
 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pcaudiolib-1.1/src/alsa.c 
new/pcaudiolib-1.2/src/alsa.c
--- old/pcaudiolib-1.1/src/alsa.c       2018-02-27 08:23:12.000000000 +0100
+++ new/pcaudiolib-1.2/src/alsa.c       2021-08-18 10:03:58.000000000 +0200
@@ -53,7 +53,7 @@
                return -EEXIST;
 
        snd_pcm_format_t pcm_format;
-#define FORMAT(srcfmt, dstfmt, size) case srcfmt: pcm_format = dstfmt; 
self->sample_size = size; break;
+#define FORMAT(srcfmt, dstfmt, size) case srcfmt: pcm_format = dstfmt; 
self->sample_size = size*channels; break;
        switch (format)
        {
        FORMAT(AUDIO_OBJECT_FORMAT_ALAW,      SND_PCM_FORMAT_A_LAW, 1)
@@ -99,6 +99,7 @@
 
        snd_pcm_hw_params_t *params = NULL;
        snd_pcm_hw_params_malloc(&params);
+       snd_pcm_uframes_t bufsize = (rate * channels * LATENCY) / 1000;
 
        int err = 0;
        if ((err = snd_pcm_open(&self->handle, self->device ? self->device : 
"default", SND_PCM_STREAM_PLAYBACK, 0)) < 0)
@@ -113,6 +114,8 @@
                goto error;
        if ((err = snd_pcm_hw_params_set_channels(self->handle, params, 
channels)) < 0)
                goto error;
+       if ((err = snd_pcm_hw_params_set_buffer_size_near(self->handle, params, 
&bufsize)) < 0)
+               goto error;
        if ((err = snd_pcm_hw_params(self->handle, params)) < 0)
                goto error;
        if ((err = snd_pcm_prepare(self->handle)) < 0)
@@ -204,12 +207,18 @@
                        nToWrite -= nWritten;
                        data += nWritten * self->sample_size;
                        // Open question: if a signal caused the short read, 
should we snd_pcm_prepare?
-               } else if ((nWritten == -EPIPE) || (nWritten == -EBADFD)) {
+               } else if ((nWritten == -EPIPE)
+#ifdef EBADFD
+                   || (nWritten == -EBADFD)
+#endif
+                   ) {
                        // Either there was an underrun or the PCM was in a bad 
state.
                        err = snd_pcm_prepare(self->handle);
                        if (err != 0)
                                break;
-               } else if (nWritten == -ESTRPIPE) {
+               }
+#ifdef ESTRPIPE
+               else if (nWritten == -ESTRPIPE) {
                        // Sound suspended, try to resume.
                        do {
                                err = snd_pcm_resume(self->handle);
@@ -223,7 +232,9 @@
                        if (err < 0) {
                                break;
                        }
-               } else {
+               }
+#endif
+               else {
                        err = nWritten;
                        break;
                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pcaudiolib-1.1/src/audio_priv.h 
new/pcaudiolib-1.2/src/audio_priv.h
--- old/pcaudiolib-1.1/src/audio_priv.h 2018-02-27 08:23:12.000000000 +0100
+++ new/pcaudiolib-1.2/src/audio_priv.h 2021-08-18 10:03:58.000000000 +0200
@@ -52,6 +52,10 @@
                                 int error);
 };
 
+/* We try to aim for 10ms cancelation latency, which will be perceived as
+ * "snappy" by users */
+#define LATENCY 10
+
 #if defined(_WIN32) || defined(_WIN64)
 
 #include <windows.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pcaudiolib-1.1/src/pulseaudio.c 
new/pcaudiolib-1.2/src/pulseaudio.c
--- old/pcaudiolib-1.1/src/pulseaudio.c 2018-02-27 08:23:12.000000000 +0100
+++ new/pcaudiolib-1.2/src/pulseaudio.c 2021-08-18 10:03:58.000000000 +0200
@@ -74,6 +74,13 @@
        }
 
        int error = 0;
+       pa_buffer_attr battr;
+
+       battr.fragsize = (uint32_t) -1;
+       battr.maxlength = (uint32_t) -1;
+       battr.minreq = (uint32_t) -1;
+       battr.prebuf = (uint32_t) -1;
+       battr.tlength = pa_bytes_per_second(&self->ss) * LATENCY / 1000;
        self->s = pa_simple_new(NULL,
                                self->application_name,
                                PA_STREAM_PLAYBACK,
@@ -81,7 +88,7 @@
                                self->description,
                                &self->ss,
                                NULL,
-                               NULL,
+                               &battr,
                                &error);
        return error;
 }

Reply via email to