Re: Multichannel files and ChannelSplitter channel layout issue

Hello,

I discovered the same issue - the multichannel audio decoding in Chrome and
Safari producing different results. To solve this issue, Omnitone uses a
router object:
https://github.com/GoogleChrome/omnitone#foarouter

The FOARouter is a simple collection of 1 splitter and 1 merger. It can
dynamically remap the channel layout when it's needed.

It's not ideal that you have to sniff the browser and have a different code
path, but there is not much we can do. Chrome decodes the file with the
built-in FFMPEG, but Safari uses the OS-provided decoder. The spec does not
mandate the channel layout order yet so it is entirely up to the browser
implementors.

FWIW, I believe the channel layout is should be a part of HTMLMediaElement,
not the Web Audio API.

-Hongchan

On Thu, Nov 17, 2016 at 10:42 AM Vincent Jousse <contact@ftsoftware.fr>
wrote:

> Hi,
>
> I’ve just created a simple audio graph with a MediaElementAudioSourceNode
> connected to ChannelSplitterNode with 6 outputs. The MediaElement's source
> is a multichannel (5.1) m4a file.
> Only the first ChannelSplitterNode’s output is connected to the audio
> context’s AudioDestinationNode.
> I get different behaviors on Chrome and Safari : Chrome plays the
> front-left channel whereas Safari plays the front-center channel.
>
> Is there anyway to « normalize » the channel splitter behavior ? Or should
> I create a bug on the WebAudioAPI to block the channel order as it is done
> for the up/down mixing ?
>
> Vincent
>
>
>
>
>

Received on Thursday, 17 November 2016 18:53:01 UTC