Code example for AudioTrack

Methods: getPlaybackHeadPosition

0
               audiothread.interrupt();
       } 
 
       public static boolean isPlaying() 
       { 
               try{return audiotrk.getPlaybackHeadPosition() <
(generatedSnd.length);}catch(Exception e){return false;}
       } 
 
       private static int minbufsize;
       private static int length;
 
       private static void playSound(){ 
               active = true;
               while(active)
               { 
                       try {Thread.sleep(Long.MAX_VALUE);} catch (InterruptedException e) {
                               while (playque.isEmpty() == false)
                               { 
                                       if (audiotrk != null)
                                       {