as.clynx.audio.rep
Class Sample

java.lang.Object
  extended by as.clynx.audio.rep.Sample

public class Sample
extends java.lang.Object

The class Sample.java calculates between samplevalue and byterepresentaion.

Version:
cLynx v.1.2, JDK 6.0: 12.10.2007
Author:
Andreas Senfter - andreas@senfters.com

Constructor Summary
Sample()
           
 
Method Summary
static int getSampleValue(byte[] sampleValues, int offset, javax.sound.sampled.AudioFormat format)
          calculates the samplevalue of the passed byte[] http://www.jsresources.org/faq_audio.html#reconstruct_samples
static void toByteValue(int sample, byte[] byteArray, int offset, javax.sound.sampled.AudioFormat format)
          calculates the byte[] of the passed samplevalue http://www.jsresources.org/faq_audio.html#reconstruct_samples
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sample

public Sample()
Method Detail

getSampleValue

public static int getSampleValue(byte[] sampleValues,
                                 int offset,
                                 javax.sound.sampled.AudioFormat format)
calculates the samplevalue of the passed byte[]

http://www.jsresources.org/faq_audio.html#reconstruct_samples

Parameters:
sampleValues -
offset -
format -
Returns:
sample value

toByteValue

public static void toByteValue(int sample,
                               byte[] byteArray,
                               int offset,
                               javax.sound.sampled.AudioFormat format)
calculates the byte[] of the passed samplevalue

http://www.jsresources.org/faq_audio.html#reconstruct_samples

Parameters:
sample -
byteArray -
offset -
format -