/************************************/ /* play_song.cpp */ /* ------------- */ /* permet de lancer le fond musical */ /************************************/ // header necessaire #include <fmod.h> // insertion de la librairie #pragma comment(lib, "fmodvc.lib") // pointeur vers le fichier a lire FSOUND_SAMPLE* song; // fonction qui lit le fichier void play_song() { FSOUND_Init(44100, 32, 0); song = FSOUND_Sample_Load(FSOUND_FREE, "data/Psychedelic_Trance.mp3", FSOUND_NORMAL, 0, 0); FSOUND_PlaySound(FSOUND_FREE, song); return; } // fonction qui arrete la lecture void stop_song() { FSOUND_Sample_Free(song); FSOUND_Close(); return; }
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question