Page 1 of 1

PB 6.21 b10 x86 MIDI file problem

Posted: Sun Jun 08, 2025 2:32 pm
by infratec
The following code works with PB 6.20, but not with the latest PB 6.21 Beta:

Code: Select all

InitMovie()

Filename$ = OpenFileRequester("Choose a MIDI file", "", "MIDI|*.mid", 0)
If Filename$
  Movie = LoadMovie(#PB_Any, Filename$)
  If Movie
    PlayMovie(Movie, #Null)
    Delay(250)
    While MovieStatus(Movie) > 0
      Delay(10)
    Wend
    FreeMovie(Movie)
  Else
    Debug "Failed to load MIDI"
  EndIf
EndIf
In PB 6.21 it runs into "Failed to load MIDI"

MIDI file to test:
https://www.von-der-salierburg.de/downl ... /Morse.mid

Re: PB 6.21 b10 x86 MIDI file problem

Posted: Sun Jun 08, 2025 2:48 pm
by SPH
Tried on W11 with other .MIDs, it doesn't work.

Re: PB 6.21 b10 x86 MIDI file problem

Posted: Sun Jun 08, 2025 3:06 pm
by infratec
Normally I would use LoadMusic(), but this doesn't work too.

Code: Select all

InitSound()

Filename$ = OpenFileRequester("Choose a MIDI file", "", "MIDI|*.mid", 0)
If Filename$
  If LoadMusic(0, Filename$)
    PlayMusic(0)
    Delay(5000)
    StopMusic(0)
    FreeMusic(0)
  Else
    Debug "Failed to load MIDI"
  EndIf
EndIf
At the moment it looks that PB 6.21 can not play MIDI files.

Re: PB 6.21 b10 x86 MIDI file problem

Posted: Sun Jun 08, 2025 3:10 pm
by RASHAD
I just remembered that Fred changed the Movie lib from DirectShow to MS Media Foundation
It maybe that is the reason for the problem

Re: PB 6.21 b10 x86 MIDI file problem

Posted: Mon Jun 09, 2025 8:22 am
by Fred
MIDI files were never supported by PB, if it worked before it was probably just because directshow had a codec for it.

Re: PB 6.21 b10 x86 MIDI file problem

Posted: Mon Jun 09, 2025 10:54 am
by infratec
So please tell us in the doc/help what files exactly are supported.

For example in Music it is only written:

A mass of music formats like ProTracker (mod), FastTracker (ft) and ImpulseTracker (it)
What other formats are supported?