crosswalk-project/chromium-crosswalk — pull request #128 by yinli (2014-02-25 04:47:09+00:00)
Title: [Android] Volume is too low when playing audio through WebAudio API

This patch is back ported from chromium trunk, since the too low sound in webaudio
brings a bad user experience, and gets so many compaints from web game developers.

Today, WebAudio uses the OpenSL ES low-latency audio backend in media/audio,
but the stream type is always communication mode (which is OK for WebRTC but
not for WebAudio).

This patch ensures that:
- Only switch to system-wide Communication mode when a low-latency input stream
is created (e.g. from getUserMedia).
- Opens the native output stream in Media mode if system mode is Media and in
Communication mode if system mode is Communication.

TEST=http://chromium.googlecode.com/svn/trunk/samples/audio/shiny-drum-machine.html

BUG=https://crosswalk-project.org/jira/browse/XWALK-980