Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Mars on December 15, 2006, 08:26:38 pm

Title: Popping and crackling in a Linux system
Post by: Mars on December 15, 2006, 08:26:38 pm
In virtually all builds... I can't figure out what's causing it. It only appears in Freespace. I'm running Kubuntu Edgy with all the latest drivers... I'm using the sound on board my Abit K8N board. Any help will be much appreciated... I'm sure more information is needed... so tell me what to tell y'all.
Title: Re: Popping and crackling in a Linux system
Post by: achtung on December 15, 2006, 11:27:35 pm
I'm getting it in Windows too.   :nervous:
Title: Re: Popping and crackling in a Linux system
Post by: Herra Tohtori on December 15, 2006, 11:59:21 pm
Onboard sound. They do allkinds of strange things. For example, when I use my onboard audio, I can hear from the speakers if the processor is active or idle. There's this slight vibration coming out of the speakers, and it alternates depending on the processor activity... :shaking: :nervous:

I bought an external SB Live! 24bit card. Works fine on Windows - only problem is that it *doesn't* like it if I have to hard-boot the computer (turn off power), but that's pretty much acceptable. Unfortunately, I can only get stereo sound out of it in K/Ubuntu. Guess I can be happy. Some people never get any sound out of it. And I've never been able to get anything but four channels to play on my onboard card in linux either, so... :rolleyes:


There was something about crackling I remember... Oh yeah, check that PCM volume is not on red in alsamixer. That reduced crackling on my computer.

Another thing I suffered from is that Freespace sound always came estimated 50-100 ms after it should. I press the trigger, sound comes when the bolt is already somewhere far. I fixed this by altering the command script running FS2 to include

$ aoss fs2_open_r <cmdline>

but don't ask me why it does it, I was just experimenting. I got the idea because $ aoss firefox would run Flash movies with on-sync audio, whereas $ firefox had a lagging sound. Well, as long as it works, I'm happy. ;)
Title: Re: Popping and crackling in a Linux system
Post by: Shade on December 16, 2006, 08:14:53 am
On windows that's usually a symptom of outdated AC'97 drivers, so even though it's linux I would at least check to see if they're current. All realtek AC'97 drivers, both linux and windows, are found on the same page (http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=14&PFid=23&Level=4&Conn=3&DownTypeID=3&GetDown=false).
Title: Re: Popping and crackling in a Linux system
Post by: Mars on December 16, 2006, 09:18:45 am
PCM volume is nominal... checking AC'97 Drivers now.

They made things slightly worse but I now have an error to show for it

Code: [Select]
ALSA lib confmisc.c:560:(snd_determine_driver) could not open control for card 0
ALSA lib conf.c:3479:(_snd_config_evaluate) function snd_func_card_driver returned error: No such device
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:3479:(_snd_config_evaluate) function snd_func_concat returned error: No such device
ALSA lib confmisc.c:955:(snd_func_refer) error evaluating name
ALSA lib conf.c:3479:(_snd_config_evaluate) function snd_func_refer returned error: No such device
ALSA lib conf.c:3948:(snd_config_expand) Evaluate error: No such device
ALSA lib pcm.c:2090:(snd_pcm_open_noupdate) Unknown PCM default
Title: Re: Popping and crackling in a Linux system
Post by: castor on December 17, 2006, 11:11:59 am
$ aoss fs2_open_r <cmdline>
but don't ask me why it does it, I was just experimenting. I got the idea because $ aoss firefox would run Flash movies with on-sync audio, whereas $ firefox had a lagging sound.
Sounds like you got both the ALSA driver and the OSS driver or ALSA OSS emulation available; OpenAL prefers the OSS driver (in your distro, package?) but only the native ALSA driver would work properly.

Dunno, but I used to have 'various problems' with OpenAL sound, until they were all traced down (thanks to taylor) to this OSS/ALSA mess.
Luckily, all my problems were fixed by creating an .openalrc with following content (instructs openal to use the native ALSA driver instead of OSS).
Code: [Select]
(define devices '(alsa native))
Title: Re: Popping and crackling in a Linux system
Post by: Herra Tohtori on December 17, 2006, 11:46:37 am
Well, none of them actually work properly anyway. I should get 5.1 sound out of my onboard sound card - the channels are visible on alsamixer and they work when I test the speakers from console playing noise through every channel, but as soon as some program starts to try and play 5.1 channel sound, it either simply doesn't work or at best, it doesn't play the center/sub channels at all.

That's why I have to use Windows if I want to watch movies or listen to music or play games. GIMP works much better on Linux, unsurprizingly, so I prefer to do image editing and other stuff there instead of Windows.


It's also rather fast to switch between OS's by hibernating the Windows, and when the computer starts again you just select Linux from GRUB. The Windows status remains there as long as you want. If you want to use Linux for a week, you use it and when you want to get back to Windows, after selecting it in GRUB itäll load the Windows from its hibernation... ;)