0
0

I tried 2 methods (sample_sound and stream mode). In the two case, my PC start the music, the CPU is about to 10%. About 10 secondes by 10 secondes, the CPU jump to 78% for one seconde, the sound is looping extremly far before it continues (i can heard a “trrrrrrrrr” sound). Is there a solution to such an issue? (is because i use Genesis3D, if you know it, as graphic engine?). But for the moment, i make nothing else than playing music in my code (the bitmap in the background is static and i do nothing)

My code is this:
[code:10104p2j]
void Main::InitSon()
{
FSOUND_Init(44100, 32, 0);
}

FSOUND_SAMPLE* Main::OuvrirMusik(const char *filename, int Loop)
{
FSOUND_SAMPLE *Zik;
Zik = FSOUND_Sample_Load(FSOUND_FREE ,filename,FSOUND_2D,0);

if(Loop)
    FSOUND_Sample_SetMode(Zik,FSOUND_LOOP_NORMAL);

return(Zik);

}

int Main::PlayMusik(FSOUND_SAMPLE *Zik)
{
int channel;
FSOUND_PlaySound(FSOUND_FREE,Zik);
return(channel);
}

void Main::StopAndKillMusik(FSOUND_SAMPLE *Zik,int channel, int Kill)
{
FSOUND_StopSound(channel);

if(Kill)
    KillMusik(Zik);

}

void Main::KillMusik(FSOUND_SAMPLE *Zik)
{
FSOUND_Sample_Free(Zik);
}

And, in an other part of my code:
{..... (App is a Main object)
.
.
int Channel;
FSOUND_SAMPLE* streamMusik;
streamMusik = App->OuvrirMusik("c:\Musik.mp3",1);
Channel = App->PlayMusik(streamMusik);
}
[/code:10104p2j]

I’m working on Xp with VC++
Thanks by advance!
Didier

PS: sorry for my mistakes, but i’m not english, nor american :-)

  • You must to post comments
0
0

Maybe your sound file is damaged.
Are the examples coming with fmod exhibiting the same problem ? If not, try to find out the difference.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.