MegaGlest Forum
Archives (read only) => Vanilla Glest => Linux and other ports => Topic started by: JeanJaybee on 13 August 2007, 12:22:08
-
Hi,
Some sound usb-chipset are not detect by alsa.
However, is it possible to launch the game without the sound ?
If it is possible to add this, maybee can it be a good idea to add a little script, to aload users to launch the game in console mode.
An help.
~ $ glest --helpA no-sound launch.
~ $ glest --no-sound
What I get :
~ $ glest
esd open sound failed.
open /dev/[sound/]dsp: Device or resource busy
open /dev/[sound/]dsp: Device or resource busy
OpenAL Vendor: Exception: Couldn't open audio device.
(sorry for my poetic english)
-
The problem is because there can't be two sound devices open at once. Might depend on if you are using OSS or ALSA. I had this problem playing Counter-Strike on Wine.
Some external info:
http://jackaudio.org/faq (http://jackaudio.org/faq)
http://www.linux.com/articles/113775 (http://www.linux.com/articles/113775)
####Programming Stuff - For no sound option####
These are the files where sound is required:
game.cpp
core_data.cpp
intro.cpp
program.cpp
main_menu.cpp
faction.cpp
command_type.cpp
faction_type.cpp
skill_type.cpp
unit_type.cpp
tileset.cpp
time_flow.cpp
unit_updater.cpp
A check would need to be added, for each place where sound is loaded, to see if sound is wanted.
Another option might be to create an empty FactorySound to load
Shared::Sound::OpenAL::SoundSource
Shared::Sound::OpenAL::StaticSoundSource
Shared::Sound::OpenAL::StreamSoundSource
Shared::Sound::SoundPlayer
Shared::Sound::Ds8::SoundPlayerDs8
Shared::Sound::OpenAL::SoundPlayerOpenAL
Shared::Sound::SoundFactory
Shared::Sound::Ds8::SoundFactoryDs8
Shared::Sound::OpenAL::SoundFactoryOpenAL
Shared::Sound::Sound
Shared::Sound::StaticSound
Shared::Sound::StrSound
Shared::Sound::Ds8::SoundBuffer
Shared::Sound::Ds8::StaticSoundBuffer
Shared::Sound::Ds8::StrSoundBuffer
-
Unfortunately nearly all soundcard drivers in linux only allow 1 application to use the sound card at a time. However there is a workaround for this: You should force openal to use the alsa driver (see for example: http://supertux.lethargik.org/wiki/OpenAL_Configuration (http://supertux.lethargik.org/wiki/OpenAL_Configuration) ), alsa comes with a software mixing plugin called dmix which allows to have multiple applications use the soundcard most modern distributions already have this configured by default, if yours doesn't you can take a look here for example: http://gentoo-wiki.com/HOWTO_ALSA_sound_mixer_aka_dmix (http://gentoo-wiki.com/HOWTO_ALSA_sound_mixer_aka_dmix)