Frictional Games Forum (read-only)
Extremely choppy playback of streaming sound. - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Open Source Collaboration (https://www.frictionalgames.com/forum/forum-27.html)
+--- Forum: Overture (https://www.frictionalgames.com/forum/forum-29.html)
+--- Thread: Extremely choppy playback of streaming sound. (/thread-15216.html)

Pages: 1 2


Extremely choppy playback of streaming sound. - someone972 - 05-02-2012

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?


RE: Extremely choppy playback of streaming sound. - Urkle - 05-02-2012

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.


RE: Extremely choppy playback of streaming sound. - someone972 - 05-02-2012

I increased the buffer size from 4K to 16K and it appears to have fixed it. Thanks for the help Smile .



RE: Extremely choppy playback of streaming sound. - Urkle - 05-03-2012

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).



RE: Extremely choppy playback of streaming sound. - someone972 - 05-04-2012

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?


RE: Extremely choppy playback of streaming sound. - Urkle - 05-04-2012

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)


RE: Extremely choppy playback of streaming sound. - someone972 - 05-05-2012

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.


RE: Extremely choppy playback of streaming sound. - Urkle - 05-05-2012

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.


RE: Extremely choppy playback of streaming sound. - someone972 - 05-05-2012

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.


RE: Extremely choppy playback of streaming sound. - Erik The Born - 12-06-2018

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