diff options
author | dalecurtis@chromium.org <dalecurtis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-10 02:09:54 +0000 |
---|---|---|
committer | dalecurtis@chromium.org <dalecurtis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-10 02:09:54 +0000 |
commit | df3f65964af4cd554449c08bce398dedaa420da6 (patch) | |
tree | f2c09e2763581b6a7029df56e68794aa8da2de80 /media/base | |
parent | aa4b11d91129de846a3123ce1250f5f6c6ad791f (diff) | |
download | chromium_src-df3f65964af4cd554449c08bce398dedaa420da6.zip chromium_src-df3f65964af4cd554449c08bce398dedaa420da6.tar.gz chromium_src-df3f65964af4cd554449c08bce398dedaa420da6.tar.bz2 |
Remove obsolete atomic debugging checks.
Removes AtomicRefCount checks from SincResampler and AudioOutputController
which never caught any issues.
BUG=295278, 349651
TEST=none
Review URL: https://codereview.chromium.org/231623005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262897 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base')
-rw-r--r-- | media/base/sinc_resampler.cc | 17 | ||||
-rw-r--r-- | media/base/sinc_resampler.h | 6 |
2 files changed, 3 insertions, 20 deletions
diff --git a/media/base/sinc_resampler.cc b/media/base/sinc_resampler.cc index 1c527af..d3d494d 100644 --- a/media/base/sinc_resampler.cc +++ b/media/base/sinc_resampler.cc @@ -153,8 +153,7 @@ SincResampler::SincResampler(double io_sample_rate_ratio, input_buffer_(static_cast<float*>( base::AlignedAlloc(sizeof(float) * input_buffer_size_, 16))), r1_(input_buffer_.get()), - r2_(input_buffer_.get() + kKernelSize / 2), - not_currently_resampling_(1) { + r2_(input_buffer_.get() + kKernelSize / 2) { CHECK_GT(request_frames_, 0); Flush(); CHECK_GT(block_size_, kKernelSize) @@ -170,10 +169,7 @@ SincResampler::SincResampler(double io_sample_rate_ratio, InitializeKernel(); } -SincResampler::~SincResampler() { - // TODO(dalecurtis): Remove debugging for http://crbug.com/295278 - CHECK(!base::AtomicRefCountDec(¬_currently_resampling_)); -} +SincResampler::~SincResampler() {} void SincResampler::UpdateRegions(bool second_load) { // Setup various region pointers in the buffer (see diagram above). If we're @@ -256,8 +252,6 @@ void SincResampler::SetRatio(double io_sample_rate_ratio) { } void SincResampler::Resample(int frames, float* destination) { - CHECK(!base::AtomicRefCountDec(¬_currently_resampling_)); - int remaining_frames = frames; // Step (1) -- Prime the input buffer at the start of the input stream. @@ -306,10 +300,8 @@ void SincResampler::Resample(int frames, float* destination) { virtual_source_idx_ += current_io_ratio; source_idx = virtual_source_idx_; - if (!--remaining_frames) { - base::AtomicRefCountInc(¬_currently_resampling_); + if (!--remaining_frames) return; - } } // Wrap back around to the start. @@ -327,8 +319,6 @@ void SincResampler::Resample(int frames, float* destination) { // Step (5) -- Refresh the buffer with more input. read_cb_.Run(request_frames_, r0_); } - - base::AtomicRefCountInc(¬_currently_resampling_); } #undef CONVOLVE_FUNC @@ -338,7 +328,6 @@ int SincResampler::ChunkSize() const { } void SincResampler::Flush() { - CHECK(base::AtomicRefCountIsOne(¬_currently_resampling_)); virtual_source_idx_ = 0; buffer_primed_ = false; memset(input_buffer_.get(), 0, diff --git a/media/base/sinc_resampler.h b/media/base/sinc_resampler.h index 2d0cdea..af9a302 100644 --- a/media/base/sinc_resampler.h +++ b/media/base/sinc_resampler.h @@ -5,7 +5,6 @@ #ifndef MEDIA_BASE_SINC_RESAMPLER_H_ #define MEDIA_BASE_SINC_RESAMPLER_H_ -#include "base/atomic_ref_count.h" #include "base/callback.h" #include "base/gtest_prod_util.h" #include "base/memory/aligned_memory.h" @@ -136,11 +135,6 @@ class MEDIA_EXPORT SincResampler { float* r3_; float* r4_; - // Atomic ref count indicating when when we're not currently resampling. Will - // be CHECK'd to find crashes... - // TODO(dalecurtis): Remove debug helpers for http://crbug.com/295278 - base::AtomicRefCount not_currently_resampling_; - DISALLOW_COPY_AND_ASSIGN(SincResampler); }; |