39 [WIP] cleans up the reusable buffers and creates both real and

complex variants.
This commit is contained in:
Denny
2018-03-25 09:13:03 -04:00
parent c36f6901af
commit 60ffb18cd9
70 changed files with 1211 additions and 728 deletions

View File

@@ -17,7 +17,7 @@ package io.github.dsheirer.spectrum;
import io.github.dsheirer.sample.OverflowableTransferQueue;
import io.github.dsheirer.sample.complex.reusable.ReusableComplexBuffer;
import io.github.dsheirer.sample.buffer.ReusableComplexBuffer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -206,6 +206,13 @@ public class OverflowableBufferStream extends OverflowableTransferQueue<Reusable
}
}
@Override
protected void overflow(ReusableComplexBuffer reusableComplexBuffer)
{
mLog.debug("*** Overflow - throwing away buffer: " + reusableComplexBuffer.name());
reusableComplexBuffer.decrementUserCount();
}
/**
* Clears all elements from the queue and resets the internal counter to 0
*/