Bug fixes to sud file time

This commit is contained in:
Jamie Mac 2024-03-11 13:51:13 +00:00
parent 89627f94dc
commit 7ddf4d6eb9
3 changed files with 10 additions and 2 deletions

1
.gitignore vendored
View File

@ -102,3 +102,4 @@ settings.xml
.settings/org.eclipse.jdt.core.prefs
.settings/org.eclipse.core.resources.prefs
.classpath
.classpath

View File

@ -45,11 +45,17 @@ public class SUDFileTime {
// return Long.MIN_VALUE;
// }
// long t = sudMap.getFirstChunkTimeMillis();
System.out.println("Error getting time from SUD file: " + file==null? null : (file.getName() + " size: " + file.length() / (1024 * 1024) + " MB"));
long t = SudAudioInputStream.quickFileTime(file);
t=t/1000; //turn to milliseconds.
if (t != 0) {
if (t > 0) {
sudTime = t;
}
else {
//an error has occurred
System.err.println("Error getting time from SUD file: " + file==null? null : (file.getName() + " size: " + file.length() / (1024 * 1024) + " MB"));
}
// sudAudioInputStream.addSudFileListener((chunkID, sudChunk)->{
// ChunkHeader chunkHead = sudChunk.chunkHeader;

View File

@ -629,7 +629,8 @@ public class SweepClassifierWorker {
* @return true if bearing limits are passed
*/
private boolean testBearings(ClickDetection click, SweepClassifierSet scs) {
if (click.getLocalisation()==null) return true;
if (click.getLocalisation().getAngles()==null) return true; //passes the test if there is no bearing info.
double bearing = click.getLocalisation().getAngles()[0];