dynamically increase the buffer size if we build up to large of a queue

This commit is contained in:
Diego Waxemberg
2013-12-20 19:51:58 -05:00
parent 83747e501d
commit caa3297906
2 changed files with 33 additions and 5 deletions

View File

@@ -24,6 +24,14 @@ public class SoundBuffer {
bufferList.addLast(buff);
}
public int size() {
int size = 0;
for (ShortBufferDescriptor desc : bufferList) {
size += desc.length;
}
return size;
}
public int fill(byte[] data, int offset, int length) {
int filled = 0;