| OLD | NEW |
| 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...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| OLD | NEW |