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

Side by Side Diff: content/browser/renderer_host/audio_renderer_host.cc

Issue 6532073: Move core pieces of browser\renderer_host to src\content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/renderer_host/audio_renderer_host.h" 5 #include "content/browser/renderer_host/audio_renderer_host.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/process.h" 8 #include "base/process.h"
9 #include "base/shared_memory.h" 9 #include "base/shared_memory.h"
10 #include "chrome/browser/renderer_host/audio_sync_reader.h"
11 #include "chrome/common/render_messages.h" 10 #include "chrome/common/render_messages.h"
12 #include "chrome/common/render_messages_params.h" 11 #include "chrome/common/render_messages_params.h"
12 #include "content/browser/renderer_host/audio_sync_reader.h"
13 #include "ipc/ipc_logging.h" 13 #include "ipc/ipc_logging.h"
14 14
15 // The minimum number of samples in a hardware packet. 15 // The minimum number of samples in a hardware packet.
16 // This value is selected so that we can handle down to 5khz sample rate. 16 // This value is selected so that we can handle down to 5khz sample rate.
17 static const int kMinSamplesPerHardwarePacket = 1024; 17 static const int kMinSamplesPerHardwarePacket = 1024;
18 18
19 // The maximum number of samples in a hardware packet. 19 // The maximum number of samples in a hardware packet.
20 // This value is selected so that we can handle up to 192khz sample rate. 20 // This value is selected so that we can handle up to 192khz sample rate.
21 static const int kMaxSamplesPerHardwarePacket = 64 * 1024; 21 static const int kMaxSamplesPerHardwarePacket = 64 * 1024;
22 22
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 471
472 // Iterate the map of entries. 472 // Iterate the map of entries.
473 // TODO(hclam): Implement a faster look up method. 473 // TODO(hclam): Implement a faster look up method.
474 for (AudioEntryMap::iterator i = audio_entries_.begin(); 474 for (AudioEntryMap::iterator i = audio_entries_.begin();
475 i != audio_entries_.end(); ++i) { 475 i != audio_entries_.end(); ++i) {
476 if (!i->second->pending_close && controller == i->second->controller.get()) 476 if (!i->second->pending_close && controller == i->second->controller.get())
477 return i->second; 477 return i->second;
478 } 478 }
479 return NULL; 479 return NULL;
480 } 480 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698