OLD | NEW |
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/audio/simple_sources.h" | 5 #include "media/audio/simple_sources.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <algorithm> | 8 #include <algorithm> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 return false; | 81 return false; |
82 } | 82 } |
83 buffer_.Append(static_cast<const uint8*>(data), len); | 83 buffer_.Append(static_cast<const uint8*>(data), len); |
84 return true; | 84 return true; |
85 } | 85 } |
86 | 86 |
87 uint32 PushSource::UnProcessedBytes() { | 87 uint32 PushSource::UnProcessedBytes() { |
88 return buffer_.forward_bytes(); | 88 return buffer_.forward_bytes(); |
89 } | 89 } |
90 | 90 |
91 void PushSource::ClearAll() { | |
92 // Cleanup() will discard all the data. | |
93 CleanUp(); | |
94 } | |
95 | |
96 void PushSource::CleanUp() { | 91 void PushSource::CleanUp() { |
97 buffer_.Clear(); | 92 buffer_.Clear(); |
98 } | 93 } |
99 | 94 |
100 } // namespace media | 95 } // namespace media |
OLD | NEW |