Page 1 of 1

If comparatives with IsMusic

Posted: Mon Oct 08, 2012 12:13 pm
by Juan Carlos
This code I try to know the type of file to go a several functions but with the IsMusic actived as now when I loaded a text file for example the Vamp player is crashed but if I inactive the ElseIf IsMusic(file$) the same file now work fine and appear of message of "file doesn't supported" my firts intention, but the IsMusic checker works fine alone, but not with this checker routine for the other formats, I tryed different routines but when I actived the Music checker always crashed, and the question I can't doing several chekers or that IsMusic doesn't work fine, because also I tested the cheker alone and with the checker routine working join but separate but with the same result crash. Someidea?

If IsVideo(file$)=True
Multimedia=1
ElseIf IsAnim(file$)=True
Multimedia=2
ElseIf IsPicture(file$)=True
Multimedia=3
ElseIf IsMusic(file$)=True
MultiMedia=4
Else Multimedia=5
EndIf
Switch Multimedia
Case 1:
Cls()
OpenVideo(1, file$)
p_Video(file$)
Case 2:
Cls()
LoadAnim(1, file$, {FromDisk = True})
p_Animacion(file$)
Case 3:
Cls()
LoadBrush(6, file$)
p_Grafico(file$)
Case 4:
Cls()
OpenMusic(1, file$)
p_Musica(file$)
Case 5:
SetDisplayAttributes({Title = "Multimedia format doesn't supported!"})
EndSwitch
EndFunction

Re: If comparatives with IsMusic

Posted: Thu Oct 11, 2012 8:53 pm
by airsoftsoftwair
Sorry, no idea what this question is about.

Re: If comparatives with IsMusic

Posted: Thu Oct 11, 2012 9:05 pm
by Juan Carlos
Andreas when I tested a file for example a txt that iit isn't picture, video, music, in theory the "Case" by default is the 5 but when the code arrives to this point the program crashes, to resolved this problem I add the format file: mpg, jpg but the problem is that the program doesn't know that to do with the files not multimedia.