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
This commit is contained in:
hrydgard 2009-02-21 12:07:51 +00:00
parent 28cbd0a6ba
commit 98a86325ce

View File

@ -39,9 +39,8 @@ class FixedSizeQueue
public: public:
FixedSizeQueue() FixedSizeQueue()
{ {
head = 0;
tail = 0;
storage = new T[N]; storage = new T[N];
clear();
} }
~FixedSizeQueue() ~FixedSizeQueue()
@ -49,6 +48,12 @@ public:
delete [] storage; delete [] storage;
} }
void clear() {
head = 0;
tail = 0;
count = 0;
}
void push(T t) { void push(T t) {
storage[tail] = t; storage[tail] = t;
tail++; tail++;