mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
#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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user