anchor.diff:  
   
   {Music Lib}
  -constructor TMusicLib.Create(aVolume:single);
  -var i: byte;
  +constructor TMusicLib.Create(aVolume: Single);
  +var I: Integer;
   begin
     inherited Create;
  -  IsMusicInitialized := true;
  +  IsMusicInitialized := True;
     ScanMusicTracks(ExeDir + 'Music\');
   
   
  
positive.code:   BASS_StreamFree(fBassOtherStream); //Free the existing stream (will just return false if the stream is invalid)
    fBassOtherStream := BASS_StreamCreateFile(FALSE, PChar(FileName), 0, 0, BASS_STREAM_AUTOFREE {$IFDEF UNICODE} or BASS_UNICODE{$ENDIF});
  
    BASS_ChannelPlay(fBassOtherStream,true); //Start playback from the beggining
  
    ErrorCode := BASS_ErrorGetCode();
    if ErrorCode <> BASS_OK then exit; //Error
    {$ENDIF}
  
    //Now set the volume to the desired level
    {$IFDEF USELIBZPLAY}
    ZPlayerOther.SetPlayerVolume(Round(fOtherVolume*100), Round(fOtherVolume*100)); //0=silent, 100=max
    {$ENDIF}
    {$IFDEF USEBASS}
    BASS_ChannelSetAttribute(fBassOtherStream, BASS_ATTRIB_VOL, fOtherVolume); //0=silent, 1=max
    {$ENDIF}
  
    Result := true;
  end;
  
  
  {Update music gain (global volume for all sounds/music)}
  procedure TMusicLib.UpdateMusicVolume(Value:single);
  begin
    if not IsMusicInitialized then exit; //Keep silent
    MusicGain := Value;
    {$IFDEF USELIBZPLAY}
    ZPlayer.SetPlayerVolume(Round(Value*100), Round(Value*100)); //0=silent, 100=max
    {$ENDIF}
    {$IFDEF USEBASS}
    BASS_ChannelSetAttribute(fBassStream, BASS_ATTRIB_VOL, Value); //0=silent, 1=max
  
negative.code: type
    TMusicLib = class
    private
      MusicCount: Integer;
      MusicIndex: Integer; //Points to the index in TrackOrder of the current track
      MusicTracks: array[1..256]of string;
      TrackOrder: array[1..256]of byte; //Each index points to an index of MusicTracks
      //MIDICount,MIDIIndex:integer;
      //MIDITracks:array[1..256]of string;
      IsMusicInitialized: Boolean;
      MusicGain: Single;
      {$IFDEF USEBASS} fBassStream, fBassOtherStream: Cardinal; {$ENDIF}
      {$IFDEF USELIBZPLAY} ZPlayer, ZPlayerOther: ZPlay; {$ENDIF} //I dislike that it's not TZPlay... Guess they don't know Delphi conventions.
      fFadeState: TFadeState;
      fFadeStarted: Cardinal;
      fToPlayAfterFade: string;
      fFadedToPlayOther: Boolean;
      fOtherVolume: Single;
      function PlayMusicFile(FileName: string): Boolean;
      function PlayOtherFile(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;
      procedure UpdateMusicVolume(Value: Single);
      procedure PlayMenuTrack;
      procedure PlayNextTrack;
      procedure PlayPreviousTrack;
      function IsMusicEnded: Boolean;
      function IsOtherEnded: Boolean;
      procedure StopMusic;
      procedure ToggleMusic(aEnableMusic: Boolean);
      procedure ToggleShuffle(aEnableShuffle: Boolean);
      procedure FadeMusic(Sender: TObject);
      procedure UnfadeMusic(Sender: TObject);
      procedure PauseMusicToPlayFile(aFileName: string; aVolume: Single);
      procedure StopPlayingOtherFile;
      function GetTrackTitle: string;
      procedure UpdateStateIdle; //Used for fading
    end;
  
  