Author Topic: No sound = No game :'(  (Read 4658 times)

JeanJaybee

  • Guest
No sound = No game :'(
« 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.
Code: [Select]
~ $ glest --helpA no-sound launch.
Code: [Select]
~ $ glest --no-sound
What I get :
Code: [Select]
~ $ 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)
« Last Edit: 1 January 1970, 00:00:00 by JeanJaybee »

hailstone

  • GAE Team
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
(No subject)
« Reply #1 on: 13 August 2007, 23:06:11 »
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://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
« Last Edit: 1 January 1970, 00:00:00 by hailstone »
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

MatzeB

  • Guest
(No subject)
« Reply #2 on: 7 September 2007, 15:45:28 »
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 ), 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
« Last Edit: 1 January 1970, 00:00:00 by MatzeB »