anchor.diff:      function  CheckMusicError:boolean;
       function  PlayMusicFile(FileName:string):boolean;
       procedure ScanMusicTracks(Path:string);
  +    procedure ShuffleSongs; //should not be seen outside of this class
  +    procedure UnshuffleSongs;
     public
       constructor Create(aVolume:single);
       destructor Destroy; override;
  
positive.code:     UnshuffleSongs;
  end;
  
  procedure TMusicLib.ShuffleSongs();
  var i, r, NewIndex, NewSpirit : Byte; TracksToChooseFrom:array[1..256]of Byte;
  begin
    //Make an ordered array of track numbers
    for i := 1 to MusicCount do
      TracksToChooseFrom[i] := i;
    //Place random numbers in the indices of TrackOrder array
    for i := 1 to MusicCount do
      begin
        //Generate random number from 1 to (number of tracks)
        r := RandomRange(1, MusicCount);
        //Find the next unused track
        while TracksToChooseFrom[r] = 0 do
          r := r mod MusicCount + 1;
        //Remember the track number if it is the current track or "Spirit"
        if r = MusicIndex then
          NewIndex := i;
        if r = SpiritIndex then
          NewSpirit := i;
        //Place next track into TrackOrder array
        TrackOrder[i] := TracksToChooseFrom[r];
        //Mark track as "used" by setting the index to zero
        TracksToChooseFrom[r] := 0;
      end;
      //Update indices of current track and "Spirit"
      MusicIndex := NewIndex;
      SpiritIndex := NewSpirit;
  end;
  
  procedure TMusicLib.UnshuffleSongs();
  var i, NewIndex : Byte;
  begin
    //Reset every index of the TrackOrder array
    for i := 1 to MusicCount do
      begin
        //Remember index of current track
        if i = MusicIndex then
          NewIndex := i;
        TrackOrder[i] := i;
      end;
    //Update indices of current track and "Spirit"
    MusicIndex := NewIndex;
    SpiritIndex := 1;
  
negative.code:     procedure StopMusic;
      procedure ToggleMusic(aOn:boolean);
      procedure ToggleShuffle(aOn:boolean);
      function GetTrackTitle:string;
    end;
  
  