@Override
public void run() {
while (running) {
try {
RecordingSplitEvent recordingFinished = completedRecordings.take();
File wav = recordingFinished.getFinishedFile();
if (wav != null) {
if (tooFresh(wav)) {
completedRecordings.add(recordingFinished);
} else {
Logger.getLogger(ContinousAudioConvereter.class.getName()).log(Level.INFO, "converting wav: " + wav.getAbsolutePath());
doConversion(recordingFinished.getRecordingID(), wav, recordingFinished.getStartTime());
}
}
} catch (InterruptedException ex) {
Logger.getLogger(ContinousAudioConvereter.class.getName()).log(Level.SEVERE, null, ex);