[api]Jouer un son

Résolu
shadow1779 Messages postés 706 Date d'inscription mercredi 17 novembre 2004 Statut Membre Dernière intervention 29 septembre 2013 - 25 nov. 2005 à 18:22
cs_norton Messages postés 215 Date d'inscription mardi 21 janvier 2003 Statut Membre Dernière intervention 21 août 2011 - 25 nov. 2005 à 19:50
Bonjour,



je suis en train de me tapper un bon tuto sur l'api et j'ai vu la
fonction pour jouer un fichier son, donc je l'est experimenté mais
visual c++ me donne quelque chose de bizarre, que dois je faire,?



code:



#include <windows.h>



int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int CmdShow)

{

PlaySound ("hellowin.wav", NULL, SND_FILENAME | SND_ASYNC);



return 0;

}



erreur:


prog.obj : error LNK2001: unresolved external symbol "int __stdcall
PlaySoundA(char const *,struct HINSTANCE__ *,unsigned long)"
(?PlaySoundA@@$$J212YGHPBDPAUHINSTANCE__@@K@Z)
.

4 réponses

yoyo269 Messages postés 1403 Date d'inscription lundi 23 février 2004 Statut Membre Dernière intervention 11 janvier 2009 2
25 nov. 2005 à 18:36
Déjà rajouter le header <mmsystem.h>. Et aussi la librairie winmm.


YOYO, @+.
YOYO
3
shadow1779 Messages postés 706 Date d'inscription mercredi 17 novembre 2004 Statut Membre Dernière intervention 29 septembre 2013
25 nov. 2005 à 18:47
ok et lire du mp3 c'est possible facilement ou non?
0
yoyo269 Messages postés 1403 Date d'inscription lundi 23 février 2004 Statut Membre Dernière intervention 11 janvier 2009 2
25 nov. 2005 à 18:50
Ca doit pas être très dur, mais je suis pas compétent pour ça.
Cherche sur le site, je crois qu'il y a pleins de sources là-dessus.

YOYO, @+.
YOYO
0
cs_norton Messages postés 215 Date d'inscription mardi 21 janvier 2003 Statut Membre Dernière intervention 21 août 2011
25 nov. 2005 à 19:50
Pour le Mp3 tu peux utiliser Fmod
http://www.fmod.org/
0
Rejoignez-nous