edu.washington.cs.sounddetector.server.api.object
Class SoundFormat
java.lang.Object
edu.washington.cs.sounddetector.server.api.object.SoundFormat
public class SoundFormat
- extends Object
SoundFormat specifies the format of a linear PCM encoded sound. This class is serves essentially
the same function as javax.sound.sampled.AudioFormat, but the javax.sound.sampled package is not
available on Android phones.
- Author:
- the.dylan.price@gmail.com
Constructor Summary |
SoundFormat()
|
SoundFormat(float sampleRate,
int sampleSizeInBits,
int channels,
boolean signed,
boolean bigEndian)
Construct a new SoundFormat. |
SoundFormat
public SoundFormat()
SoundFormat
public SoundFormat(float sampleRate,
int sampleSizeInBits,
int channels,
boolean signed,
boolean bigEndian)
- Construct a new SoundFormat.
- Parameters:
sampleRate
- the number of samples per secondsampleSizeInBits
- the number of bits in each samplechannels
- the number of channels (1 for mono, 2 for stereo, and so on)signed
- indicates whether the data is signed or unsignedbigEndian
- indicates whether the data for a single sample is stored in big-endian byte order
(false means little-endian)
getSampleRate
public float getSampleRate()
- Returns:
- the sampleRate
getSampleSizeInBits
public int getSampleSizeInBits()
- Returns:
- the sampleSizeInBits
getChannels
public int getChannels()
- Returns:
- the channels
isSigned
public boolean isSigned()
- Returns:
- the signed
isBigEndian
public boolean isBigEndian()
- Returns:
- the bigEndian
toString
public String toString()
- Overrides:
toString
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
Copyright © 2012. All Rights Reserved.