summaryrefslogtreecommitdiffstats
path: root/core/ring_buffer.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-12-05 23:16:41 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-12-05 23:16:41 -0300
commitfe2a9bc746df86510391435f89eb10f6e0eddec4 (patch)
tree75818ca9c2e54b88c0641515bfa57626a023fa2c /core/ring_buffer.h
parent3ecc9e07b7650725c8786d6af7c5f77ab6d94cc2 (diff)
downloadredot-engine-fe2a9bc746df86510391435f89eb10f6e0eddec4.tar.gz
optional streaming from thread for Theora
Diffstat (limited to 'core/ring_buffer.h')
-rw-r--r--core/ring_buffer.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/ring_buffer.h b/core/ring_buffer.h
index 3cf9cf9064..5cbd261ec8 100644
--- a/core/ring_buffer.h
+++ b/core/ring_buffer.h
@@ -155,6 +155,12 @@ public:
inline int size() {
return data.size();
};
+
+ inline void clear() {
+ read_pos = 0;
+ write_pos = 0;
+
+ }
void resize(int p_power) {
int old_size = size();