freeserf icon indicating copy to clipboard operation
freeserf copied to clipboard

Could not open audio device: No available audio device ... under linux

Open HoraK-FDF opened this issue 12 years ago • 4 comments

I just compiled freeserf on linux to test if it can load my savegame that i made with freeserf 0.1 w32 and where freeserf 1.0 w32 crashes when i try to load it again, after i get rid of the case sensitve problem with the datafiles the linux version brings me this error:

[main] SDL init... [audio] Could not open audio device: No available audio device. Floating point exception

SDL and SDL_mixer are installed the soundcard also plays the testsounds fine and can be used with alsamixer. The soundcard is the onboard one that is build in my netbook its called System ControllerHub (SCH Poulsbo) HD Audio Controller. Is there any way to find out why this happens?

HoraK-FDF avatar Jul 05 '13 00:07 HoraK-FDF

It would seem that this function call in audio.c fails for some reason.

Mix_OpenAudio(8000, MIX_DEFAULT_FORMAT, MIX_DEFAULT_CHANNELS, 512);

You could try some other parameters and see if you are able to initialize SDL_mixer with those. The documentation is here: http://sdl.beuc.net/sdl.wiki/Mix_OpenAudio . It could be that the chunksize or frequency cannot work on your system for some reason, although as I understand it SDL_mixer should detect this and translate automatically between the formats..

jonls avatar Jul 05 '13 08:07 jonls

I've searched a bit around and it seems to be an SDL problem. i made an small bash file with this in it: SDL_AUDIODRIVER="alsa" export SDL_AUDIODRIVER freeserf

now it starts but there is still no sound

edit: after loading my savegame i noticed that there is sound but only the sound effects like hammerblows and so on the music is missing entirely, pressing m changes nothing.

HoraK-FDF avatar Jul 05 '13 10:07 HoraK-FDF

In that case you probably need to install a midi sound bank. Is there an SDL bug report for the other issue?

jonls avatar Jul 05 '13 11:07 jonls

I have not found an bug report for that issue. i downloaded timidity gus patches (http://www.libsdl.org/projects/SDL_mixer/timidity/timidity.tar.gz) and extracted it to /usr/local/lib/ than the music worked. now i will try to get a new version of sdl_mixer with fluidsynth support to get sf2 soundfonts working instead of the gus patches.

HoraK-FDF avatar Jul 05 '13 13:07 HoraK-FDF