Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1062)

Side by Side Diff: webrtc/modules/audio_processing/utility/ring_buffer.c

Issue 1846903004: Moved ring-buffer related files from common_audio to audio_processing (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "webrtc/common_audio/ring_buffer.h" 14 #include "webrtc/modules/audio_processing/utility/ring_buffer.h"
15 15
16 #include <stddef.h> // size_t 16 #include <stddef.h> // size_t
17 #include <stdlib.h> 17 #include <stdlib.h>
18 #include <string.h> 18 #include <string.h>
19 19
20 enum Wrap { 20 enum Wrap {
21 SAME_WRAP, 21 SAME_WRAP,
22 DIFF_WRAP 22 DIFF_WRAP
23 }; 23 };
24 24
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 } 238 }
239 } 239 }
240 240
241 size_t WebRtc_available_write(const RingBuffer* self) { 241 size_t WebRtc_available_write(const RingBuffer* self) {
242 if (!self) { 242 if (!self) {
243 return 0; 243 return 0;
244 } 244 }
245 245
246 return self->element_count - WebRtc_available_read(self); 246 return self->element_count - WebRtc_available_read(self);
247 } 247 }
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/utility/ring_buffer.h ('k') | webrtc/modules/audio_processing/utility/ring_buffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698