Philippe_judo
Messages postés19Date d'inscriptionmardi 17 avril 2007StatutMembreDernière intervention 6 mai 2015
-
23 déc. 2009 à 22:07
PCPT
Messages postés13272Date d'inscriptionlundi 13 décembre 2004StatutMembreDernière intervention 3 février 2018
-
24 déc. 2009 à 16:37
Bonjour,
J'essaie de faire jouer un son wav ou mp3 sur une routine vb mais bien qu'il me joue les sons de Windows, VB6 me donne une erreur quand j'essaie de mettre un autre sond
*****************
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
Dim returnval As Long
Dim soundfile As String
soundfile = "C:\Tutoriel judo\Pronociation japonaise\Tsuri-goshi.mp3"
returnval = PlaySound("tada", 0, 0) 'Cette ligne passe
returnval = PlaySound(soundfile, 0, 0) 'Cette ligne ne passe pas
returnval = PlaySound("C:\Tutoriel judo\Pronociation japonaise\Tsuri-goshi.mp3", 0, 0) 'Cette ligne ne passe pas
*****************
Philippe_judo
Messages postés19Date d'inscriptionmardi 17 avril 2007StatutMembreDernière intervention 6 mai 2015 24 déc. 2009 à 07:00
Bonjour,
En fait, il semble lire le fichier wave mais plutôt que de me donner le son demandé, il me donne un "bip" de windows.
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
Dim returnval As Long
Dim soundfile As String
soundfile = "C:\Tutoriel judo\Pronociation japonaise\Tsuri-goshi.mp3"
returnval = PlaySound("tada", 0, 0) 'Cette ligne passe
returnval = PlaySound(soundfile, 0, 0) 'Cette ligne ne passe pas
returnval = PlaySound("C:\Tutoriel judo\Pronociation japonaise\Tsuri-goshi.wav", 0, 0) 'Cette ligne ne passe pas
Philippe
Vous n’avez pas trouvé la réponse que vous recherchez ?