@Override
        public void run() {
            while(!isInterrupted()) {
                try {
                    synchronized(this) {
                        while(mPaused) {
                            wait();
                        }
                    }

                    BufferQueue.Item bufferItem = null;
                    synchronized (SYNC) {
                        while ((bufferItem = mBufferQueue.take()) == null) {
                            SYNC.wait();
                        }
                    }

                    writeToPlaybackBuffer(bufferItem.buffer, bufferItem.presentationTimeUs);
                    mBufferQueue.put(bufferItem);
                } catch (InterruptedException e) {
                    interrupt();
                }
            }
        }
@see android.media.AudioTrack#setVolume(float)
MediaPlayer/src/main/java/net/protyposis/android/mediaplayer/AudioPlayback.java