| 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_ |
| 11 #define WEBRTC_COMMON_AUDIO_AUDIO_RING_BUFFER_H_ |
| 10 | 12 |
| 11 #include <stddef.h> | 13 #include <stddef.h> |
| 12 #include <vector> | 14 #include <vector> |
| 13 | 15 |
| 14 struct RingBuffer; | 16 struct RingBuffer; |
| 15 | 17 |
| 16 namespace webrtc { | 18 namespace webrtc { |
| 17 | 19 |
| 18 // A ring buffer tailored for float deinterleaved audio. Any operation that | 20 // A ring buffer tailored for float deinterleaved audio. Any operation that |
| 19 // cannot be performed as requested will cause a crash (e.g. insufficient data | 21 // cannot be performed as requested will cause a crash (e.g. insufficient data |
| (...skipping 20 matching lines...) Expand all Loading... |
| 40 // the read pointer (i.e. flush and stuff the buffer respectively.) | 42 // the read pointer (i.e. flush and stuff the buffer respectively.) |
| 41 void MoveReadPosition(int frames); | 43 void MoveReadPosition(int frames); |
| 42 | 44 |
| 43 private: | 45 private: |
| 44 // We don't use a ScopedVector because it doesn't support a specialized | 46 // We don't use a ScopedVector because it doesn't support a specialized |
| 45 // deleter (like scoped_ptr for instance.) | 47 // deleter (like scoped_ptr for instance.) |
| 46 std::vector<RingBuffer*> buffers_; | 48 std::vector<RingBuffer*> buffers_; |
| 47 }; | 49 }; |
| 48 | 50 |
| 49 } // namespace webrtc | 51 } // namespace webrtc |
| 52 |
| 53 #endif // WEBRTC_COMMON_AUDIO_AUDIO_RING_BUFFER_H_ |
| OLD | NEW |