summaryrefslogtreecommitdiff
path: root/core/ring_buffer.h
diff options
context:
space:
mode:
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();