0
0

FSOUND_SetOutput(FSOUND_OUTPUT_ALSA) causes CPU usage to run wild (70-90%)
fluctuating on an Athlon XP 2600+. With 2 sound cards and ALSA compiled with OSS
emulation mode, I also notice some weirdness when it comes to enumerating devices. If
I output to FSOUND_OUTPUT_OSS, CPU usage is normal (~1%) but it lists 5 drivers,
in order listed as “/dev/dsp0”, “/dev/dsp1”, “/dev/dsp2”, “/dev/dsp3”, and “/dev/dsp” I haven’t
found a combination yet that causes 2 FMOD instances to output to different soundcards,
they both overlay output on the same card. However, if I output to FSOUND_OUTPUT_ALSA,
I get back the correct 2 devices, with the correct sound card device names, and I can output
to both cards independently (but, as I mentioned, with the runaway CPU usage.)

This is under Red Hat 9 with ALSA 0.9.6-1 compiled from scratch (not RPM’s). The sound
devices are an onboard NVIDIA NFORCE2 chip and a Soundblaster 16 PCI card (which
is recognized correctly as an ENS1371.)

I first noticed this problem a couple of hours ago under FMOD 3.63, so I just downloaded
3.70 and confirmed the bug is still present. I’m not sure if this has something to do with
ALSA being compiled with –with-OSS=yes, but I’m going to be doing a fresh install with
no OSS emulation later today to see what happens.

Baudtender

  • You must to post comments
0
0

hm…strange….I’m running 2 emu10k (sb live) cards with alsa+OSS emulation and it works like a charm (Intel machine -> PIII 1200Mhz -> CPU 2-3 %).
My kernel is 2.4.21-pre4 with alsa 0.95, libfmod 3.63, 3.70 works ok.

  • You must to post comments
0
0

No – I was getting the CPU usage from FSOUND_GetCPUUsage().
I also have a Gnome panel monitor that showed CPU usage pegged
high. Turns out it has something to do with creating a DSP device
(an equalizer) but I didn’t go deeper at that point to figure out why
that would be sucking cycles when no sound was playing. I’m spoiled
on the vc++ 6 debugger – linux debuggers are a pain in the butt.

After reading the above replies, I decided to punt and try a fresh
install with Mandrake 9.1 instead of RedHat 9 – Mandrake uses ALSA
by default, and recognized both my sound cards properly. In my
program, if I opened the driver FSOUND_OUTPUT_ALSA, the
FSOUND_GetNumDrivers would return 1 and FSOUND_GetDriverName(0)
would return “No Sound Driver” and no sound would be heard (although
XMMS would load and play out of my first sound device (NVIDIA
NFORCE) just fine.) I twiddled /etc/modules/conf a bit to put in some
OSS compatibility lines (as shown on the ALSA home website) and
then when I opened with FSOUND_OUTPUT_OSS I got back 2 devices:
dsp1 and dsp2. Both played just fine. The last step was to get MIDI
output working as well, and there I failed completely with Mandrake –
nothing I could do would bring up a valid /dev/sequencer device (I
know FMOD 3.70 doesn’t support MIDI output on Linux – I am planning
to fork out to pmidi for that.)

O.K., so at least part of this appears to be a local hardware problem –
I’ll keeping hacking away at this.

I say again: arrrrrrghh.

Baudtender

  • You must to post comments
0
0

Well, I finally found a combination that works. I’m back to Red Hat 9 with ALSA compiled
from scratch – my sequencer woes were due to both cards having their MPU-401’s
competing for the same I/O address. I can get both cards playing MP3’s independently
by using “dsp0” and “dsp1” when opening FSOUND_OUTPUT_OSS, so at least I know
I can finish what I set out to do.

Now, to tackle that nagging “eating up the CPU cycles” problem, just on principal….

Baudtender

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.