Guest User

Untitled

a guest
Jan 23rd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. //This method creates and returns an
  2. // AudioFormat object for a given set
  3. // of format parameters. If these
  4. // parameters don't work well for
  5. // you, try some of the other
  6. // allowable parameter values, which
  7. // are shown in comments following
  8. // the declarations.
  9. private AudioFormat getAudioFormat(){
  10. float sampleRate = 8000.0F;
  11. //8000,11025,16000,22050,44100
  12. int sampleSizeInBits = 16;
  13. //8,16
  14. int channels = 1;
  15. //1,2
  16. boolean signed = true;
  17. //true,false
  18. boolean bigEndian = false;
  19. //true,false
  20. return new AudioFormat(
  21. sampleRate,
  22. sampleSizeInBits,
  23. channels,
  24. signed,
  25. bigEndian);
  26. }//end getAudioFormat
Add Comment
Please, Sign In to add comment