Chromium Code Reviews

Side by Side Diff: media/audio/simple_sources.cc

Issue 159167: Refactoring to share MockAudioOutputStream implementations across 3 platforms (Closed)
Patch Set: the same as before Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « media/audio/mac/audio_output_mac.cc ('k') | media/audio/simple_sources_unittest.cc » ('j') | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <algorithm> 5 #include <algorithm>
6 #include <math.h> 6 #include <math.h>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "media/audio/audio_output.h" 10 #include "media/audio/audio_output.h"
(...skipping 100 matching lines...)
111 111
112 size_t PushSource::UnProcessedBytes() { 112 size_t PushSource::UnProcessedBytes() {
113 AutoLock auto_lock(lock_); 113 AutoLock auto_lock(lock_);
114 return buffered_bytes_; 114 return buffered_bytes_;
115 } 115 }
116 116
117 void PushSource::CleanUp() { 117 void PushSource::CleanUp() {
118 AutoLock auto_lock(lock_); 118 AutoLock auto_lock(lock_);
119 PacketList::const_iterator it; 119 PacketList::const_iterator it;
120 for (it = packets_.begin(); it != packets_.end(); ++it) { 120 for (it = packets_.begin(); it != packets_.end(); ++it) {
121 delete it->buffer; 121 delete [] it->buffer;
122 buffered_bytes_ -= it->size; 122 buffered_bytes_ -= it->size;
123 } 123 }
124 packets_.clear(); 124 packets_.clear();
125 } 125 }
OLDNEW
« no previous file with comments | « media/audio/mac/audio_output_mac.cc ('k') | media/audio/simple_sources_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine