| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 #ifndef WEBRTC_COMMON_AUDIO_AUDIO_RING_BUFFER_H_ | 10 #ifndef WEBRTC_COMMON_AUDIO_AUDIO_RING_BUFFER_H_ |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 size_t WriteFramesAvailable() const; | 39 size_t WriteFramesAvailable() const; |
| 40 | 40 |
| 41 // Moves the read position. The forward version advances the read pointer | 41 // Moves the read position. The forward version advances the read pointer |
| 42 // towards the write pointer and the backward verison withdraws the read | 42 // towards the write pointer and the backward verison withdraws the read |
| 43 // pointer away from the write pointer (i.e. flushing and stuffing the buffer | 43 // pointer away from the write pointer (i.e. flushing and stuffing the buffer |
| 44 // respectively.) | 44 // respectively.) |
| 45 void MoveReadPositionForward(size_t frames); | 45 void MoveReadPositionForward(size_t frames); |
| 46 void MoveReadPositionBackward(size_t frames); | 46 void MoveReadPositionBackward(size_t frames); |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 // We don't use a ScopedVector because it doesn't support a specialized | 49 // TODO(kwiberg): Use std::vector<std::unique_ptr<RingBuffer>> instead. |
| 50 // deleter (like unique_ptr for instance.) | |
| 51 std::vector<RingBuffer*> buffers_; | 50 std::vector<RingBuffer*> buffers_; |
| 52 }; | 51 }; |
| 53 | 52 |
| 54 } // namespace webrtc | 53 } // namespace webrtc |
| 55 | 54 |
| 56 #endif // WEBRTC_COMMON_AUDIO_AUDIO_RING_BUFFER_H_ | 55 #endif // WEBRTC_COMMON_AUDIO_AUDIO_RING_BUFFER_H_ |
| OLD | NEW |