[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:
Denny
2018-06-02 08:47:48 -04:00
parent c13315f731
commit a898be265f
64 changed files with 2660 additions and 1285 deletions

View File

@@ -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;
}
}