Package com.jme3.audio
Class AudioKey
AudioKey
is extending AssetKey by holding stream flag.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Class<? extends AssetCache>
Class<? extends AssetProcessor>
int
hashCode()
boolean
isStream()
void
read
(JmeImporter im) toString()
boolean
Specifies if the stream cache is used.void
write
(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
AudioStream
or 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:
getCacheType
in classAssetKey<AudioData>
- Returns:
- The preferred cache class for this asset type. Specify "null"
if caching is to be disabled. By default, the
SimpleAssetCache
is returned.
-
equals
-
hashCode
public int hashCode() -
getProcessorType
- Overrides:
getProcessorType
in classAssetKey<AudioData>
- Returns:
- The preferred processor type for this asset type. Specify "null" if no processing is required.
-
write
-
read
-