| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "platform/audio/PushPullFIFO.h" | 5 #include "platform/audio/PushPullFIFO.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include "platform/audio/AudioUtilities.h" | 8 #include "platform/audio/AudioUtilities.h" |
| 9 #include "wtf/PtrUtil.h" | 9 #include "platform/wtf/PtrUtil.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 namespace { | 13 namespace { |
| 14 | 14 |
| 15 // Suppress the warning log if over/underflow happens more than 100 times. | 15 // Suppress the warning log if over/underflow happens more than 100 times. |
| 16 const unsigned kMaxMessagesToLog = 100; | 16 const unsigned kMaxMessagesToLog = 100; |
| 17 } | 17 } |
| 18 | 18 |
| 19 const size_t PushPullFIFO::kMaxFIFOLength = 65536; | 19 const size_t PushPullFIFO::kMaxFIFOLength = 65536; |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 m_framesAvailable -= framesToFill; | 163 m_framesAvailable -= framesToFill; |
| 164 DCHECK_EQ((m_indexRead + m_framesAvailable) % m_fifoLength, m_indexWrite); | 164 DCHECK_EQ((m_indexRead + m_framesAvailable) % m_fifoLength, m_indexWrite); |
| 165 } | 165 } |
| 166 | 166 |
| 167 const PushPullFIFOStateForTest PushPullFIFO::getStateForTest() const { | 167 const PushPullFIFOStateForTest PushPullFIFO::getStateForTest() const { |
| 168 return {length(), numberOfChannels(), framesAvailable(), m_indexRead, | 168 return {length(), numberOfChannels(), framesAvailable(), m_indexRead, |
| 169 m_indexWrite, m_overflowCount, m_underflowCount}; | 169 m_indexWrite, m_overflowCount, m_underflowCount}; |
| 170 } | 170 } |
| 171 | 171 |
| 172 } // namespace blink | 172 } // namespace blink |
| OLD | NEW |