void playSound(){
AudioTrack audioTrack = new AudioTrack(AudioManager.STREAM_MUSIC,
8000, AudioFormat.CHANNEL_CONFIGURATION_MONO,
AudioFormat.ENCODING_PCM_16BIT, numSamples,
AudioTrack.MODE_STATIC);
// audioTrack.write(generatedSnd, 0, generatedSnd.length);
audioTrack.write(generatedSnd, 0, numSamples);
//System.out.println("the formaat is:"+audioTrack.getAudioFormat());
audioTrack.play();