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

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

Issue 1211203006: Fixes issue where Web Speech API drops a frame every 5.1 seconds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 5 years, 5 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
« no previous file with comments | « media/base/multi_channel_resampler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 DCHECK(!resamplers_.empty()); 112 DCHECK(!resamplers_.empty());
113 return resamplers_[0]->ChunkSize(); 113 return resamplers_[0]->ChunkSize();
114 } 114 }
115 115
116 116
117 double MultiChannelResampler::BufferedFrames() const { 117 double MultiChannelResampler::BufferedFrames() const {
118 DCHECK(!resamplers_.empty()); 118 DCHECK(!resamplers_.empty());
119 return resamplers_[0]->BufferedFrames(); 119 return resamplers_[0]->BufferedFrames();
120 } 120 }
121 121
122 void MultiChannelResampler::PrimeWithSilence() {
123 DCHECK(!resamplers_.empty());
124 for (size_t i = 0; i < resamplers_.size(); ++i)
125 resamplers_[i]->PrimeWithSilence();
126 }
122 127
123 } // namespace media 128 } // namespace media
OLDNEW
« no previous file with comments | « media/base/multi_channel_resampler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698