Fix remaining issue with sound. Now it will look for the first audio file in the directory as long as its .wav. Add more logging to catch issues.

This commit is contained in:
mmcwilliams 2024-04-25 12:03:35 -06:00
parent c5aecd3053
commit 07ba08d962
2 changed files with 17 additions and 9 deletions

2
.gitignore vendored
View File

@ -9,3 +9,5 @@ filmless_processing/data/frames/*.PNG
filmless_processing/data/frames/*.JPEG filmless_processing/data/frames/*.JPEG
filmless_processing/data/frames/*.JPG filmless_processing/data/frames/*.JPG
filmless_processing/data/frames/*.TIF filmless_processing/data/frames/*.TIF
filmless_processing/data/audio/*.wav
filmless_processing/data/audio/*.WAV

View File

@ -163,7 +163,7 @@ String[] listFrames (String dir, String audioDir) {
audioDir = audioDir + SEP; audioDir = audioDir + SEP;
} }
file = new File(dir); file = new File(dir);
audioFile = new File(SOUND); audioFile = new File(audioDir);
if (file.isDirectory()) { if (file.isDirectory()) {
String names[] = file.list(); String names[] = file.list();
names = sort(names); names = sort(names);
@ -184,6 +184,7 @@ String[] listFrames (String dir, String audioDir) {
return null; return null;
} }
if (audioFile.isDirectory()) {
String audioNames[] = audioFile.list(); String audioNames[] = audioFile.list();
if (audioNames != null) { if (audioNames != null) {
audioNames = sort(audioNames); audioNames = sort(audioNames);
@ -193,6 +194,11 @@ String[] listFrames (String dir, String audioDir) {
audioTmp.add(audioDir + audioNames[i]); audioTmp.add(audioDir + audioNames[i]);
} }
} }
} else {
println("Audio directory " + audioDir + " not found");
}
} else {
println("SOUND string " + audioDir + " does not point to a directory");
} }
if (audioTmp.size() > 0) { if (audioTmp.size() > 0) {