Code example for AudioTrack

Methods: setPlaybackPositionUpdateListener

0
                                                      AudioFormat.CHANNEL_CONFIGURATION_MONO, 
                                                      AudioFormat.ENCODING_PCM_16BIT); 
            m_AudioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, sampleRateInHz, 
                                          AudioFormat.CHANNEL_CONFIGURATION_MONO, 
                                          AudioFormat.ENCODING_PCM_16BIT, iMinBufSize, 
                                          AudioTrack.MODE_STREAM); 
            m_AudioTrack.setPlaybackPositionUpdateListener(playback); 
            iBuffer = new byte[iMinBufSize]; 
            mPeriodicInFrames = 16 * 50; 
            mPeriodByteSize = mPeriodicInFrames * 2; 
            iBufferZero = new byte[mPeriodicInFrames]; 
            Looper.prepare(); 
            mAudioThreadHandler = new Handler() 
            { 
 
                @Override 
                public void handleMessage(Message msg) 
                { 
                    switch (msg.what) 
                    { 
                        case MSG_STOP: