Package uk.ac.qmul.eecs.depic.daw
Class AudioLoader
- java.lang.Object
-
- javax.swing.SwingWorker<AudioLoader.ReturnObject,java.lang.Void>
-
- uk.ac.qmul.eecs.depic.daw.AudioLoader
-
public class AudioLoader extends javax.swing.SwingWorker<AudioLoader.ReturnObject,java.lang.Void>
A swing worker that loads an audio file in a separate thread. It returns a RetunObject when the loading is complete.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
AudioLoader.ReturnObject
An object returned by the AudioLoader.
-
Field Summary
Fields Modifier and Type Field and Description static javax.sound.sampled.AudioFormat
DEFAULT_CONVERSION_FORMAT
The default conversion format used.static int
FILE_LOAD_TOTAL_PROGRESS
-
Constructor Summary
Constructors Constructor and Description AudioLoader(java.io.File audioFile, int minChunkSize, int maxScaleFactor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description protected AudioLoader.ReturnObject
doInBackground()
Reads the audio files and build all the min and max for all the shunks of framesprotected javax.sound.sampled.AudioFormat
getConversionFormat()
-
-
-
Field Detail
-
DEFAULT_CONVERSION_FORMAT
public static final javax.sound.sampled.AudioFormat DEFAULT_CONVERSION_FORMAT
The default conversion format used. Also the conversion format returned bygetConversionFormat()
-
FILE_LOAD_TOTAL_PROGRESS
public static final int FILE_LOAD_TOTAL_PROGRESS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AudioLoader
public AudioLoader(java.io.File audioFile, int minChunkSize, int maxScaleFactor)
-
-
Method Detail
-
doInBackground
protected AudioLoader.ReturnObject doInBackground() throws java.lang.Exception
Reads the audio files and build all the min and max for all the shunks of frames- Specified by:
doInBackground
in classjavax.swing.SwingWorker<AudioLoader.ReturnObject,java.lang.Void>
- Throws:
java.lang.Exception
-
getConversionFormat
protected javax.sound.sampled.AudioFormat getConversionFormat()
-
-