edu.washington.cs.sounddetector.server.api.object
Class SoundFormat

java.lang.Object
  extended by 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.
 
Method Summary
 boolean equals(Object obj)
           
 int getChannels()
           
 float getSampleRate()
           
 int getSampleSizeInBits()
           
 int hashCode()
           
 boolean isBigEndian()
           
 boolean isSigned()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 second
sampleSizeInBits - the number of bits in each sample
channels - the number of channels (1 for mono, 2 for stereo, and so on)
signed - indicates whether the data is signed or unsigned
bigEndian - indicates whether the data for a single sample is stored in big-endian byte order (false means little-endian)
Method Detail

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.