|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.qtunes.replaygain.Normalizer
public class Normalizer
A class which manages the ReplayGain normalization on a number of files.
It stores the GainAnalysis
to a database, queues new analyses
to ensure they're not all run at once or repeated if we've already analysed
a file.
Constructor Summary | |
---|---|
Normalizer()
|
Method Summary | |
---|---|
void |
enqueue(java.io.File file)
Start an analysis on the specified file, which will add the GainAnalysis to the database when it completes. |
GainAnalysis |
getGain(java.io.File file)
Get the GainAnalysis for the specified file. |
void |
remove(java.io.File file)
Remove the previously calculated analysus for file from the database |
void |
saveDatabase()
Save the Database of analyses to the database file set in setDatabase(java.io.File) |
void |
setAutoSave(int seconds)
Set how many seconds apart the database should be automatically saved |
void |
setDatabase(java.io.File file)
Set the Database file. |
void |
setDebug(java.io.PrintStream out,
boolean debug)
Set the output stream for info/debug |
void |
shutdown()
Shutdown the Normalizer. |
boolean |
waitForCompletion()
Wait untli all pending tasks are completed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Normalizer()
Method Detail |
---|
public void setDebug(java.io.PrintStream out, boolean debug)
out
- the PrintStream to write debug todebug
- whether to write debug or notpublic void saveDatabase() throws java.io.IOException
setDatabase(java.io.File)
java.io.IOException
public void setAutoSave(int seconds)
seconds
- the number of seconds between saves, or 0 to never save.public void setDatabase(java.io.File file)
public void remove(java.io.File file) throws java.io.IOException
java.io.IOException
public void enqueue(java.io.File file) throws java.io.IOException
GainAnalysis
to the database when it completes. If the
file already exists in the database it's entry will be overwritten.
If the file is a directory it's contents will be enqueued instead.
java.io.IOException
public GainAnalysis getGain(java.io.File file) throws java.io.IOException
java.io.IOException
public boolean waitForCompletion()
public void shutdown() throws java.lang.InterruptedException
java.lang.InterruptedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |