If comparatives with IsMusic
Posted: Mon Oct 08, 2012 12:13 pm
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
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