Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 67718 - glob2-0.8.9 dies on startup due to badly written sound mixer function
Summary: glob2-0.8.9 dies on startup due to badly written sound mixer function
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-15 14:16 UTC by Alexandre Rostovtsev (RETIRED)
Modified: 2004-10-15 21:13 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
glob2-0.8.9.soundmixer.patch (glob2-0.8.9.soundmixer.patch,461 bytes, patch)
2004-10-15 14:18 UTC, Alexandre Rostovtsev (RETIRED)
Details | Diff
glob2-0.8.9.ebuild to use the patch above (glob2-0.8.9.ebuild,1.18 KB, text/plain)
2004-10-15 14:19 UTC, Alexandre Rostovtsev (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Rostovtsev (RETIRED) gentoo-dev 2004-10-15 14:16:04 UTC
Glob2-0.8.9 (and earlier versions, if the forum is to be believed) dies on startup unless esd is active (maybe it also works with arts, I am not sure). The problem is that in SoundMixer.cpp, the mixer thinks that since it asked for an SDL_AudioSpec to supply the mixer callback with 128k of data at a time, then SDL_AudioSpec will faithfully obey. As a matter of fact, SDL_AudioSpec does behave as expected when the mixer is around, but when playing to a raw alsa device, it only gives the callback function 2k of data at a time. This triggers a spurious assert() - the mixer callback has no features whatsoever that depend on an exact numerical value of the length of the data stream, but the authors of glob2 had deciced to practice some paranoid defensive programming...

Reproducible: Always
Steps to Reproduce:
1. make sure sound dameons aren't active
2. emerge glob2
3. $ glob2

Actual Results:  
Toolkit : Initialized : Graphic Context created
Toolkit : Screen set to 640x480 at 0 bpp in window
glob2: SoundMixer.cpp:70: void mixaudio(void*, Uint8*, int): Assertion `nsamples
== 8192*8' failed.
Aborted


Expected Results:  
glob2 successfully runs
Comment 1 Alexandre Rostovtsev (RETIRED) gentoo-dev 2004-10-15 14:18:46 UTC
Created attachment 41915 [details, diff]
glob2-0.8.9.soundmixer.patch

Patch to change the assertion to something more sensible.

Also, typo above: change "SDL_AudioSpec does behave as expected when the mixer
is around" to "SDL_AudioSpec does behave as expected when the sound daemon is
around"
Comment 2 Alexandre Rostovtsev (RETIRED) gentoo-dev 2004-10-15 14:19:56 UTC
Created attachment 41916 [details]
glob2-0.8.9.ebuild to use the patch above
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2004-10-15 20:22:07 UTC
Let's have the output of emerge --info please.
Comment 4 Mr. Bones. (RETIRED) gentoo-dev 2004-10-15 21:13:16 UTC
Turned down the assert checking.  Upstream will pick this up for the next release.  Thanks for the bug report.

Resync and remerge for the fix.  Since it works for me as is and for most people, I imagine, there's no rev bump.