From 98a86325cedb38e590fe9f46651aab228979a48e Mon Sep 17 00:00:00 2001 From: hrydgard Date: Sat, 21 Feb 2009 12:07:51 +0000 Subject: [PATCH] Fix bug in audio queue. This will hopefully fix the screechy noises that sometimes happen when starting a game. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2333 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/FixedSizeQueue.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Source/Core/Common/Src/FixedSizeQueue.h b/Source/Core/Common/Src/FixedSizeQueue.h index cdfad71349..caeb57ecf4 100644 --- a/Source/Core/Common/Src/FixedSizeQueue.h +++ b/Source/Core/Common/Src/FixedSizeQueue.h @@ -39,9 +39,8 @@ class FixedSizeQueue public: FixedSizeQueue() { - head = 0; - tail = 0; storage = new T[N]; + clear(); } ~FixedSizeQueue() @@ -49,6 +48,12 @@ public: delete [] storage; } + void clear() { + head = 0; + tail = 0; + count = 0; + } + void push(T t) { storage[tail] = t; tail++;