Frictional Games Forum (read-only)

Full Version: Extremely choppy playback of streaming sound.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Sounds such as the music that are streaming have very choppy playback in my version of penumbra compiled with MinGW. Disabling streaming in the code is confirmed to fix the choppiness, so it is restricted to streaming. Is this an issue with my ogg/vorbis libraries that I compiled? I used libogg 1.3.0 and libvorbis 1.3.2. How would I go about finding the source of the issue?
You probably need to update the size of your streaming buffer in OAL wrapper. Some API changes since amnesia changed the unit the buffer size was specified in so penumbra is most likely setting it way too small.
I increased the buffer size from 4K to 16K and it appears to have fixed it. Thanks for the help Smile .
I usually do a 64K buffer in all the games I use OALWrapper in (which is actually quite a few that have appears on the Humble Bundle in recent months).
Ok, I'll probably change it to that then. I've developed a new problem as well. I didn't notice it at first, but colliding objects like throwing a rock aren't making any sound. Hitting objects with the hammer does make sound. Would this be a problem with 3D sounds perhaps?
Hmm.. Did you build OALWrapper with WITH_ALUT ? It could be some of the sounds are WAV files and those only load if you defined WITH_ALUT? (Or convert them to ogg)
I did have WITH_ALUT defined. Looking in hpl.log (which I should have done originally) it loads ogg's but not wav's, so it's probably a problem with how I compiled Alut. I'm going to try with the binaries they provide and see if it works then, which will tell me if it was just my version that I compiled.

EDIT: Hmm, it didn't seem to do anything different. Maybe there was an API change that broke the function that is being used to load wav's, I'll look into it.

I just realized that I did change the way it loads wav's since the old wav loading function was deprecated. I probably did it wrong or something. I'm adding the alut error string to the wrapper so I can see what goes wrong.
The whole alut wav loading has been deprecated for a long while, but people still use it to load wavs. The whole wave loading code just needs to be rewritten and not depend on ALUT anymore.
I figured out what was wrong. It turns out the API change required that ALUT is initialized and cleaned up with some functions, while the old API did not. Adding the init and exit functions to the device init and close functions fixed it right up. I could post the code that I changed to get the new versions of ALUT working properly if anyone is interested.
Please tell what file and what stuff to change to fix choppy sound. And yes I would very much like the fixed code for throwing rock sound. Big Grin
Pages: 1 2