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:
@@ -21,6 +21,8 @@
|
|||||||
namespace webrtc
|
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
|
enum ResamplerType
|
||||||
{
|
{
|
||||||
// 4 MSB = Number of channels
|
// 4 MSB = Number of channels
|
||||||
|
@@ -62,8 +62,9 @@ Resampler::Resampler(int inFreq, int outFreq, ResamplerType type)
|
|||||||
slave_left_ = NULL;
|
slave_left_ = NULL;
|
||||||
slave_right_ = 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()
|
Resampler::~Resampler()
|
||||||
@@ -185,7 +186,8 @@ int Resampler::Reset(int inFreq, int outFreq, ResamplerType type)
|
|||||||
if ((my_type_ & 0xf0) == 0x20)
|
if ((my_type_ & 0xf0) == 0x20)
|
||||||
{
|
{
|
||||||
// Change type to mono
|
// 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_left_ = new Resampler(inFreq, outFreq, type);
|
||||||
slave_right_ = new Resampler(inFreq, outFreq, type);
|
slave_right_ = new Resampler(inFreq, outFreq, type);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user