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
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.
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.
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 :)
actually i lied i added it w/out that line that i mentioned below
You're right. "else goto __disperror" should not be there. I think the patch is fine otherwise.