|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.tuneology.avm.AudioConverter
Utilities for converting audio files to different types.
Conversion to the same format can be done to resample.
Here's what is currently supported:
From: To: | WAV MP3 OGG WMA AIFF AU AAC FLAC WAV 1 2 4 - 1 1 5 6 MP3 1 1 4/1 - 1 1 5/1 6/1 OGG 3 2/3 3 - 3 3 5/3 6/3 WMA - - - - - - - - AIFF 6/6 2 4/6/6 - 6/6 1/6/6 5 6 AU - 2 - - - - 5 - AAC - - - - - - - - FLAC 6 2/6 4/6 - 6 1/6 5/6 - 1 = lame 2 = madplay 3 = oggenc 4 = oggdec 5 = faad 6 = flac
Method Summary | |
static java.io.File |
convertFile(java.io.File dir,
java.io.File src,
FormatPrefs prefs,
TocEntry finfo,
ProgressListener pm,
boolean isTemp,
java.io.File tempDir)
Converts a file from one format to another |
static java.lang.Process |
convertStream(FormatPrefs iprefs,
FormatPrefs oprefs,
TocEntry finfo)
|
static void |
createSubdirs(java.lang.String path)
Creates any necessary subdirectories for the path. |
static java.lang.String |
fileTypeName(int n)
|
static int |
getFileFormat(java.io.File f)
Returns the file type. |
static java.lang.String |
getMadplayCmd()
|
static java.lang.String |
getVersions()
Returns a string containing the versions of all the format conversion programs. |
static java.io.File |
makeLocalCopy(java.io.File dir,
java.io.File f,
ProgressListener pm,
boolean isTemp)
Given a file, creates a new object representing a local version of the file, and copies the file from the remote store to the local file system. |
static void |
setFaadCmd(java.lang.String cmd)
|
static void |
setFlacCmd(java.lang.String cmd)
|
static void |
setLameCmd(java.lang.String cmd)
|
static void |
setMadplayCmd(java.lang.String cmd)
|
static void |
setOggdecCmd(java.lang.String cmd)
|
static void |
setOggencCmd(java.lang.String cmd)
|
static long |
spaceRequired(TocEntry finfo,
FormatPrefs prefs)
returns the number of bytes of space required to store the specified file according to the specified preferences. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.lang.String getVersions()
public static java.io.File makeLocalCopy(java.io.File dir, java.io.File f, ProgressListener pm, boolean isTemp) throws java.io.IOException
dir
- The directory in which to write the file.f
- The souce file.pm
- The GUI status indicator.isTemp
- If true, marks the file as tempoary (to be deleted on exit)java.io.IOException
- public static int getFileFormat(java.io.File f)
f
- the file in question.public static long spaceRequired(TocEntry finfo, FormatPrefs prefs) throws java.lang.Exception
finfo
- prefs
- java.io.IOException
- if the format parameters are invalidpublic static java.lang.Process convertStream(FormatPrefs iprefs, FormatPrefs oprefs, TocEntry finfo) throws java.io.IOException
java.io.IOException
- public static java.io.File convertFile(java.io.File dir, java.io.File src, FormatPrefs prefs, TocEntry finfo, ProgressListener pm, boolean isTemp, java.io.File tempDir) throws java.lang.Exception
dir
- The destination directory.src
- The source file.prefs
- The preferences for the destination file.finfo
- Meta-information to be written to the destination file.pm
- Callback for status updates.isTemp
- True if the destination file is a temp file.tempDir
- directory in which to write temp files, if needed.java.lang.Exception
- public static void createSubdirs(java.lang.String path) throws java.io.IOException
path
- the path.java.io.IOException
- if directories cannot be created.public static java.lang.String getMadplayCmd()
public static void setMadplayCmd(java.lang.String cmd) throws java.lang.Exception
java.lang.Exception
- public static void setOggdecCmd(java.lang.String cmd) throws java.lang.Exception
java.lang.Exception
- public static void setOggencCmd(java.lang.String cmd) throws java.lang.Exception
java.lang.Exception
- public static void setLameCmd(java.lang.String cmd) throws java.lang.Exception
java.lang.Exception
- public static void setFaadCmd(java.lang.String cmd) throws java.lang.Exception
java.lang.Exception
- public static void setFlacCmd(java.lang.String cmd) throws java.lang.Exception
java.lang.Exception
- public static java.lang.String fileTypeName(int n) throws java.util.NoSuchElementException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |