0
0

Hello, I’m developing a free music player based on your libraries, but when I’m reading an OGG/MP3 file I always get the music stopped after a random time.

This problem doesn’t appears when it reproduces a MOD/XM/IT file (FMUSIC). The Loading/Opening instruction that I use is:
[code:1q8qya3b]
stream = FSOUND_Stream_Open(s, FSOUND_16BITS | FSOUND_LOOP_OFF |
FSOUND_SIGNED | FSOUND_STEREO | FSOUND_2D, 0, 0);
[/code:1q8qya3b]

I’ve noticed also that if I activate and then de-activate the looping mode, the song is also cutted.
The code for activating/de-activating the loop mode is:
[code:1q8qya3b]
void pomod_checkLoop()
{
if (mod)
FMUSIC_SetLooping(mod, Sys.loop);
if (stream)
{
if (Sys.loop==false)
FSOUND_SetLoopMode (0, FSOUND_LOOP_OFF);
else
FSOUND_SetLoopMode (0, FSOUND_LOOP_NORMAL);
}
}
[/code:1q8qya3b]

I’ve tested the fmodsimple APP (in saples dir), and it happens the same!! the sound is stopped (or looped, depending on the state) after a random time.

PD: In Emulator/Debug mode it doesn’t appear, it appear’s on
WCE4/ARMV4/Release versions only.
PD2: I’ve Acer n10 ppc with WM2k3.

Do you know why song is stopped after some random time?? thanks a lot.

  • You must to post comments
0
0

Thanks brett! Loop mode now works well, but the cuts in the streams are still present… I dont know the reason but I’ve some ideas:
Probably the buffer is not filled propertly??
I’ve set the buffer size to 100ms, and the initialisation is like this:
[code:c19g109y]FSOUND_Init(44100, 48, FSOUND_INIT_GLOBALFOCUS)[/code:c19g109y]
(i want good quality :D)
Do you think that GLOBALFOCUS flag is a correct option for a pocketPC device? (so, the user can reproduce some music while doing some otrer things)

When i load a stream, i do this:
[code:c19g109y]stream = FSOUND_Stream_Open(s, FSOUND_16BITS | FSOUND_SIGNED | FSOUND_STEREO | FSOUND_2D, 0, 0);[/code:c19g109y]

And when I play It:
[code:c19g109y]FSOUND_Stream_Play(0, stream);[/code:c19g109y]
Here I thing that the problem it is… note that I’m “forçing” to load the stream in the channel 0, because if not, it is impossible to know in which channel the stream is loaded (except be doing a scan of each 48 channels).
I’ve tried to change the play function to: FSOUND_Stream_Play(FSOUND_FREE, stream); but the problem is still the same…. grrrr!!

Any Ideas?!?!

PD: I dont have any problem to send you the executable 😀 (or the source XDD)

thanks a lot.

  • You must to post comments
0
0

Thanks a lot brett, I was doing bad the Stream_Play call, now seems to work better, but cuts are also present on my PPC, I’ll make some tests on some other PPC’s in order to see if it is a problem of my machine.

thanks!

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.