Rewriting the SoundMeter class to be RMS and be encapsulated differently

This CL changes the SoundMeter to be root-mean-square.
It also changes the interface between the meter and the display to be based on the display calling down to the meter rather than the meter calling up to the display.

A graphic display of the results is also added.

BUG=
R=cwilso@google.com, dutton@google.com, henrika@webrtc.org, juberti@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5256 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
hta@webrtc.org
2013-12-11 08:36:16 +00:00
parent 77507eff4f
commit c4038d795d
2 changed files with 104 additions and 55 deletions

View File

@ -77,13 +77,17 @@ if (navigator.mozGetUserMedia) {
};
// Fake get{Video,Audio}Tracks
MediaStream.prototype.getVideoTracks = function() {
return [];
};
if (!MediaStream.prototype.getVideoTracks) {
MediaStream.prototype.getVideoTracks = function() {
return [];
};
}
MediaStream.prototype.getAudioTracks = function() {
return [];
};
if (!MediaStream.prototype.getAudioTracks) {
MediaStream.prototype.getAudioTracks = function() {
return [];
};
}
} else if (navigator.webkitGetUserMedia) {
console.log("This appears to be Chrome");