0
0

First, thanks for the help on the last problem. Now, in our game project I play the opening ‘options’ screen music at the beginning, however sometimes(not always) when playing a game, if the user quits back out to the opening options menu…..when i start that same ‘options’ screen music playing again, it errors….it sounds like a skipping record or cd….no clue what the prob is….Please Help! Project due Friday! Thanks

the code looks something like this(just the esential parts) :


INITIALIZATION:
FSOUND_STREAM * pSound[1];

define OPTIONS_SCREEN 0

pSound[OPTIONS_SCREEN] = FSOUND_Stream_OpenFile(“Sound\reggae.mp3”, FSOUND_NORMAL|FSOUND_2D SOUND_MPEGACCURATE|FSOUND_LOOP_NORMAL, 0);

PLAYING:
int channel = FSOUND_Stream_Play(FSOUND_FREE,
pSound[OPTIONS_SCREEN]);

AFTER DONE PLAYING:
FSOUND_StopSound(channel);
FSOUND_Stream_SetPosition(pSound[OPTIONS_SCREEN], 0);

THEN PLAY AGAIN LATER:
int channel = FSOUND_Stream_Play(FSOUND_FREE,
pSound[OPTIONS_SCREEN]);


and here it often(not always) will start skipping…i left out some code,
but onlt that which im pretty sure is irrelevant..let me know if you have
any questions about it….again, I appreciate all your help.

  • You must to post comments
0
0

I’ve had this problem–try increasing the streaming buffer size. With smaller buffers, large spikes in CPU usage (i.e. 100%) can cause the audio to enter a perpetual skipping cycle (FMOD apparently doesn’t prebuffer again after an underrun–yes, Brett, I’m talking to you).

[code:2320sdpp]
FSOUND_SetBufferSize(500);
FSOUND_Init(44100,32,0);
[/code:2320sdpp]

  • You must to post comments
0
0

For one, don’t be so hard on me. I’ve used the words “apparantly” and “assume” in both posts mentioning this, showing that I [b:11elaem3]don’t[/b:11elaem3] know for sure–that plus the fact that both posts were directed at you–I merely [i:11elaem3]suggested[/i:11elaem3] buffersize 500, not said that was the definite end-all solution.

Also…

[quote="brett":11elaem3]For a start you cant ‘detect’ underrun programatically, this is only possible ‘with your ears’, and fmod simply fills a directsound or waveout buffer to the hardware’s ‘playcursor’.[/quote:11elaem3]

If that’s true, then how does the Winamp 2.81 dsound driver do it? There’s an option for “prebuffer on start/seek/underrun” right in the output plugin’s configuration… so it can’t be impossible.

  • You must to post comments
0
0

Thanks for the advice Brett. Turns out simply adding the FSOUND_HW2D flag to the FSOUND_Stream_Open() function fixed it just fine. No re-setting of any buffer sizes was needed. Graduate Bruce, you should listen to this guy. He knows his shit. LOL

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.