Remove a track from the SoundCloud player playlist.
<p/>
If the track is currently played, it will be stopped before being removed.

@param playlistIndex index of the track to be removed.
558939
public void removeTrack(int playlistIndex) {
        checkState();
        SoundCloudTrack currentTrack = mPlayerPlaylist.getCurrentTrack();
        SoundCloudTrack removedTrack = mPlayerPlaylist.remove(playlistIndex);

        if (removedTrack == null) {
            // nothing removed
            return;
        }

        if (mPlayerPlaylist.isEmpty()) {
            // playlist empty after deletion, stop player;
            PlaybackService.stop(getContext(), mClientKey);
        } else if (currentTrack != null && currentTrack.equals(removedTrack) && mState == STATE_PLAYING) {
            // play next track if removed one was the current and playing
            play(mPlayerPlaylist.getCurrentTrackIndex());
        }

        for (CheerleaderPlaylistListener listener : mCheerleaderPlaylistListeners) {
            listener.onTrackRemoved(removedTrack, mPlayerPlaylist.isEmpty());
        }
    }
185418
def remove(self, song):
        
        if song in self._songs:
            if self._current_song is None:
                self._songs.remove(song)
            elif song == self._current_song:
                next_song = self.next_song
                # 随机模式下或者歌单只剩一首歌曲，下一首可能和当前歌曲相同
                if next_song == self.current_song:
                    self.current_song = None
                    self._songs.remove(song)
                    self.current_song = self.next_song
                else:
                    self.current_song = self.next_song
                    self._songs.remove(song)
            else:
                self._songs.remove(song)
            logger.debug('Remove {} from player playlist'.format(song))
        else:
            logger.debug('Remove failed: {} not in playlist'.format(song))

        if song in self._bad_songs:
            self._bad_songs.remove(song)
827448
public void removeListener(IProblemChangedListener listener) {
		fListeners.remove(listener);
		if (fListeners.isEmpty()) {
			VdmUIPlugin.getWorkspace().removeResourceChangeListener(this);
//			JavaPlugin.getDefault().getCompilationUnitDocumentProvider().removeGlobalAnnotationModelListener(this);
		}
	}
979402
public void dropByIndex(int idx) {
    SAXRecord entry = realTSindex.get(idx);
    if (null != entry) {
      realTSindex.remove(idx);
      entry.removeIndex(idx);
      if (entry.getIndexes().isEmpty()) {
        records.remove(String.valueOf(entry.getPayload()));
      }
    }
  }
1154826
public void removeListener(ILabelProviderListener listener)
	{
		if (fListeners != null)
		{
			fListeners.remove(listener);
			if (fListeners.isEmpty() && fProblemChangedListener != null)
			{
				VdmUIPlugin.getDefault()
						.getProblemMarkerManager()
						.removeListener(fProblemChangedListener);
				fProblemChangedListener = null;
			}
		}
	}
1373914
public void removeListener(Listener listener) {
    queue.remove(listener);

    if (queue.isEmpty()) {
      synchronized (queue) {
        if (currentScheduledFrequency.get() > 0 && queue.isEmpty()) {
          currentScheduledFrequency.set(-1);
        }
      }

    }
  }
919868
public final synchronized void removeListener(EventListener l) {
        if(l ==null) {
            throw new IllegalArgumentException("Listener " + l +
                                               " is null");
        }

        // Is l on the list?
        int index = -1;
        for(int i = listeners.length-1; i>=0; i--) {
            if(listeners[i].equals(l) == true) {
                index = i;
                break;
            }
        }

        // If so,  remove it
        if(index != -1) {
            EventListener[] tmp = new EventListener[listeners.length-1];
            // Copy the list up to index
            System.arraycopy(listeners, 0, tmp, 0, index);
            // Copy from two past the index, up to
            // the end of tmp (which is two elements
            // shorter than the old list)
            if(index < tmp.length)
                System.arraycopy(listeners, index+1, tmp, index, 
                                 tmp.length - index);
            // set the listener array to the new array or null
            listeners = (tmp.length == 0) ? EMPTY_LISTENERS : tmp;
        }
    }
611364
public void removeScrollListener(@NonNull final ScrollListener listener) {
        Condition.INSTANCE.ensureNotNull(listener, "The listener may not be null");
        this.scrollListeners.remove(listener);
    }
1207627
private void removeFile(int index) {
        String file = files.remove(index);
        FileLogUtils.deleteFile(directory, file);
    }
819884
public void remove() throws DBException
    {
        if (this.getCurrentRecord() == this.getBaseRecord())
            super.remove();
        else
        {
            this.getBaseRecord().matchListeners(this.getCurrentRecord(), false, true, true, true, true);      // Clone the listeners that are not there already.
            this.getCurrentRecord().remove();
        }
    }
287081
public void add(int position, SoundCloudTrack track) {
        if (mCurrentTrackIndex == -1) {
            mCurrentTrackIndex = 0;
        }
        mSoundCloudPlaylist.addTrack(position, track);
    }
43954
function removeListener(event, eventHandler) {
    checkEventValid(event);

    if (listeners[event] && listeners[event].length) {
        var indexOfListener = listeners[event].indexOf(eventHandler);
        if (indexOfListener > -1) {
            listeners[event].splice(indexOfListener, 1);
        }
    }
}
1211921
function removeListeners(l) {
    var idx = listeners.indexOf(l);
    if (idx > -1) {
        listeners.splice(idx, 1);
        if (listeners.length === 0) {
            stop();
        }
    }
}
1006703
public void removeChangeListener(javax.swing.event.ChangeListener LISTENER) {
        LISTENER_LIST.remove(javax.swing.event.ChangeListener.class, LISTENER);
    }
4435
def remove_tracks(self, track_indices):
        
        if isinstance(track_indices, int):
            track_indices = [track_indices]
        self.tracks = [track for idx, track in enumerate(self.tracks)
                       if idx not in track_indices]
897389
private void doMoveSelectedEntriesInList(int moveBy)
	{
		PlayListEntry [] selected = playList.getSelectedEntries();
		if (selected!=null)
		{
			playlistUpdateThread.halt();
			try
			{
				if (moveBy < 0)
				{
					// Moveup --> Still possible?
					if ((selected[0].getIndexInPlaylist() + moveBy) < 0)
						moveBy = selected[0].getIndexInPlaylist();
					if (moveBy == 0) return;
					
					for (int i=0; i<selected.length; i++)
					{
						int fromIndex = selected[i].getIndexInPlaylist();
						playList.move(fromIndex, fromIndex + moveBy);
					}
				}
				else
				{
					// Movedown --> Still possible?
					int lastIndex = selected.length - 1;
					if ((selected[lastIndex].getIndexInPlaylist() + moveBy) >= playList.size())
						moveBy = playList.size() - 1 - selected[lastIndex].getIndexInPlaylist();
					if (moveBy == 0) return;
					
					for (int i=lastIndex; i>=0; i--)
					{
						int fromIndex = selected[i].getIndexInPlaylist();
						playList.move(fromIndex, fromIndex + moveBy);
					}
				}
				int showIndex = (moveBy<0)?selected[0].getIndexInPlaylist()-PLUS_LINES_VISABLE:selected[selected.length-1].getIndexInPlaylist()+PLUS_LINES_VISABLE;   
				createList(showIndex);
				firePlaylistChanged();
			}
			finally
			{
				playlistUpdateThread.restart();
			}
		}
	}
15541
public void removeListener(MessageKey key, VehicleMessage.Listener listener) {
        removeListener(ExactKeyMatcher.buildExactMatcher(key), listener);
    }