OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 | 10 |
11 // A ring buffer to hold arbitrary data. Provides no thread safety. Unless | 11 // A ring buffer to hold arbitrary data. Provides no thread safety. Unless |
12 // otherwise specified, functions return 0 on success and -1 on error. | 12 // otherwise specified, functions return 0 on success and -1 on error. |
13 | 13 |
14 #ifndef WEBRTC_COMMON_AUDIO_RING_BUFFER_H_ | 14 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_RING_BUFFER_H_ |
15 #define WEBRTC_COMMON_AUDIO_RING_BUFFER_H_ | 15 #define WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_RING_BUFFER_H_ |
16 | 16 |
17 #ifdef __cplusplus | 17 #ifdef __cplusplus |
18 extern "C" { | 18 extern "C" { |
19 #endif | 19 #endif |
20 | 20 |
21 #include <stddef.h> // size_t | 21 #include <stddef.h> // size_t |
22 | 22 |
23 typedef struct RingBuffer RingBuffer; | 23 typedef struct RingBuffer RingBuffer; |
24 | 24 |
25 // Creates and initializes the buffer. Returns NULL on failure. | 25 // Creates and initializes the buffer. Returns NULL on failure. |
(...skipping 30 matching lines...) Expand all Loading... |
56 // Returns number of available elements to read. | 56 // Returns number of available elements to read. |
57 size_t WebRtc_available_read(const RingBuffer* handle); | 57 size_t WebRtc_available_read(const RingBuffer* handle); |
58 | 58 |
59 // Returns number of available elements for write. | 59 // Returns number of available elements for write. |
60 size_t WebRtc_available_write(const RingBuffer* handle); | 60 size_t WebRtc_available_write(const RingBuffer* handle); |
61 | 61 |
62 #ifdef __cplusplus | 62 #ifdef __cplusplus |
63 } | 63 } |
64 #endif | 64 #endif |
65 | 65 |
66 #endif // WEBRTC_COMMON_AUDIO_RING_BUFFER_H_ | 66 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_UTILITY_RING_BUFFER_H_ |
OLD | NEW |