Package PamUtils.worker.filelist
Class WavListWorker
- All Implemented Interfaces:
PamWorkWrapper<FileListData<WavFileType>>
Worker which extracts acoustic files from a folder.
- Author:
- Doug Gillespie
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanIf true, load audio file information such as sample rate and number of channels when the file list is created. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanallFilesTask(FileListData<WavFileType> fileList) Called once the main list of files has been made so that additional operations can be applied to every file, such as checking sample rates, etc.createFile(File baseFile) Creates the file.booleaneachFileTask(WavFileType aFile) Called every time a file is discovered in the main search.voidfinaliseFileList(PamWorker<FileListData<WavFileType>> pamWorker, FileListData<WavFileType> fileList) Do any final jobs to the file list.booleanShould we load audio file information such as sample rate and number of channels when the file list is created?voidsetLoadAudioInfo(boolean loadAudioInfo) Set whether audio file information such as sample rate and number of channels is loaded when the file list is created? Default is false;voidsetWavLoadListener(WavLoadListener laodListener) Methods inherited from class PamUtils.worker.filelist.FileListWorker
makeFileListProcess, runBackgroundTask, startFileListProcess, startFileListProcess, taskFinished
-
Field Details
-
loadAudioInfo
public boolean loadAudioInfoIf true, load audio file information such as sample rate and number of channels when the file list is created.
-
-
Constructor Details
-
WavListWorker
-
-
Method Details
-
createFile
Description copied from class:FileListWorkerCreates the file. Can override to make enhanced file types, e.g. with the wav file audioinfo.- Specified by:
createFilein classFileListWorker<WavFileType>- Returns:
-
eachFileTask
Description copied from class:FileListWorkerCalled every time a file is discovered in the main search. Can check things like consistency of sample rate in each file as progress continues.- Overrides:
eachFileTaskin classFileListWorker<WavFileType>- Parameters:
aFile-- Returns:
- true if processing can continue
-
allFilesTask
Description copied from class:FileListWorkerCalled once the main list of files has been made so that additional operations can be applied to every file, such as checking sample rates, etc.- Overrides:
allFilesTaskin classFileListWorker<WavFileType>- Parameters:
fileList-- Returns:
- true if all OK.
-
finaliseFileList
public void finaliseFileList(PamWorker<FileListData<WavFileType>> pamWorker, FileListData<WavFileType> fileList) Description copied from class:FileListWorkerDo any final jobs to the file list. This is needed in listing of xwav files since we have to go in and get the chunks. Might as well do the start times and audio formats for all files while we're at it to save time later. By doing it here in the progress bar, we can at least show progress sensibly.- Overrides:
finaliseFileListin classFileListWorker<WavFileType>- Parameters:
pamWorker-fileList-
-
isLoadAudioInfo
public boolean isLoadAudioInfo()Should we load audio file information such as sample rate and number of channels when the file list is created?- Returns:
- - true if audio info will be loaded on every file.
-
setLoadAudioInfo
public void setLoadAudioInfo(boolean loadAudioInfo) Set whether audio file information such as sample rate and number of channels is loaded when the file list is created? Default is false;- Parameters:
loadAudioInfo- - true to load audio info
-
setWavLoadListener
-