Only reinitialize AudioProcessing when needed.

This takes away the burden from the user, resulting in cleaner code.

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3010 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
andrew@webrtc.org
2012-10-27 00:28:27 +00:00
parent e08adf0957
commit 8186534111
4 changed files with 274 additions and 247 deletions

View File

@ -13,8 +13,8 @@
#include <stddef.h> // size_t
#include "typedefs.h"
#include "module.h"
#include "typedefs.h"
namespace webrtc {
@ -124,6 +124,10 @@ class AudioProcessing : public Module {
// should be called before beginning to process a new audio stream. However,
// it is not necessary to call before processing the first stream after
// creation.
//
// set_sample_rate_hz(), set_num_channels() and set_num_reverse_channels()
// will trigger a full initialization if the settings are changed from their
// existing values. Otherwise they are no-ops.
virtual int Initialize() = 0;
// Sets the sample |rate| in Hz for both the primary and reverse audio