The International Simutrans Forum

 

Author Topic: can't replaying midi files which finished play using AVF_core-audio_midi  (Read 361 times)

0 Members and 1 Guest are viewing this topic.

Offline shingoushori

  • *
  • Posts: 15
  • Languages: JP
Hello
I found the little inconvenient thing, can't replaying midi files which finished play, at least using AVF_core-audio_midi.

So then, I submit fixing plans, they are 2 versions. on both of these, fixing by using setCurrentPosition method.
and differ points are timing,
・setCurrentPosintion at all time of when replay command occurs
・setCurrentPosintion only when replay command occurs and the time of current position exceeds the duration of target midi file

I hope this post is useful. thanks for reading.

Offline THLeaderH jp

  • Coder/patcher
  • Devotee
  • *
  • Posts: 328
  • Languages: JP,EN
Thank you, shingoushori. I'm using Mac and have a same problem. (Note that this problem occurs only on Mac.)

I'm not sure how it behaves on Windows and other operating systems, I like the former option of the two.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9514
  • Languages: De,EN,JP
Since I do not have a MAC, to be clear: Version 1 works well? I submitted this version.

Offline shingoushori

  • *
  • Posts: 15
  • Languages: JP
Thanks for consideration !

At least it will be improved so that it can be playing again.

But, the play command needs to be executed twice in order to actually playing again.
This is because it doesn't really play to the end during playback (This is another bug or Inevitable fate of core audio).
However, I think it is important to solve the problem of not playing again,
so I would appreciate it if you could adopt this plan for the time being.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9514
  • Languages: De,EN,JP
Please keep answer simple. I do not have a MAC, so I rely on your guys to submit patches. What change do you suggest?

Offline shingoushori

  • *
  • Posts: 15
  • Languages: JP
ok, Version 1 works well.
I'd like to suggest it.