OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stdint.h> |
| 6 |
5 #include <algorithm> | 7 #include <algorithm> |
6 | 8 |
7 #include "media/base/audio_block_fifo.h" | 9 #include "media/base/audio_block_fifo.h" |
8 | 10 |
9 #include "base/logging.h" | 11 #include "base/logging.h" |
10 | 12 |
11 namespace media { | 13 namespace media { |
12 | 14 |
13 AudioBlockFifo::AudioBlockFifo(int channels, int frames, int blocks) | 15 AudioBlockFifo::AudioBlockFifo(int channels, int frames, int blocks) |
14 : channels_(channels), | 16 : channels_(channels), |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 write_block_ += blocks; | 111 write_block_ += blocks; |
110 | 112 |
111 // Update the read pointers correspondingly. | 113 // Update the read pointers correspondingly. |
112 read_block_ += blocks; | 114 read_block_ += blocks; |
113 | 115 |
114 DCHECK_LT(read_block_, static_cast<int>(audio_blocks_.size())); | 116 DCHECK_LT(read_block_, static_cast<int>(audio_blocks_.size())); |
115 DCHECK_LT(write_block_, static_cast<int>(audio_blocks_.size())); | 117 DCHECK_LT(write_block_, static_cast<int>(audio_blocks_.size())); |
116 } | 118 } |
117 | 119 |
118 } // namespace media | 120 } // namespace media |
OLD | NEW |