shithub: opus-tools

Download patch

ref: 7a986008f9efd929ed1e251794c5928cb5f04e27
parent: bc190e538bcaa2786e1a9697d2763153621e1eea
author: Mark Harris <mark.hsj@gmail.com>
date: Wed Sep 30 21:51:00 EDT 2015

opusenc: Don't warn about mono center channel WAV

Even if it has only one channel, an input WAV file can contain a
channel mask. A warning is issued if it is present but not a
supported value. Don't warn about the previously accepted mask
of 1 (FL), or 4 (FC).  Arguably a channel mask of 1 (FL) should
trigger the warning, just as 2 (FR) does, but some tools (including
old opusdec when decoding to floating point WAV) actually write an
incorrect channel mask of 1 for mono WAV files.

--- a/src/audio-in.c
+++ b/src/audio-in.c
@@ -570,7 +570,8 @@
                 "remapping speakers to Vorbis 7.1 format.\n"));
         break;
       case 0:    /* default/undeclared */
-      case 1:    /* mono */
+      case 1:    /* mono (left only) */
+      case 4:    /* mono (center only) */
       case 3:    /* stereo */
       case 51:   /* quad */
       case 55:   /* 5.0 */