Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //This method creates and returns an
- // AudioFormat object for a given set
- // of format parameters. If these
- // parameters don't work well for
- // you, try some of the other
- // allowable parameter values, which
- // are shown in comments following
- // the declarations.
- private AudioFormat getAudioFormat(){
- float sampleRate = 8000.0F;
- //8000,11025,16000,22050,44100
- int sampleSizeInBits = 16;
- //8,16
- int channels = 1;
- //1,2
- boolean signed = true;
- //true,false
- boolean bigEndian = false;
- //true,false
- return new AudioFormat(
- sampleRate,
- sampleSizeInBits,
- channels,
- signed,
- bigEndian);
- }//end getAudioFormat
Add Comment
Please, Sign In to add comment