Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Unified Diff: media/base/sinc_resampler.cc

Issue 231623005: Remove obsolete atomic debugging checks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/sinc_resampler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/sinc_resampler.cc
diff --git a/media/base/sinc_resampler.cc b/media/base/sinc_resampler.cc
index 1c527afe9ee1f17ad54701b146b5d1347be830fb..d3d494dca19da607b82ea7ae809dd6775d8c4889 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(&not_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(&not_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(&not_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(&not_currently_resampling_);
}
#undef CONVOLVE_FUNC
@@ -338,7 +328,6 @@ int SincResampler::ChunkSize() const {
}
void SincResampler::Flush() {
- CHECK(base::AtomicRefCountIsOne(&not_currently_resampling_));
virtual_source_idx_ = 0;
buffer_primed_ = false;
memset(input_buffer_.get(), 0,
« no previous file with comments | « media/base/sinc_resampler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698