Re: [PATCH] spice.h: Don't use 48kHz for playback/recording rates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Yeah, I buy it. The only code that may be affected is test_playback, but afaik, having it be a different tone is not really an issue.


So, ACK (and thanks!)

Cheers,

Jeremy

---
  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



_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]