mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
[WIP] Updates the LTR-Standard and LTR-Net decoders to use a new LTR
decoder with a zero-crossing symbol timing error detector. The new decoder is optimized for 8 kHz FM demodulated audio produced by the AudioModule.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
/*******************************************************************************
|
||||
* sdr-trunk
|
||||
* Copyright (C) 2014-2018 Dennis Sheirer
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program.
|
||||
* If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
******************************************************************************/
|
||||
package io.github.dsheirer.sample.buffer;
|
||||
|
||||
import io.github.dsheirer.sample.Listener;
|
||||
|
||||
public interface IReusableBufferListener
|
||||
{
|
||||
Listener<ReusableBuffer> getReusableBufferListener();
|
||||
}
|
||||
@@ -17,20 +17,15 @@ package io.github.dsheirer.sample.buffer;
|
||||
|
||||
import io.github.dsheirer.sample.Listener;
|
||||
|
||||
public interface IReusableBufferProvider<T extends ReusableBuffer>
|
||||
public interface IReusableBufferProvider
|
||||
{
|
||||
/**
|
||||
* Adds the listener to receive complex buffer samples
|
||||
*/
|
||||
void addBufferListener(Listener<T> listener);
|
||||
void setBufferListener(Listener<ReusableBuffer> listener);
|
||||
|
||||
/**
|
||||
* Removes the listener from receiving complex buffer samples
|
||||
*/
|
||||
void removeBufferListener(Listener<T> listener);
|
||||
|
||||
/**
|
||||
* Indicates if there are any complex buffer listeners registered
|
||||
*/
|
||||
boolean hasBufferListeners();
|
||||
void removeBufferListener();
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ package io.github.dsheirer.sample.buffer;
|
||||
|
||||
import io.github.dsheirer.sample.Listener;
|
||||
|
||||
public interface IReusableComplexBufferListener<T extends ReusableBuffer>
|
||||
public interface IReusableComplexBufferListener<ReusableComplexBuffer>
|
||||
{
|
||||
Listener<T> getReusableComplexBufferListener();
|
||||
Listener<ReusableComplexBuffer> getReusableComplexBufferListener();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/*******************************************************************************
|
||||
* sdr-trunk
|
||||
* Copyright (C) 2014-2018 Dennis Sheirer
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program.
|
||||
* If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
******************************************************************************/
|
||||
package io.github.dsheirer.sample.buffer;
|
||||
|
||||
import io.github.dsheirer.sample.Listener;
|
||||
|
||||
public interface IReusableComplexBufferProvider
|
||||
{
|
||||
/**
|
||||
* Adds the listener to receive complex buffer samples
|
||||
*/
|
||||
void addBufferListener(Listener<ReusableComplexBuffer> listener);
|
||||
|
||||
/**
|
||||
* Removes the listener from receiving complex buffer samples
|
||||
*/
|
||||
void removeBufferListener(Listener<ReusableComplexBuffer> listener);
|
||||
|
||||
/**
|
||||
* Indicates if there are any complex buffer listeners registered
|
||||
*/
|
||||
boolean hasBufferListeners();
|
||||
}
|
||||
@@ -20,7 +20,7 @@ import io.github.dsheirer.sample.Listener;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ReusableBufferBroadcaster extends Broadcaster<ReusableComplexBuffer>
|
||||
public class ReusableBufferBroadcaster<T extends ReusableBuffer> extends Broadcaster<T>
|
||||
{
|
||||
private final static Logger mLog = LoggerFactory.getLogger(ReusableBufferBroadcaster.class);
|
||||
|
||||
@@ -34,15 +34,15 @@ public class ReusableBufferBroadcaster extends Broadcaster<ReusableComplexBuffer
|
||||
* send the buffer to all consumers.
|
||||
*/
|
||||
@Override
|
||||
public void broadcast(ReusableComplexBuffer reusableComplexBuffer)
|
||||
public void broadcast(T reusableBuffer)
|
||||
{
|
||||
for(Listener<ReusableComplexBuffer> listener : mListeners)
|
||||
for(Listener<T> listener : mListeners)
|
||||
{
|
||||
reusableComplexBuffer.incrementUserCount();
|
||||
listener.receive(reusableComplexBuffer);
|
||||
reusableBuffer.incrementUserCount();
|
||||
listener.receive(reusableBuffer);
|
||||
}
|
||||
|
||||
//Decrement user counter for this broadcaster
|
||||
reusableComplexBuffer.decrementUserCount();
|
||||
reusableBuffer.decrementUserCount();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,10 +27,6 @@ public class ReusableBufferQueue extends AbstractReusableBufferQueue<ReusableBuf
|
||||
super(debugName);
|
||||
}
|
||||
|
||||
public ReusableBufferQueue()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a reusable buffer from an internal recycling queue, or creates a new buffer if there are currently no
|
||||
* buffers available for reuse.
|
||||
|
||||
Reference in New Issue
Block a user