Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 24023 - fceultra does not handle soundcards that can't do mono (all versions)
Summary: fceultra does not handle soundcards that can't do mono (all versions)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All All
: High critical (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-06 20:28 UTC by Jeff Balk
Modified: 2003-07-18 17:50 UTC (History)
0 users

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


Attachments
A patch against fceultra version 0.96, drivers/common/unixdsp.c to fix sound for some soundcards (unixdsp.patch,2.15 KB, patch)
2003-07-06 20:30 UTC, Jeff Balk
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Balk 2003-07-06 20:28:23 UTC
Some soundcards only support stereo, breaking fceu under linux when sound is 
enabled (because fceu only does mono).  Without a fix, the emulator actually 
freezes when sound is turned on. I attached a patch to 
drivers/common/unixdsp.c (version 0.96) to fix this.

It detects if the sound card stays in stereo even after explicitly set to 
mono. If this happens, the audio buffer is duplicated ("fake stereo") to 
account for the other stereo channel.


Reproducible: Always
Steps to Reproduce:
1. Get a soundcard that can't do mono, i.e. i810 (Abit NF7-M onboard sound)
2. Run fceultra with sound enabled

Actual Results:  
The program freezes

Expected Results:  
It should work
Comment 1 Jeff Balk 2003-07-06 20:30:45 UTC
Created attachment 14210 [details, diff]
A patch against fceultra version 0.96, drivers/common/unixdsp.c to fix sound for some soundcards

Note that this patch should go in portage because it appears the author is not
accepting patches right now.
Comment 2 Phil Bordelon (sunflare) 2003-07-07 10:02:46 UTC
fceultra 0.96 has a lot of problems, which is why I had masked it when I put it in the tree.  It doesn't handle joysticks correctly, for instance.  I don't know why it was unmasked, and I personally haven't upgraded my version due to the problems with the newest one.  Putting this back to the bug-wranglers; whoever wants to maintain a broken version is welcome to.
Comment 3 SpanKY gentoo-dev 2003-07-18 16:47:14 UTC
i looked through the patch and i saw that you put in this: 
 
if (x == 2) { 
 <fake stereo> 
} 
else goto __disperror; 
 
i'm pretty sure you dont want that else in there :) 
it'll cause cards that *do* support mono to always error ... the previous call to 
ioctrl returned a '1' ... had it errored fceultra already would have jumped to the 
disp error label ... 
 
ill hold off adding this patch until you comment on this :) 
Comment 4 SpanKY gentoo-dev 2003-07-18 17:15:27 UTC
actually i lied i added it w/out that line that i mentioned below 
Comment 5 Jeff Balk 2003-07-18 17:50:55 UTC
You're right. "else goto __disperror" should not be there. I think the patch is fine otherwise.