Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Extremely choppy playback of streaming sound.
someone972 Offline
Member

Posts: 57
Threads: 4
Joined: May 2012
Reputation: 1
#1
Extremely choppy playback of streaming sound.

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?
(This post was last modified: 05-10-2012, 07:43 AM by someone972.)
05-02-2012, 08:27 AM
Find Reply
Urkle Offline
FG - Associate

Posts: 1,172
Threads: 31
Joined: Jul 2006
Reputation: 21
#2
RE: Extremely choppy playback of streaming sound.

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.

Developing away on one of
Multiple Macs running 10.6, 10.7, 10.8, and 10.9.
Linux, 8-core AMD, 8GB RAM, Fedora 18, nVidia 450 1GB
05-02-2012, 09:54 PM
Website Find Reply
someone972 Offline
Member

Posts: 57
Threads: 4
Joined: May 2012
Reputation: 1
#3
RE: Extremely choppy playback of streaming sound.

I increased the buffer size from 4K to 16K and it appears to have fixed it. Thanks for the help Smile .
05-02-2012, 11:33 PM
Find Reply
Urkle Offline
FG - Associate

Posts: 1,172
Threads: 31
Joined: Jul 2006
Reputation: 21
#4
RE: Extremely choppy playback of streaming sound.

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

Developing away on one of
Multiple Macs running 10.6, 10.7, 10.8, and 10.9.
Linux, 8-core AMD, 8GB RAM, Fedora 18, nVidia 450 1GB
05-03-2012, 01:09 PM
Website Find Reply
someone972 Offline
Member

Posts: 57
Threads: 4
Joined: May 2012
Reputation: 1
#5
RE: Extremely choppy playback of streaming sound.

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?
05-04-2012, 07:21 AM
Find Reply
Urkle Offline
FG - Associate

Posts: 1,172
Threads: 31
Joined: Jul 2006
Reputation: 21
#6
RE: Extremely choppy playback of streaming sound.

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)

Developing away on one of
Multiple Macs running 10.6, 10.7, 10.8, and 10.9.
Linux, 8-core AMD, 8GB RAM, Fedora 18, nVidia 450 1GB
05-04-2012, 02:55 PM
Website Find Reply
someone972 Offline
Member

Posts: 57
Threads: 4
Joined: May 2012
Reputation: 1
#7
RE: Extremely choppy playback of streaming sound.

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.
(This post was last modified: 05-05-2012, 06:07 AM by someone972.)
05-05-2012, 04:32 AM
Find Reply
Urkle Offline
FG - Associate

Posts: 1,172
Threads: 31
Joined: Jul 2006
Reputation: 21
#8
RE: Extremely choppy playback of streaming sound.

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.

Developing away on one of
Multiple Macs running 10.6, 10.7, 10.8, and 10.9.
Linux, 8-core AMD, 8GB RAM, Fedora 18, nVidia 450 1GB
05-05-2012, 06:00 AM
Website Find Reply
someone972 Offline
Member

Posts: 57
Threads: 4
Joined: May 2012
Reputation: 1
#9
RE: Extremely choppy playback of streaming sound.

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.
(This post was last modified: 05-05-2012, 06:08 AM by someone972.)
05-05-2012, 06:07 AM
Find Reply




Users browsing this thread: 1 Guest(s)