0
0

Hi guys.

There is a little problem:
The FMOD3.71 Media Player accepts the setting of the Loop-Checkbox only when it’s set before playing the file. So the problem doesn’t occur there.
I want to switch looping on and off during play of a file and I use FSOUND_Stream_SetMode(). To switch on I add FSOUND_LOOP_NORMAL and take away FSOUND_LOOP_OFF. To switch off I do the opposite.
That’s the only way I found that looping really stops when I switch it off. But unfortunately the FSOUND_LOOP_OFF stops the playback. Afterwards the FSOUND_Stream_GetTImeMs() gets the maxiumum time. Is it supposed to be like that?

Prem.

  • You must to post comments
0
0

Yes, that was exactly what I also expected. And the problem is, that it does NOT play to the end, but stops immediately. As soon as the LOOP_OFF flag is set, the next FSOUND_Stream_GetTimeMs() returns the length of the piece. So I solved the problem now by taking the time before setting the flag and afterwards resetting the position to that time.

  • You must to post comments
0
0

Hi Brett.

That’s my code:

itemMode = FSOUND_Stream_GetMode(currStream);
if (radioPieceLoop.Checked)
{
itemMode |= FSOUND_LOOP_NORMAL;
itemMode &= ~FSOUND_LOOP_OFF;
}
else
{
itemMode &= ~FSOUND_LOOP_NORMAL;
itemMode |= FSOUND_LOOP_OFF;
}
FSOUND_Stream_SetMode(currStream, itemMode);

And it behaves on my Windows-XP Version 2002 with FMOD 3.71 as I said.
But it’s not really a problem anymore. I can reset the position after setting the loop off.

Prem.

  • You must to post comments
0
0

i have the same problem.

I want to play stream in loop mode, and when playing set to loop_off.
fmod plays the stream to the end, but FSOUND_Stream_GetTimeMs() return length of the stream, not the actual position.

  • You must to post comments
0
0

[quote="brett":2g1q01ea]
There is no way the stream would stop or change the time with a normal call to setloopmode because it does absolutely nothing but update the mode variable, and this is ONLY checked when the stream hits its end point. It doesnt affect the time, or playback of the stream at all.[/quote:2g1q01ea]

could you check this ? change the loop mode when sound are playing second or third (or more) times.

  • You must to post comments
0
0

I’ve only quickly read this post, but I think I’m also having the same problem.
I’m playing a stream, and as long as it is only playing for the first time there is no problem, but if looping is on, and it has played completely at least one time then turning the looping off will result in the gettimems function not giving the current time in the stream.
When I then turn looping back on, the time is back correct.

  • You must to post comments
0
0

anything new about this ?

  • You must to post comments
Showing 6 results
Your Answer

Please first to submit.