dis donc, ya pas de message requester qui dit que la lib est fini de compiller ??
je viens d'essyer de compiller la lib de Lionel OM (MCI Lib)
et j'ai un message d'erreur au moment d'utiliser le résultat generé par Moebius !!
erreur : POLINK warning section BSS is missing content flag assuming Data
et une autre erreur POLINK dans le meme message
POLINK : Fatal error , invalid or corrupt object 'OpenFileRequester.obj'
la lib de Lionel
Code : Tout sélectionner
;ProcedureDLL.l Mci(Cde.s)
; ProcedureReturn mciSendString_(Cde, #Null, #Null, #Null)
;EndProcedure
ProcedureDLL.l Mci_Return(Cde.s)
Protected *Resultat.l, Retour.l
;*Resultat = GlobalAlloc_(#GMEM_FIXED, 256)
*Resultat = AllocateMemory(256)
Retour = mciSendString_(Cde, *Resultat, 256, 0)
Retour = Val(PeekS(*Resultat))
;GlobalFree_(*Resultat)
FreeMemory(*Resultat)
ProcedureReturn Retour
EndProcedure
ProcedureDLL MCI_SetVolume(song$, vol.l)
mciSendString_("setaudio piste_0"+song$+" right volume to " + Str(vol), #Null, #Null, #Null)
mciSendString_("setaudio piste_0"+song$+" left volume to " + Str(vol), #Null, #Null, #Null)
EndProcedure
ProcedureDLL Mci_SetVolume2(song$, lVol.l, rVol.l)
mciSendString_("setaudio piste_0"+song$+" right volume to " + Str(rVol), #Null, #Null, #Null)
mciSendString_("setaudio piste_0"+song$+" left volume to " + Str(lVol), #Null, #Null, #Null)
EndProcedure
; Retourne la longeur de la chanson en 'ms'
; 0 si la chanson n'a pu être chargée
ProcedureDLL Mci_Load(file$, song$)
Protected time.l
If FileSize(file$) > 0
If mciSendString_("open "+Chr(34)+ file$ +Chr(34)+" alias piste_0"+song$, #Null, #Null, #Null) = #Null
mciSendString_("set piste_0"+song$+" time format ms", #Null, #Null, #Null)
time = Mci_Return("status piste_0"+song$+" length")
mciSendString_("seek piste_0"+song$+" to start", #Null, #Null, #Null)
ProcedureReturn time
EndIf
EndIf
ProcedureReturn #Null
EndProcedure
; Renvoi la position de la chanson en 'ms'
; -1 sinon
ProcedureDLL Mci_GetPosition(song$)
If mciSendString_("status piste_0"+song$+" length", #Null, #Null, #Null) <> #Null
ProcedureReturn -1
EndIf
ProcedureReturn Mci_Return("status piste_0"+song$+" length")
EndProcedure
; Lance une chanson depuis 'position' (en ms)
; position = 0 => On joue la chanson depuis sa position actuelle
; Renvoi : 1 en cas de succès, 0 sinon
ProcedureDLL Mci_Play(song$, position)
If position <= 0
If mciSendString_("play piste_0"+song$, #Null, #Null, #Null) = #Null
ProcedureReturn #True
EndIf
Else
If mciSendString_("play piste_0"+song$+" from "+Str(position)+" notify", #Null, #Null, #Null) = #Null
ProcedureReturn #True
EndIf
EndIf
EndProcedure
; Renvoi 1 en cas de succès, 0 sinon (chanson non chargée)
ProcedureDLL Mci_Resume(song$)
If mciSendString_("play piste_0"+song$, #Null, #Null, #Null) = #Null
ProcedureReturn #True
EndIf
EndProcedure
ProcedureDLL Mci_Pause(song$)
If mciSendString_("pause piste_0"+song$+" wait", #Null, #Null, #Null) = #Null
ProcedureReturn #True
EndIf
EndProcedure
ProcedureDLL Mci_Stop(song$)
If mciSendString_("close piste_0"+song$, #Null, #Null, #Null) = #Null
ProcedureReturn #True
EndIf
EndProcedure
; Renvoi la position de la chanson
ProcedureDLL Mci_SetPosition(song$, time.l)
Protected length.l
If mciSendString_("pause piste_0"+song$+" wait", #Null, #Null, #Null) = #Null
mciSendString_("seek piste_0"+song$+" To End wait", #Null, #Null, #Null)
length = Mci_Return("status piste_0"+song$+" position wait")
; Temps indiqué trop important
If length < time
If mciSendString_("play piste_0"+song$+" from 1", #Null, #Null, #Null) = #Null
mciSendString_("pause piste_0"+song$+" wait", #Null, #Null, #Null)
ProcedureReturn 1
EndIf
EndIf
If mciSendString_("play piste_0"+song$+" to " + Str(time), #Null, #Null, #Null) = #Null
mciSendString_("pause piste_0"+song$+" wait", #Null, #Null, #Null)
ProcedureReturn time
EndIf
EndIf
ProcedureReturn #Null
EndProcedure
;Debug Mci_Load("track.mp3", "")
Debug Mci_Load("D:\My Shared Folders\Music\Black Eyed Peas - Don't Lie.mp3", "")
Debug Mci_Play("", 0)
Delay(2000)
Mci_Pause("")
Debug Mci_SetPosition("", 20000)
Mci_Resume("")
Delay(2000)
Mci_Stop("")
mon code pour l'exploiter
Code : Tout sélectionner
file$=OpenFileRequester("Charge un midifile","c:\","*.mid",0)
temp.l= MCI_Load(file$, " ")
MCI_Play(" ", 1)
Delay (temp.l)
[/quote]