Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
Extremely choppy playback of streaming sound.
Author Message
someone972 Offline
Member

Posts: 55
Joined: May 2012
Reputation: 1
Post: #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 all posts by this user Quote this message in a reply
Urkle Offline
FG - Associate

Posts: 1,155
Joined: Jul 2006
Reputation: 19
Post: #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
Mac Pro Dual 2Ghz, 14GB RAM, 10.6 (still), nVidia 8800 512MB.
Linux, 8-core AMD, 8GB RAM, Fedora 17, nVidia 450 1GB
05-02-2012 09:54 PM
Visit this user's website Find all posts by this user Quote this message in a reply
someone972 Offline
Member

Posts: 55
Joined: May 2012
Reputation: 1
Post: #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 all posts by this user Quote this message in a reply
Urkle Offline
FG - Associate

Posts: 1,155
Joined: Jul 2006
Reputation: 19
Post: #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
Mac Pro Dual 2Ghz, 14GB RAM, 10.6 (still), nVidia 8800 512MB.
Linux, 8-core AMD, 8GB RAM, Fedora 17, nVidia 450 1GB
05-03-2012 01:09 PM
Visit this user's website Find all posts by this user Quote this message in a reply
someone972 Offline
Member

Posts: 55
Joined: May 2012
Reputation: 1
Post: #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 all posts by this user Quote this message in a reply
Urkle Offline
FG - Associate

Posts: 1,155
Joined: Jul 2006
Reputation: 19
Post: #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
Mac Pro Dual 2Ghz, 14GB RAM, 10.6 (still), nVidia 8800 512MB.
Linux, 8-core AMD, 8GB RAM, Fedora 17, nVidia 450 1GB
05-04-2012 02:55 PM
Visit this user's website Find all posts by this user Quote this message in a reply
someone972 Offline
Member

Posts: 55
Joined: May 2012
Reputation: 1
Post: #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 all posts by this user Quote this message in a reply
Urkle Offline
FG - Associate

Posts: 1,155
Joined: Jul 2006
Reputation: 19
Post: #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
Mac Pro Dual 2Ghz, 14GB RAM, 10.6 (still), nVidia 8800 512MB.
Linux, 8-core AMD, 8GB RAM, Fedora 17, nVidia 450 1GB
05-05-2012 06:00 AM
Visit this user's website Find all posts by this user Quote this message in a reply
someone972 Offline
Member

Posts: 55
Joined: May 2012
Reputation: 1
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)