Class RMSoundData
- java.lang.Object
-
- com.inductiveautomation.rm.graphics.RMSoundData
-
public class RMSoundData extends java.lang.Object
Manages sound data from sound file bytes.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Map
_cache
static int
RMBitRate11k
static int
RMBitRate22k
static int
RMBitRate44k
static int
RMBitRate5k
static int
RMBitRateUndefined
-
Constructor Summary
Constructors Constructor Description RMSoundData(java.lang.Object aSource)
Creates a new sound data for given source.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
bitRate()
Returns the bit rate.static boolean
canRead(java.lang.String anExt)
Returns whether sound data can read given extension.static void
emptyCache()
Clears out the cacheboolean
equals(java.lang.Object anObj)
Standard equals implementation.int
getBitsPerSample()
Returns the bits per sample.byte[]
getBytes()
Returns the sound data bytes.int
getChannelCount()
Returns the channel count.java.lang.String
getName()
Returns the name for this sound.byte[]
getSampleBytes()
Returns the sample bytes.int
getSampleCount()
Returns the sample count.int
getSamplesPerSecond()
Returns the samples per second.static RMSoundData
getSoundData(java.lang.Object aSource)
Returns a sound data for a given source.void
readData()
Reads sound format info from sounds data bytes.
-
-
-
Field Detail
-
RMBitRate5k
public static final int RMBitRate5k
- See Also:
- Constant Field Values
-
RMBitRate11k
public static final int RMBitRate11k
- See Also:
- Constant Field Values
-
RMBitRate22k
public static final int RMBitRate22k
- See Also:
- Constant Field Values
-
RMBitRate44k
public static final int RMBitRate44k
- See Also:
- Constant Field Values
-
RMBitRateUndefined
public static final int RMBitRateUndefined
- See Also:
- Constant Field Values
-
_cache
public static java.util.Map _cache
-
-
Method Detail
-
emptyCache
public static void emptyCache()
Clears out the cache
-
canRead
public static boolean canRead(java.lang.String anExt)
Returns whether sound data can read given extension.
-
getSoundData
public static RMSoundData getSoundData(java.lang.Object aSource)
Returns a sound data for a given source.
-
getName
public java.lang.String getName()
Returns the name for this sound.
-
getBytes
public byte[] getBytes()
Returns the sound data bytes.
-
getBitsPerSample
public int getBitsPerSample()
Returns the bits per sample.
-
getSamplesPerSecond
public int getSamplesPerSecond()
Returns the samples per second.
-
getChannelCount
public int getChannelCount()
Returns the channel count.
-
getSampleCount
public int getSampleCount()
Returns the sample count.
-
getSampleBytes
public byte[] getSampleBytes()
Returns the sample bytes.
-
bitRate
public int bitRate()
Returns the bit rate.
-
readData
public void readData()
Reads sound format info from sounds data bytes.
-
equals
public boolean equals(java.lang.Object anObj)
Standard equals implementation.- Overrides:
equals
in classjava.lang.Object
-
-