Opened 9 years ago

Last modified 3 years ago

#3285 new defect

Sound error when no sound device or disabled — at Version 3

Reported by: Vladislav Belov Owned by:
Priority: Must Have Milestone: Backlog
Component: Music & Sound FX Keywords:
Cc: Patch:

Description (last modified by Imarok)

If the sound device is disabled then we have next error on start:

ERROR: Sound: AlcInit failed, m_Device=0x0 m_Context=0x0 dev_name=OpenAL Soft err=a004

And in game:

OpenAL error: (null); called from COggData::InitOggFile (line 74)
ERROR: Failed to create initial buffer. OpenAL error: (null)
ERROR: could not initialize ogg data at audio/voice/latin/civ/civ_male_what_is_it_1.ogg
ERROR: OpenAL error: (null); called from COggData::~COggData (line 36)
ERROR: OpenAL error: (null); called from COggData::~COggData (line 40)
ERROR: OpenAL error: (null); called from COggData::~COggData (line 44)
ERROR: OpenAL error: (null); called from CSoundData::~CSoundData (line 37)
ERROR: OpenAL error: (null); called from CSoundData::~CSoundData (line 41)
ERROR: error loading sound: pathname=audio/voice/latin/civ/civ_male_what_is_it_1.ogg, error=Function failed (no details available)

Second problem, that if we will miss the sound device in game (pull out minijack of headphones) then sound dissapear, and doesn't appear after return headphones on the place.

My suggestions:

  • check (nullptr and alc* functions) Device & Context every time when something want to play sound
  • show to player nice message that the sound device is missing and sounds will not play.

Change History (3)

comment:1 by historic_bruno, 9 years ago

I think the old sound manager would attempt to init every time its API was used, if it had previously failed, so that is possibly worth doing.

The other thing is there shouldn't be multiple errors if init fails, as you say, one message would suffice. I guess there are some missing checks in parts of the API.

comment:2 by Itms, 9 years ago

Component: Core engineMusic & Sound FX
Keywords: sound removed
Milestone: Alpha 19Backlog

comment:3 by Imarok, 6 years ago

Description: modified (diff)

When disabling sounds by starting 0ad with "--nosound" these errors I also get errors at startup, but none ingame:

ERROR: Sound: AlcInit failed, m_Device=0x0 m_Context=0x0 dev_name=OpenAL Soft err=a004

ERROR: OpenAL error: (null); called from CSoundManager::~CSoundManager (line 277) 

Edit: Seems like the whole thing is only broken on windows.

Last edited 6 years ago by Imarok (previous) (diff)
Note: See TracTickets for help on using tickets.