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:
@@ -34,7 +34,7 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class ComplexWaveSource extends ComplexSource implements IControllableFileSource
|
||||
public class ComplexWaveSource extends ComplexSource implements IControllableFileSource, AutoCloseable
|
||||
{
|
||||
private final static Logger mLog = LoggerFactory.getLogger(ComplexWaveSource.class);
|
||||
|
||||
@@ -275,4 +275,26 @@ public class ComplexWaveSource extends ComplexSource implements IControllableFil
|
||||
{
|
||||
mFrameLocationListener = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if the file is a supported audio file type
|
||||
*/
|
||||
public static boolean supports(File file)
|
||||
{
|
||||
try(AudioInputStream ais = AudioSystem.getAudioInputStream(file))
|
||||
{
|
||||
AudioFormat format = ais.getFormat();
|
||||
|
||||
if(format.getChannels() == 2 && format.getSampleSizeInBits() == 16)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
//Do nothing, we'll return a default of false
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user