Fix advertised sound playback/recording rates in public headers
Resolves: rhbz#1129961 (QEMU would need a rebuild though)
This commit is contained in:
parent
6838c6cf7e
commit
4c96febcdd
@ -0,0 +1,56 @@
|
|||||||
|
From 288cf77f804187a3e77ae2a5a21d108d101d22ce Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christophe Fergeau <cfergeau@redhat.com>
|
||||||
|
Date: Tue, 19 Aug 2014 11:09:05 +0200
|
||||||
|
Subject: [PATCH] spice.h: Don't use 48kHz for playback/recording rates
|
||||||
|
|
||||||
|
When adding Opus support, SPICE_INTERFACE_PLAYBACK_FREQ and
|
||||||
|
SPICE_INTERFACE_RECORD_FREQ in the public header 'spice.h' were changed
|
||||||
|
from 44100 to 48000.
|
||||||
|
However, this was not really useful as these constants are not used in
|
||||||
|
spice-server, but only by users of spice-server (ie QEMU).
|
||||||
|
It turns out changing these values is actually harmful. QEMU uses these
|
||||||
|
constants in 2 situations:
|
||||||
|
1. when it's a version of QEMU with this commit, but we are compiling
|
||||||
|
against older spice-server headers (before Opus support was added)
|
||||||
|
2. when it's a version of QEMU without commit 795ca114d35 which added
|
||||||
|
what is needed for Opus support
|
||||||
|
|
||||||
|
When we are in the second situation, having 48000 in the public header
|
||||||
|
will actually cause issues as spice-server will know QEMU does not
|
||||||
|
support Opus, so internally spice-server will be using a 44100 rate for
|
||||||
|
audio. However, QEMU will be using SPICE_INTERFACE_.*_FREQ and think it
|
||||||
|
should use a 48000 rate, which will cause distorsions as experienced in
|
||||||
|
bug https://bugzilla.redhat.com/show_bug.cgi?id=1129961
|
||||||
|
|
||||||
|
Reverting these constants back to 44100 will fix audio in the 'new
|
||||||
|
spice-server/old QEMU' scenario, and won't cause issues either when both
|
||||||
|
support Opus as in this case these constants are not used.
|
||||||
|
---
|
||||||
|
server/spice.h | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/server/spice.h b/server/spice.h
|
||||||
|
index c648a1d..58700d1 100644
|
||||||
|
--- a/server/spice.h
|
||||||
|
+++ b/server/spice.h
|
||||||
|
@@ -342,7 +342,7 @@ enum {
|
||||||
|
SPICE_INTERFACE_AUDIO_FMT_S16 = 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
-#define SPICE_INTERFACE_PLAYBACK_FREQ 48000
|
||||||
|
+#define SPICE_INTERFACE_PLAYBACK_FREQ 44100
|
||||||
|
#define SPICE_INTERFACE_PLAYBACK_CHAN 2
|
||||||
|
#define SPICE_INTERFACE_PLAYBACK_FMT SPICE_INTERFACE_AUDIO_FMT_S16
|
||||||
|
|
||||||
|
@@ -372,7 +372,7 @@ typedef struct SpiceRecordInterface SpiceRecordInterface;
|
||||||
|
typedef struct SpiceRecordInstance SpiceRecordInstance;
|
||||||
|
typedef struct SpiceRecordState SpiceRecordState;
|
||||||
|
|
||||||
|
-#define SPICE_INTERFACE_RECORD_FREQ 48000
|
||||||
|
+#define SPICE_INTERFACE_RECORD_FREQ 44100
|
||||||
|
#define SPICE_INTERFACE_RECORD_CHAN 2
|
||||||
|
#define SPICE_INTERFACE_RECORD_FMT SPICE_INTERFACE_AUDIO_FMT_S16
|
||||||
|
|
||||||
|
--
|
||||||
|
1.9.3
|
||||||
|
|
@ -1,11 +1,12 @@
|
|||||||
Name: spice
|
Name: spice
|
||||||
Version: 0.12.5
|
Version: 0.12.5
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
Summary: Implements the SPICE protocol
|
Summary: Implements the SPICE protocol
|
||||||
Group: User Interface/Desktops
|
Group: User Interface/Desktops
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://www.spice-space.org/
|
URL: http://www.spice-space.org/
|
||||||
Source0: http://www.spice-space.org/download/releases/%{name}-%{version}.tar.bz2
|
Source0: http://www.spice-space.org/download/releases/%{name}-%{version}.tar.bz2
|
||||||
|
Patch0: 0001-spice.h-Don-t-use-48kHz-for-playback-recording-rates.patch
|
||||||
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=613529
|
# https://bugzilla.redhat.com/show_bug.cgi?id=613529
|
||||||
%if 0%{?rhel}
|
%if 0%{?rhel}
|
||||||
@ -61,6 +62,7 @@ using spice-server, you will need to install spice-server-devel.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -91,6 +93,10 @@ mkdir -p %{buildroot}%{_libexecdir}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Aug 25 2014 Christophe Fergeau <cfergeau@redhat.com> 0.12.5-5
|
||||||
|
- Fix advertised sound playback/recording rates in public headers
|
||||||
|
Resolves: rhbz#1129961 (QEMU would need a rebuild though)
|
||||||
|
|
||||||
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12.5-4
|
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12.5-4
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user