Fix common_audio warnings.

- Unused variable.
- Explicit operator precedence.
Review URL: http://webrtc-codereview.appspot.com/112004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@380 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
andrew@webrtc.org 2011-08-16 16:39:32 +00:00
parent 7189270640
commit 5cdec9e399
2 changed files with 7 additions and 3 deletions

View File

@ -21,6 +21,8 @@
namespace webrtc
{
// TODO(andrew): the implementation depends on the exact values of this enum.
// It should be rewritten in a less fragile way.
enum ResamplerType
{
// 4 MSB = Number of channels

View File

@ -62,8 +62,9 @@ Resampler::Resampler(int inFreq, int outFreq, ResamplerType type)
slave_left_ = NULL;
slave_right_ = NULL;
int res = Reset(inFreq, outFreq, type);
// TODO(andrew): looks like this class should use an init method
// (and possibly a static create).
Reset(inFreq, outFreq, type);
}
Resampler::~Resampler()
@ -185,7 +186,8 @@ int Resampler::Reset(int inFreq, int outFreq, ResamplerType type)
if ((my_type_ & 0xf0) == 0x20)
{
// Change type to mono
type = (ResamplerType)((int)type & 0x0f + 0x10);
type = static_cast<ResamplerType>(
((static_cast<int>(type) & 0x0f) + 0x10));
slave_left_ = new Resampler(inFreq, outFreq, type);
slave_right_ = new Resampler(inFreq, outFreq, type);
}