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

Side by Side Diff: content/browser/speech/audio_buffer.cc

Issue 11347004: content/browser: Move speech code into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 "content/browser/speech/audio_buffer.h"
6
5 #include "base/logging.h" 7 #include "base/logging.h"
6 #include "base/stl_util.h" 8 #include "base/stl_util.h"
7 #include "content/browser/speech/audio_buffer.h"
8 9
9 namespace speech { 10 namespace content {
10 11
11 AudioChunk::AudioChunk(int bytes_per_sample) 12 AudioChunk::AudioChunk(int bytes_per_sample)
12 : bytes_per_sample_(bytes_per_sample) { 13 : bytes_per_sample_(bytes_per_sample) {
13 } 14 }
14 15
15 AudioChunk::AudioChunk(const uint8* data, size_t length, int bytes_per_sample) 16 AudioChunk::AudioChunk(const uint8* data, size_t length, int bytes_per_sample)
16 : data_string_(reinterpret_cast<const char*>(data), length), 17 : data_string_(reinterpret_cast<const char*>(data), length),
17 bytes_per_sample_(bytes_per_sample) { 18 bytes_per_sample_(bytes_per_sample) {
18 DCHECK_EQ(length % bytes_per_sample, 0U); 19 DCHECK_EQ(length % bytes_per_sample, 0U);
19 } 20 }
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 81 }
81 82
82 void AudioBuffer::Clear() { 83 void AudioBuffer::Clear() {
83 chunks_.clear(); 84 chunks_.clear();
84 } 85 }
85 86
86 bool AudioBuffer::IsEmpty() const { 87 bool AudioBuffer::IsEmpty() const {
87 return chunks_.empty(); 88 return chunks_.empty();
88 } 89 }
89 90
90 } // namespace speech 91 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698