I have a little problem which I really don’t understand.
I program with windows with the IDE code blocks and I want to make a music play endlessly. I used the function FSOUND_Stream_SetLoopCount(FSOUND_STREAM *stream, int count)
but it doesn’t work and I really don’t know why because the value returned is true! The music is only played one time and nothing more at the end of the song.
Can somebody help me?
- dud225 asked 11 years ago
[quote:3smoaye8]What did you pass as the loop count argument? passing -1 should make it loop endlessly
When do you call FSOUND_Stream_SetLoopCount? Before the stream is played or after?[/quote:3smoaye8]
Yes I passed -1 as argument and I called it before the stream is played, but it doesn’t change anything if it’s called before or after.
Here you can see my code :
FSOUND_Init(44100, 32, 0);
music = FSOUND_Stream_Open("start.wav", 0, 0, 0);
if (music == NULL)
fprintf(stderr, "Impossible de lire Hype_Home.mp3\n");
printf("i: %d",i); // It returns 1
FSOUND_Stream_Close(musique); /* On libère la mémoire */
Yeah thanks it works now.
But I don’t really understand why it didn’t work because I copied the code from a very famous website, so I don’t think there was a mistake or a incomplete program, otherwise it would have been corrected since a long time!
Please login first to submit.