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

Side by Side Diff: media/base/multi_channel_resampler.cc

Issue 13741004: Varispeed support for SincResampler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments. Cleanup. Multichannel. Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/base/multi_channel_resampler.h" 5 #include "media/base/multi_channel_resampler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "media/base/audio_bus.h" 10 #include "media/base/audio_bus.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 sizeof(*resampler_audio_bus_->channel(channel)) * frames); 94 sizeof(*resampler_audio_bus_->channel(channel)) * frames);
95 } 95 }
96 } 96 }
97 97
98 void MultiChannelResampler::Flush() { 98 void MultiChannelResampler::Flush() {
99 last_frame_count_ = 0; 99 last_frame_count_ = 0;
100 for (size_t i = 0; i < resamplers_.size(); ++i) 100 for (size_t i = 0; i < resamplers_.size(); ++i)
101 resamplers_[i]->Flush(); 101 resamplers_[i]->Flush();
102 } 102 }
103 103
104 void MultiChannelResampler::SetRatio(double io_sample_rate_ratio) {
105 for (size_t i = 0; i < resamplers_.size(); ++i)
106 resamplers_[i]->SetRatio(io_sample_rate_ratio);
107 }
108
104 } // namespace media 109 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698