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:
parent
c5aecd3053
commit
07ba08d962
|
@ -9,3 +9,5 @@ filmless_processing/data/frames/*.PNG
|
|||
filmless_processing/data/frames/*.JPEG
|
||||
filmless_processing/data/frames/*.JPG
|
||||
filmless_processing/data/frames/*.TIF
|
||||
filmless_processing/data/audio/*.wav
|
||||
filmless_processing/data/audio/*.WAV
|
|
@ -163,7 +163,7 @@ String[] listFrames (String dir, String audioDir) {
|
|||
audioDir = audioDir + SEP;
|
||||
}
|
||||
file = new File(dir);
|
||||
audioFile = new File(SOUND);
|
||||
audioFile = new File(audioDir);
|
||||
if (file.isDirectory()) {
|
||||
String names[] = file.list();
|
||||
names = sort(names);
|
||||
|
@ -184,15 +184,21 @@ String[] listFrames (String dir, String audioDir) {
|
|||
return null;
|
||||
}
|
||||
|
||||
String audioNames[] = audioFile.list();
|
||||
if (audioNames != null) {
|
||||
audioNames = sort(audioNames);
|
||||
if (audioFile.isDirectory()) {
|
||||
String audioNames[] = audioFile.list();
|
||||
if (audioNames != null) {
|
||||
audioNames = sort(audioNames);
|
||||
|
||||
for (int i = 0; i < audioNames.length; i++) {
|
||||
if (audioNames[i].toLowerCase().contains(".wav")) {
|
||||
audioTmp.add(audioDir + audioNames[i]);
|
||||
for (int i = 0; i < audioNames.length; i++) {
|
||||
if (audioNames[i].toLowerCase().contains(".wav")) {
|
||||
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) {
|
||||
|
|
Loading…
Reference in New Issue