Code example for AudioTrack

Methods: flush

0
        try { 
            return mMediaCodec.dequeueInputBuffer(timeoutUs);
        } catch(Exception e) {
            Log.e(TAG, "Cannot dequeue Input buffer " + e.toString());
        } 
        return MEDIA_CODEC_ERROR;
    } 
 
    @CalledByNative 
    private void flush() { 
        mMediaCodec.flush();
        mFlushed = true;
        if (mAudioTrack != null) {
            mAudioTrack.flush();
        } 
    } 
 
    @CalledByNative 
    private void stop() { 
        mMediaCodec.stop();
        if (mAudioTrack != null) {