Einzelnen Beitrag anzeigen

EWeiss
(Gast)

n/a Beiträge
 
#70

AW: TMIDIPlayer2

  Alt 23. Mai 2013, 06:36
Für die Leute die das projekt verwenden eine kleine korrektur.

Zitat:
There should be a modification to allow position change by mouse click on music sheet
at stopped state.
Delphi-Quellcode:
in procedure TMainForm.WndProc of MIDITest.pas

                  .

                  .

else if (Msg.Msg = WM_Mouse_Clicked) then // mouse click on music sheet of MidiSheetMusic
  begin
    if (FhServer <> 0) and
      (Paused or (not MidiPlayer.Playing)) then
    begin
      if (not Paused) then
      begin
         Paused := true;
         for I := 0 to MidiPlayer.MidiFile.TrackCount - 1 do // "I" should be declared as a local variable
           MidiPlayer.MidiFile.GetTrack(I).EndOfTrack := false;
      end;

      PostMessage(FhServer, WM_MIDI_PosUpdate, WPARAM(Msg.WParam), 0{=Move to new position});
      PrevPosMs := Midifile.Tick2TimePos(Msg.WParam);
      MidiPlayer.CurrentTime := PrevPosMs;
      PrevPosTicks := Msg.WParam;
      MidiPlayerPosUpdate(PrevPosMs, Msg.WParam);
    end;
  end
gruss

Geändert von EWeiss (23. Mai 2013 um 06:39 Uhr)
  Mit Zitat antworten Zitat