0
0

Hi,

I’m using Ubuntu and have setup it to use ALSA as I needed software mixing which is working fine (I have an integrated ac97 audio card).

The problem is that I can’t seem to be able to force FMODex to use ALSA as everything works fine when no application is using the sound card, but when there’s any audio application running (XMMS, totem…) I get an ‘error initializing output device’. So I suspect it always uses OSS.

I’m using FMOD_System_SetOutput to force ALSA.

Declare Function FMOD_System_SetOutput Lib kFMODExLib (system As Integer, output As Integer) As Integer
err = FMOD_System_SetOutput(sysHndl, 10) // OSS=9, ALSA=10, ESD=11

Is anybody successfully using ALSA with software mixing?

By the way I’m using FMODex 4.01.07 (tried also .05,.04) with REALBasic’s FMODex wrapper (http://developer.chaoticbox.com) which really works great a part from this big problem.

Thanks in advance for help,
Tomas

  • You must to post comments
0
0

Hi,

This issue has been fixed (will be in the next release). The problem was that FMOD wasn’t outputing to the ALSA software mixer (well, depending on the ALSA setup it might have been. FMOD was outputting to ‘pcmhw’ which is usually straight to the soundcard).

The ALSA output mode now enumerates all the outputs in alsa.conf and outputs to ‘default’ by default which on most setups is software mixed.

  • You must to post comments
0
0

I’m having the same issue under Gentoo Linux with a turtle beach soundcard on an AMD64 (in 64 bit mode). Seems to fire up fine if another application isn’t using the soundcard.

If you find a solution, please post it…..and I’ll do the same.

  • You must to post comments
0
0

Good to hear! Thanks! 8)

  • You must to post comments
0
0

I really tried everything. Hope some expert gives us some hints.

Tomas

  • You must to post comments
0
0

I got 4.02 and tried choosing ALSA with FMOD_System_SetOutput:
err = FMOD_System_SetOutput(sysHndl, 10) // OSS=9, ALSA=10, ESD=11
Now I get the error (error initializing output device) after FMOD_System_Init even if no other app is using the sound card.

Setting OSS and closing all other audio apps makes my app work as expected.

Tomas

  • You must to post comments
0
0

This looks like it may possibly be a problem with your ALSA drivers.
We don’t have this problem with our linux box (fedora core 4).

Have you tried to start your FMOD application first, then try and open up another application (totem etc). You’ll probably find that application complains that the device is already in use. This is what happens on our 64bit linux box.

  • You must to post comments
0
0

I just got a copy of Ubuntu Live and found out that FMOD wasn’t initializing on it because it was trying to open libasound.so which ubuntu doesn’t seem to provide a symlink to. I have fixed this up now and everything seems to work properly in Ubuntu.

You did mention before though that you were able to initialize FMOD with ALSA so this might not be the problem you were having.

Would you be able to try out this lib:

[url:zxf9n4jn]http://www.fmod.org/files/libfmodex.tar.gz[/url:zxf9n4jn]

to see if it works. It has the above fix as well as some debug printfs. Can you please post the debug output after you’ve given it a try (if it hasn’t solved the problem).

Thanks

  • You must to post comments
0
0

I tried that last night….I opened up my application and then started Xine which went into auto-mute mode. So, it appears my application is trying to take over the entire sound card……and succeeds. 😆

I’m currently using the Alsa driver embedded into the kernel (2.6.11) on my 64-bit box. What version of alsa are you using on your Fedora Core 4 box?

  • You must to post comments
0
0

I just tried. ALSA works correctly only if the app using fmod is started after other apps using audio card. Otherwise it seems that FMOD lib still locks the entire sound card.

This is the debug output, in both cases (FMOD started before or after other app accessing ALSA):
** Initialising ALSA output
** registering lib
** Can’t open libasound.so, trying libasound.so.2
** Done
** done
** Channels: 2, rate: 44100
** Opening ALSA device: default
** ALSA device opened successfully
** ALSA starting

Hope this helps,
Tomas

  • You must to post comments
0
0

Exaclty same here. If I start my FMOD app first it works but won’t let other apps use audio (xmms, totem…).

Tomas

  • You must to post comments
0
0

I’ve tried quite a few distro’s now and ALSA seems to be working fine.

Perhaps you could try enumerating all the ALSA drivers and setting the ALSA driver to “dmix”, or some other ones to see what happens. By default FMOD opens “default”.

Also, are you using a custom .asoundrc file? Try setting the ALSA driver to “!default” if you have defined it (or whatever else you have defined). The next release of FMOD will try to open the user overriden default, “!default” before the system default, “default”.

What happens when you try to open two fmod apps at the same time?

  • You must to post comments
0
0

So if you start another app first, then start your FMOD app, your app can’t use audio and If you start your FMOD app first then another app, that app can’t use audio?

This just sounds like a problem with your ALSA configuration.

Have you tried opening two other ALSA apps at the same time and getting both to play at the same time?

  • You must to post comments
0
0

I played a bit more with the new version of fmod.

One problem I had is that running as non-root it wasn’t able to resolve the lib. I solved it chowning libfmodex.so.4.02.

Another problem is replicable as following:

launch 1 or more fmod apps as root (they’ll work fine).
Then as non-root launch xmms (alsa plugin enabled) you’ll get a

*** WARNING **: alsa_setup(): Failed to open pcm device (default): Permission denied

The problem does not appear if you first run xmms as non-root and then fmod app as root.

Tomas

  • You must to post comments
0
0

XMMS with ALSA plugin, totem and GAIM work flawlessy at the same time.

Tomas

  • You must to post comments
0
0

Could try enumerating all the ALSA drivers and setting the ALSA driver to “dmix”, or some other ones to see what happens?

If you run xmms as non-root, then the fmod app as non-root does it work fine?

How about running xmms first as root, then the fmod app as non root?

Perhaps it is just applications running as root on your distro take over the whole pcm device.

  • You must to post comments
0
0

I can run Xine and XMMS at the same time as well. I’ll have to try to build the application on my 32-bit linux box and see if I have the same issue.

  • You must to post comments
0
0

yep running as root takes over the whole pcm device.

So everything is fine.

Thanks for fixing this,
Tomas

  • You must to post comments
0
0

I got a 32bit machine, so I don’t think that’s the problem.

Tomas

  • You must to post comments
0
0

Hi chenpo,

in my opinion this problem resists since the very first fmodex version. Unfortunately, I was never able to run fmodex with ALSA correctly. Therefore I use OSS and the ALSA abstraction layer :( If you just install SuSE 9.3 and try to run some samples you will realize that most of them will not work. Everything else on my system with ALSA works properly.

Thank you
Matthias

  • You must to post comments
Showing 19 results
Your Answer

Please first to submit.