|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcami.jmootcher.AudioSample
public class AudioSample
representing a freesound-sample
Field Summary |
---|
Fields inherited from interface cami.jmootcher.JMootcherConstants |
---|
AIFF, AUDIOSAMPLE_DATE_FORMAT, BUFFER_SIZE, CACHE_ROOT_DIR, ENCODING, FILE_URL, FLAC, HOME_URL, LOGIN_REDIRECT_URL, LOGIN_URL, LOGOUT_URL, MP3, OGG, PREVIEW_CACHE_DIRNAME, SAMPLE_CACHE_DIRNAME, VALID_LOGIN_TEXT, VALID_XML_LINE_PREFIX, VALID_XML_SECONDLINE, WAV, XML_CACHE_DIRNAME, XML_SEARCH_URL, XML_SIMILAR_URL, XML_URL |
Constructor Summary | |
---|---|
AudioSample(JMootcher mootcher,
int ID)
|
|
AudioSample(JMootcher mootcher,
java.lang.String ID)
|
Method Summary | |
---|---|
int |
getBitDepth()
returns the bitDepth of the sample, usually 16 |
int |
getBitRate()
returns the resolution (bitRate) of the sample |
long |
getBytesLoaded()
returns the number of bytes loaded |
int |
getChannels()
returns the number of channels, usually 1 or 2 (mono, stere) |
java.util.Date |
getDate()
returns the creation-date of this sample |
java.lang.String |
getDescription()
returns the freesound description of this file |
AudioSample[] |
getDissimilarFiles()
returns an array containig disimilar soundfiles, for further information see |
float |
getDuration()
returns the duration in seconds of the sample |
java.lang.String |
getExtension()
returns a String-representation of the fileextension, the getFileType -method returns a integer-repr of the
fileextension, see the JMootcherConstants for more details |
int |
getFileSize()
returns the final filesize of the sample in bytes |
int |
getFileType()
Returns an internal representation of the soundTypes |
java.net.URL |
getFileURL()
returns the url of the full-quality, original audiosample, this url is mostly useless, since you can only access the file with a valid login/registration |
int |
getID()
Returns the freesound id of this sample |
java.io.InputStream |
getInputStream()
returns an InputStream pointing to the given file, or
null if the File doesnt exist, the InputStream points on
the file specified by the getFileURL . |
java.lang.String[] |
getKeyWords()
returns the freesound keywords for this sample |
float |
getLatitude()
Returns the altitude of a geotagged Sample, null if not geotagged |
float |
getLongitude()
return the logitude of geotagged sample, or null |
JMootcher |
getMootcher()
returns the assigned jMootcher controller, which handles all HTTP-requests |
java.lang.String |
getOriginalFileName()
returns the sample's original filename |
java.io.File |
getPreview()
returns the File of the cached audiosample-preview, which
is created automatically in the constructor Use this method instead of
getPreviewURL or getPreviewInputStream to
access the audioFile |
java.net.URL |
getPreviewImageURL()
returns the URL of a preview image, frequency is colorcoded, the image-format is png |
java.lang.String |
getPreviewImageURLString()
|
java.io.InputStream |
getPreviewInputStream()
returns an InputStream pointing to the preview mp3, if the File doesnt exists a null is returned |
java.net.URL |
getPreviewURL()
returns the URL to the prewiev soundFile, which is accessiblel without an account, for the full sample a freesound account is required. |
java.lang.String |
getPreviewURLString()
The url to the previewfile of this sample. this is a low quality mp3-file, which can be accessed without any registration |
java.io.File |
getSample()
returns the File of the cached audiosample, which is
created automatically in the constructor. |
int |
getSampleRate()
returns the sample rate in [Hz] |
AudioSample[] |
getSimilarFiles()
returns an array containig similar soundfiles, for further information see freesound |
int |
getUserID()
returns the freesound-user-id of the creater of this sample |
boolean |
isGeoTagged()
returns if the sample has been geotagge ( an altidude and logitude assigned) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AudioSample(JMootcher mootcher, java.lang.String ID) throws java.lang.Exception
java.lang.Exception
public AudioSample(JMootcher mootcher, int ID) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public int getID()
public int getFileType()
JMootcherConstants
public float getLatitude()
getLongitude
,
isGeoTagged
public float getLongitude()
getAltitude
,
isGeoTagged
public boolean isGeoTagged()
getAltitude
,
getLongitude
public int getBitDepth()
public int getBitRate()
public int getChannels()
public java.lang.String getDescription()
public float getDuration()
public java.lang.String getExtension()
getFileType
-method returns a integer-repr of the
fileextension, see the JMootcherConstants
for more details
getFileType
public int getFileSize()
public long getBytesLoaded()
public java.lang.String[] getKeyWords()
public java.util.Date getDate()
public JMootcher getMootcher()
public java.lang.String getOriginalFileName()
public int getSampleRate()
public int getUserID()
public AudioSample[] getSimilarFiles()
getDissimilarFiles
public AudioSample[] getDissimilarFiles()
getSimilarFiles
public java.net.URL getPreviewURL()
public java.lang.String getPreviewURLString()
public java.net.URL getFileURL()
public java.net.URL getPreviewImageURL()
public java.lang.String getPreviewImageURLString()
public java.io.InputStream getInputStream()
InputStream
pointing to the given file, or
null
if the File doesnt exist, the InputStream points on
the file specified by the getFileURL
. An another time,
this isn't very usefull, since valid login-cookies are necessary
getSample
,
getPreview
public java.io.InputStream getPreviewInputStream()
null
is returned
public java.io.File getSample()
File
of the cached audiosample, which is
created automatically in the constructor. Use this method instead of
getFileURL
or getInputStream
to access the
audioFile. Make sure that the file is buffered, otherwise there will be
an error when playing.
getPreview
public java.io.File getPreview()
File
of the cached audiosample-preview, which
is created automatically in the constructor Use this method instead of
getPreviewURL
or getPreviewInputStream
to
access the audioFile
getSample
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |