/** {@inheritDoc} */ @Override public float getSpeed(final float w, final long t) { if (w > 0.8f) { return mAdapter.getCount() / 0.001f; } else { return 10.0f * w; } }
/** * @return The position of an item in the list based on the name of the currently playing song. */ private int getItemPositionBySong() { final long trackId = MusicUtils.getCurrentAudioId(); if (mAdapter == null) { return 0; } for (int i = 0; i < mAdapter.getCount(); i++) { if (mAdapter.getItem(i).mSongId == trackId) { return i; } } return 0; }