PB 6.21 b10 x86 MIDI file problem

Just starting out? Need help? Post your questions and find answers here.
infratec
Always Here
Always Here
Posts: 7613
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

PB 6.21 b10 x86 MIDI file problem

Post 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
User avatar
SPH
Enthusiast
Enthusiast
Posts: 566
Joined: Tue Jan 04, 2011 6:21 pm

Re: PB 6.21 b10 x86 MIDI file problem

Post by SPH »

Tried on W11 with other .MIDs, it doesn't work.

!i!i!i!i!i!i!i!i!i!
!i!i!i!i!i!i!
!i!i!i!
//// Informations ////
Portable LENOVO ideapad 110-17ACL 64 bits
Version de PB : 6.12LTS - 64 bits
infratec
Always Here
Always Here
Posts: 7613
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: PB 6.21 b10 x86 MIDI file problem

Post 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.
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4953
Joined: Sun Apr 12, 2009 6:27 am

Re: PB 6.21 b10 x86 MIDI file problem

Post 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
Egypt my love
Fred
Administrator
Administrator
Posts: 18199
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PB 6.21 b10 x86 MIDI file problem

Post by Fred »

MIDI files were never supported by PB, if it worked before it was probably just because directshow had a codec for it.
infratec
Always Here
Always Here
Posts: 7613
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: PB 6.21 b10 x86 MIDI file problem

Post 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?
Post Reply