#39 WIP - rolls back embedding source events in buffers. The channel

calculator must be updated immediately any time the tuner's center
frequency changes so that a channel can be allocated immediately.  So,
I changed source event handling to two parts where the channel calculator
is immediately updated and the channelizer configuration is deferred so
that it can happen on the buffer processor execution thread and we can
avoid any sync() locking on the channelizer or polyphase channel
sources.
This commit is contained in:
Denny
2018-01-13 11:43:26 -05:00
parent 05fa5c25fd
commit d4761be00a
9 changed files with 80 additions and 320 deletions

View File

@@ -16,21 +16,11 @@
package io.github.dsheirer.sample.real;
import io.github.dsheirer.sample.Buffer;
import io.github.dsheirer.source.SourceEvent;
import java.util.Arrays;
public class RealBuffer extends Buffer
{
/**
* Wrapper around float array containing real float samples and an optional source event that should be processed
* prior to processing the sample array data.
*/
public RealBuffer(float[] samples, SourceEvent sourceEvent)
{
super(samples, sourceEvent);
}
/**
* Wrapper around float array containing real float samples
*/
@@ -46,6 +36,6 @@ public class RealBuffer extends Buffer
{
float[] copy = Arrays.copyOf(getSamples(), getSamples().length);
return new RealBuffer(copy, getSourceEvent());
return new RealBuffer(copy);
}
}