mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-19 06:40:58 +00:00
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:
parent
28cbd0a6ba
commit
98a86325ce
@ -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++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user