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

Unified Diff: webrtc/common_audio/ring_buffer.h

Issue 1862513007: Moved struct definition to the header file for the ring buffer. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/common_audio/ring_buffer.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_audio/ring_buffer.h
diff --git a/webrtc/common_audio/ring_buffer.h b/webrtc/common_audio/ring_buffer.h
index 4125c48d0116b5215ff7c61673398d412c5ec0b0..74951a8b2da1928f127cce4a3b104f070c7e5046 100644
--- a/webrtc/common_audio/ring_buffer.h
+++ b/webrtc/common_audio/ring_buffer.h
@@ -20,7 +20,16 @@ extern "C" {
#include <stddef.h> // size_t
-typedef struct RingBuffer RingBuffer;
+enum Wrap { SAME_WRAP, DIFF_WRAP };
+
+typedef struct RingBuffer {
+ size_t read_pos;
+ size_t write_pos;
+ size_t element_count;
+ size_t element_size;
+ enum Wrap rw_wrap;
+ char* data;
+} RingBuffer;
// Creates and initializes the buffer. Returns NULL on failure.
RingBuffer* WebRtc_CreateBuffer(size_t element_count, size_t element_size);
« no previous file with comments | « no previous file | webrtc/common_audio/ring_buffer.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698