Package com.jme3.audio
Class AudioKey
AudioKey is extending AssetKey by holding stream flag.-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanClass<? extends AssetCache>Class<? extends AssetProcessor>inthashCode()booleanisStream()voidread(JmeImporter im) toString()booleanSpecifies if the stream cache is used.voidwrite(JmeExporter ex) Methods inherited from class com.jme3.asset.AssetKey
clone, getExtension, getExtension, getFolder, getFolder, getName, reducePath
-
Constructor Details
-
AudioKey
Create a new AudioKey.- Parameters:
name- Name of the assetstream- If true, the audio will be streamed. Otherwise, it will be buffered entirely and then played.streamCache- If stream is true, then this specifies if the stream cache is used. When enabled, the audio stream will be read entirely but not decoded, allowing features such as seeking, determining duration and looping.
-
AudioKey
Create a new AudioKey- Parameters:
name- Name of the assetstream- If true, the audio will be streamed. Otherwise, it will be buffered entirely and then played.
-
AudioKey
-
AudioKey
public AudioKey()
-
-
Method Details
-
toString
-
isStream
public boolean isStream()- Returns:
- True if the loaded audio should be a
AudioStreamor false if it should be aAudioBuffer.
-
useStreamCache
public boolean useStreamCache()Specifies if the stream cache is used. When enabled, the audio stream will be read entirely but not decoded, allowing features such as seeking, looping and determining duration.- Returns:
- true if stream cache is in use, otherwise false
-
getCacheType
- Overrides:
getCacheTypein classAssetKey<AudioData>- Returns:
- The preferred cache class for this asset type. Specify "null"
if caching is to be disabled. By default, the
SimpleAssetCacheis returned.
-
equals
-
hashCode
public int hashCode() -
getProcessorType
- Overrides:
getProcessorTypein classAssetKey<AudioData>- Returns:
- The preferred processor type for this asset type. Specify "null" if no processing is required.
-
write
-
read
-