xians@webrtc.org 8fff1f065e Merge r4394 from stable to trunk.
r4326 was mistakenly committed to stable, so this is to re-merge back to trunk.

Fixed the AGC and interface problems on the new path.

In order to make the AGC work properly, we need to cache the volume value passed
by the callback, compare it with the value returned by
shared->transmit_mixer()->CaptureLevel(). If they are the same, we need to
return 0 to indicate no volume needs changing, otherwise return the new volume.
By doing this, we avoid setting the volume all the same, which allows the users
to change the volume manually.

This patch also fixes some minor issues with the interfaces too: make the int
channel[] const, and correct the order of the input params in
channel::Demultiplex.

R=tommi@webrtc.org

BUG=[2134]
TEST=compile && manual AGC test

Review URL: https://webrtc-codereview.appspot.com/1921004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4450 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-31 16:27:42 +00:00
..
2012-10-22 18:19:23 +00:00

INSTRUCTIONS:

- Start with test #3 (Device enumeration) to get an overview of the available
  audio devices.
- Next, proceed with test #4 (Device selection) to get more details about 
  the supported functions for each audio device.
- Verify two-way audio in test #5. 
  Repeat this test for different selections of playout and recording devices.
- More detailed tests (volume, mute etc.) can also be performed using #6-#11.

NOTE:

- Some tests requires that the user opens up the audio mixer dialog and 
  verifies that a certain action (e.g. Mute ON/OFF) is executed correctly.
- Files can be recorded during some tests to enable off-line analysis.
- Full support of 'Default Communication' devices requires Windows 7.
- If a test consists of several sub tests, press any key to start a new sub test.

KNOWN ISSUES:

- Microphone Boost control is not supported on Windows Vista or Windows 7.
- Speaker and microphone volume controls will not work as intended on Windows
  Vista if a 'Default Communication' device is selected in any direction.