Jump to content

New Sound Manager svn patch


Recommended Posts

Thanks, I tried the new patch.

  • It's still missing a return statement in OggStreamImpl::ResetFile which is a build error in MSVC
  • I saw two errors on startup:

    ERROR: OpenAL error: (null); called from CSoundManager::AlcInit (line 122)
    ERROR: Sound: AlcInit success, using OpenAL Soft
    The second error should be left as a debug_printf or similar since it's not an error and need not be displayed. The first error seems a result of calling AL_CHECK before OpenAL is initialized (not a real error).
  • Then I tried compiling --without-audio. lib/external_libraries/openal.h is included outside CONFIG2_AUDIO in several places: OggData.h, SoundData.h, CSoundBase.h, and ISoundItem.h, which cause build errors since the OpenAL library has been excluded from the build. Probably it can be cleaned up a bit by moving all includes except config2.h inside the CONFIG2_AUDIO check.
  • After fixing those errors, audio was indeed disabled and I had no runtime errors (y)
  • Minor issue: warning about unused variable doEnable in CSoundManager::SetEnabled - this might be fixed by handled the !CONFIG2_AUDIO case and inserting something like UNUSED2(doEnabled); to make the warning go away.

Link to comment
Share on other sites

A recent commit has broken my build:

In file included from ../../../source/soundmanager/data/OggData.cpp:20:0:
../../../source/soundmanager/data/OggData.h:27:17: fatal error: ogg.h: No such file or directory
compilation terminated.
make[1]: *** [obj/engine_Release/OggData.o] Error 1
make: *** [engine] Error 2

Link to comment
Share on other sites

A recent commit has broken my build:

In file included from ../../../source/soundmanager/data/OggData.cpp:20:0:
../../../source/soundmanager/data/OggData.h:27:17: fatal error: ogg.h: No such file or directory
compilation terminated.
make[1]: *** [obj/engine_Release/OggData.o] Error 1
make: *** [engine] Error 2

They were left out by mistake, it should be fixed now :wallbash:

Link to comment
Share on other sites

The build is fixed, but I got this after exiting a game (session):

ERROR: OpenAL error: Invalid Value; called from ~CSoundItem (line 48)

ERROR: OpenAL error: Invalid Value; called from ~CSoundItem (line 48)

ERROR: OpenAL error: Invalid Value; called from ~CSoundItem (line 48)

ERROR: OpenAL error: Invalid Value; called from ~CSoundItem (line 48)

ERROR: OpenAL error: Invalid Value; called from ~CSoundItem (line 48)

ERROR: OpenAL error: Invalid Value; called from ~CSoundItem (line 48)

ERROR: OpenAL error: Invalid Value; called from ~CSoundItem (line 48)

ERROR: OpenAL error: Invalid Value; called from ~CSoundItem (line 48)

ERROR: OpenAL error: Invalid Value; called from ~CSoundItem (line 48)

ERROR: OpenAL error: Invalid Value; called from ~CSoundItem (line 48)

Link to comment
Share on other sites

The build is fixed, but I got this after exiting a game (session):

ERROR: OpenAL error: Invalid Value; called from ~CSoundItem (line 48)

ERROR: OpenAL error: Invalid Value; called from ~CSoundItem (line 48)

ERROR: OpenAL error: Invalid Value; called from ~CSoundItem (line 48)

ERROR: OpenAL error: Invalid Value; called from ~CSoundItem (line 48)

ERROR: OpenAL error: Invalid Value; called from ~CSoundItem (line 48)

ERROR: OpenAL error: Invalid Value; called from ~CSoundItem (line 48)

ERROR: OpenAL error: Invalid Value; called from ~CSoundItem (line 48)

ERROR: OpenAL error: Invalid Value; called from ~CSoundItem (line 48)

ERROR: OpenAL error: Invalid Value; called from ~CSoundItem (line 48)

ERROR: OpenAL error: Invalid Value; called from ~CSoundItem (line 48)

Platform info? I don't see this on the mac...

Link to comment
Share on other sites

The game segfaults when starting up, Atlas segfaults when clicking the "Play" button. There was no issue a few revisions back, and it still works fine with the -nosound flag.

gdb backtrace:


(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00000000005cae8e in COggData::FetchDataIntoBuffer (this=0x4c013f0, count=<optimized out>, buffers=0x4c0142c)
at ../../../source/soundmanager/data/OggData.cpp:106
#2 0x00000000005cafb7 in COggData::InitOggFile (this=0x4c013f0, itemPath=<optimized out>) at ../../../source/soundmanager/data/OggData.cpp:63
#3 0x00000000005ca335 in SoundDataFromOgg (itemPath=...) at ../../../source/soundmanager/data/SoundData.cpp:99
#4 CSoundData::SoundDataFromFile (itemPath=...) at ../../../source/soundmanager/data/SoundData.cpp:79
#5 0x00000000005c8f5b in CSoundManager::LoadItem (this=0xbaaaf0, itemPath=...) at ../../../source/soundmanager/SoundManager.cpp:182
#6 0x00000000005d923e in Loop (this=<optimized out>) at ../../../source/soundmanager/js/MusicSound.cpp:50
#7 CNativeFunction<JMusicSound, false, bool, &JMusicSound::Loop>::JSFunction (cx=0xc335e0, argc=<optimized out>, vp=0x7fffbd2e0218)
at ../../../source/scripting/ScriptableObject.h:188
#8 0x00007ffff710100a in js::Interpret(JSContext*, JSStackFrame*, unsigned int, JSInterpMode) ()
from trunk/binaries/system/libmozjs185-ps-release.so.1.0
#9 0x00007ffff710a895 in js::RunScript(JSContext*, JSScript*, JSStackFrame*) ()
from trunk/binaries/system/libmozjs185-ps-release.so.1.0
#10 0x00007ffff710ad32 in js::Invoke(JSContext*, js::CallArgs const&, unsigned int) ()
from trunk/binaries/system/libmozjs185-ps-release.so.1.0
#11 0x00007ffff710bc1c in js::ExternalInvoke(JSContext*, js::Value const&, js::Value const&, unsigned int, js::Value*, js::Value*) ()
from trunk/binaries/system/libmozjs185-ps-release.so.1.0
#12 0x00007ffff7088922 in JS_CallFunctionName ()
from trunk/binaries/system/libmozjs185-ps-release.so.1.0
#13 0x000000000052e7ac in ScriptInterface::CallFunction_ (this=0xbbcb20, val=<optimized out>, name=0x87d9d7 "init", argc=2, argv=0x7fffea90eaf0,
ret=@0x7fffea90ea90) at ../../../source/scriptinterface/ScriptInterface.cpp:740
#14 0x00000000007b75f1 in CallFunctionVoid<CScriptValRooted, CScriptValRooted> (a1=..., a0=..., name=0x87d9d7 "init", val=18445618172679858216,
this=0xbbcb20) at ../../../source/scriptinterface/ScriptInterface.h:392
#15 CGUIManager::LoadPage (this=0xcc74a0, page=...) at ../../../source/gui/GUIManager.cpp:164
#16 0x00000000007b8bd6 in CGUIManager::PushPage (this=0xcc74a0, pageName=..., initData=...) at ../../../source/gui/GUIManager.cpp:80
#17 0x00000000007b9452 in CGUIManager::SwitchPage (this=0xcc74a0, pageName=..., initData=...) at ../../../source/gui/GUIManager.cpp:72
#18 0x000000000071fd5d in fGuiSwitchPage (msg=<optimized out>) at ../../../source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp:155
#19 AtlasMessage::fGuiSwitchPage_wrapper (msg=<optimized out>) at ../../../source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp:153
#20 0x0000000000701bc8 in RunEngine (data=<optimized out>) at ../../../source/tools/atlas/GameInterface/GameLoop.cpp:172
#21 0x00007ffff49f2efc in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#22 0x00007ffff472d59d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#23 0x0000000000000000 in ?? ()

Link to comment
Share on other sites

The game segfaults when starting up, Atlas segfaults when clicking the "Play" button. There was no issue a few revisions back, and it still works fine with the -nosound flag.

gdb backtrace:


(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00000000005cae8e in COggData::FetchDataIntoBuffer (this=0x4c013f0, count=<optimized out>, buffers=0x4c0142c)
at ../../../source/soundmanager/data/OggData.cpp:106
#2 0x00000000005cafb7 in COggData::InitOggFile (this=0x4c013f0, itemPath=<optimized out>) at ../../../source/soundmanager/data/OggData.cpp:63
#3 0x00000000005ca335 in SoundDataFromOgg (itemPath=...) at ../../../source/soundmanager/data/SoundData.cpp:99
#4 CSoundData::SoundDataFromFile (itemPath=...) at ../../../source/soundmanager/data/SoundData.cpp:79
#5 0x00000000005c8f5b in CSoundManager::LoadItem (this=0xbaaaf0, itemPath=...) at ../../../source/soundmanager/SoundManager.cpp:182
#6 0x00000000005d923e in Loop (this=<optimized out>) at ../../../source/soundmanager/js/MusicSound.cpp:50
#7 CNativeFunction<JMusicSound, false, bool, &JMusicSound::Loop>::JSFunction (cx=0xc335e0, argc=<optimized out>, vp=0x7fffbd2e0218)
at ../../../source/scripting/ScriptableObject.h:188
#8 0x00007ffff710100a in js::Interpret(JSContext*, JSStackFrame*, unsigned int, JSInterpMode) ()
from trunk/binaries/system/libmozjs185-ps-release.so.1.0
#9 0x00007ffff710a895 in js::RunScript(JSContext*, JSScript*, JSStackFrame*) ()
from trunk/binaries/system/libmozjs185-ps-release.so.1.0
#10 0x00007ffff710ad32 in js::Invoke(JSContext*, js::CallArgs const&, unsigned int) ()
from trunk/binaries/system/libmozjs185-ps-release.so.1.0
#11 0x00007ffff710bc1c in js::ExternalInvoke(JSContext*, js::Value const&, js::Value const&, unsigned int, js::Value*, js::Value*) ()
from trunk/binaries/system/libmozjs185-ps-release.so.1.0
#12 0x00007ffff7088922 in JS_CallFunctionName ()
from trunk/binaries/system/libmozjs185-ps-release.so.1.0
#13 0x000000000052e7ac in ScriptInterface::CallFunction_ (this=0xbbcb20, val=<optimized out>, name=0x87d9d7 "init", argc=2, argv=0x7fffea90eaf0,
ret=@0x7fffea90ea90) at ../../../source/scriptinterface/ScriptInterface.cpp:740
#14 0x00000000007b75f1 in CallFunctionVoid<CScriptValRooted, CScriptValRooted> (a1=..., a0=..., name=0x87d9d7 "init", val=18445618172679858216,
this=0xbbcb20) at ../../../source/scriptinterface/ScriptInterface.h:392
#15 CGUIManager::LoadPage (this=0xcc74a0, page=...) at ../../../source/gui/GUIManager.cpp:164
#16 0x00000000007b8bd6 in CGUIManager::PushPage (this=0xcc74a0, pageName=..., initData=...) at ../../../source/gui/GUIManager.cpp:80
#17 0x00000000007b9452 in CGUIManager::SwitchPage (this=0xcc74a0, pageName=..., initData=...) at ../../../source/gui/GUIManager.cpp:72
#18 0x000000000071fd5d in fGuiSwitchPage (msg=<optimized out>) at ../../../source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp:155
#19 AtlasMessage::fGuiSwitchPage_wrapper (msg=<optimized out>) at ../../../source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp:153
#20 0x0000000000701bc8 in RunEngine (data=<optimized out>) at ../../../source/tools/atlas/GameInterface/GameLoop.cpp:172
#21 0x00007ffff49f2efc in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#22 0x00007ffff472d59d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#23 0x0000000000000000 in ?? ()

Can you also provide the terminal output from the game's startup?

Link to comment
Share on other sites

Can you also provide the terminal output from the game's startup?

I can, but it's not helpful at all:


Cache: 500 (total: 3929) MiB
TIMER| InitVfs: 511.094 us
AL lib: pulseaudio.c:331: PulseAudio returned minreq > tlength/2; expect break up
Sound: AlcInit success, using PulseAudio Default
TIMER| InitScripting: 2.42154 ms
TIMER| CONFIG_Init: 3.67938 ms
TIMER| RunHardwareDetection: 18.8531 ms
TIMER| write_sys_info: 17.6893 ms
TIMER| InitRenderer: 2.01848 ms
TIMER| ps_console: 1.81371 ms
TIMER| ps_lang_hotkeys: 802.757 us
TIMER| common/setup.xml: 1.08079 ms
TIMER| common/styles.xml: 65.371 us
TIMER| common/sprite1.xml: 2.10942 ms
TIMER| common/init.xml: 1.47044 ms
TIMER| common/common_sprites.xml: 2.47259 ms
TIMER| common/common_styles.xml: 340.896 us
TIMER| pregame/sprites.xml: 723.277 us
TIMER| pregame/styles.xml: 62.787 us
TIMER| pregame/mainmenu.xml: 7.70251 ms
TIMER| common/global.xml: 447.194 us
Segmentation fault

(I've always gotten that warning about break up. It works just fine regardless.)

Link to comment
Share on other sites

While looking at the strange use of CStrW in CSoundData, I noticed that apparently m_FileName is never assigned to, yet GetFileName() is used in ReleaseSoundData(), so it seems that's an oversight and possibly a memory leak if it never cleans up the sound data.

The game segfaults when starting up, Atlas segfaults when clicking the "Play" button. There was no issue a few revisions back, and it still works fine with the -nosound flag.

gdb backtrace:


(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00000000005cae8e in COggData::FetchDataIntoBuffer (this=0x4c013f0, count=<optimized out>, buffers=0x4c0142c)
at ../../../source/soundmanager/data/OggData.cpp:106
#2 0x00000000005cafb7 in COggData::InitOggFile (this=0x4c013f0, itemPath=<optimized out>) at ../../../source/soundmanager/data/OggData.cpp:63
#3 0x00000000005ca335 in SoundDataFromOgg (itemPath=...) at ../../../source/soundmanager/data/SoundData.cpp:99
#4 CSoundData::SoundDataFromFile (itemPath=...) at ../../../source/soundmanager/data/SoundData.cpp:79
#5 0x00000000005c8f5b in CSoundManager::LoadItem (this=0xbaaaf0, itemPath=...) at ../../../source/soundmanager/SoundManager.cpp:182
#6 0x00000000005d923e in Loop (this=<optimized out>) at ../../../source/soundmanager/js/MusicSound.cpp:50
#7 CNativeFunction<JMusicSound, false, bool, &JMusicSound::Loop>::JSFunction (cx=0xc335e0, argc=<optimized out>, vp=0x7fffbd2e0218)
at ../../../source/scripting/ScriptableObject.h:188
#8 0x00007ffff710100a in js::Interpret(JSContext*, JSStackFrame*, unsigned int, JSInterpMode) ()
from trunk/binaries/system/libmozjs185-ps-release.so.1.0
#9 0x00007ffff710a895 in js::RunScript(JSContext*, JSScript*, JSStackFrame*) ()
from trunk/binaries/system/libmozjs185-ps-release.so.1.0
#10 0x00007ffff710ad32 in js::Invoke(JSContext*, js::CallArgs const&, unsigned int) ()
from trunk/binaries/system/libmozjs185-ps-release.so.1.0
#11 0x00007ffff710bc1c in js::ExternalInvoke(JSContext*, js::Value const&, js::Value const&, unsigned int, js::Value*, js::Value*) ()
from trunk/binaries/system/libmozjs185-ps-release.so.1.0
#12 0x00007ffff7088922 in JS_CallFunctionName ()
from trunk/binaries/system/libmozjs185-ps-release.so.1.0
#13 0x000000000052e7ac in ScriptInterface::CallFunction_ (this=0xbbcb20, val=<optimized out>, name=0x87d9d7 "init", argc=2, argv=0x7fffea90eaf0,
ret=@0x7fffea90ea90) at ../../../source/scriptinterface/ScriptInterface.cpp:740
#14 0x00000000007b75f1 in CallFunctionVoid<CScriptValRooted, CScriptValRooted> (a1=..., a0=..., name=0x87d9d7 "init", val=18445618172679858216,
this=0xbbcb20) at ../../../source/scriptinterface/ScriptInterface.h:392
#15 CGUIManager::LoadPage (this=0xcc74a0, page=...) at ../../../source/gui/GUIManager.cpp:164
#16 0x00000000007b8bd6 in CGUIManager::PushPage (this=0xcc74a0, pageName=..., initData=...) at ../../../source/gui/GUIManager.cpp:80
#17 0x00000000007b9452 in CGUIManager::SwitchPage (this=0xcc74a0, pageName=..., initData=...) at ../../../source/gui/GUIManager.cpp:72
#18 0x000000000071fd5d in fGuiSwitchPage (msg=<optimized out>) at ../../../source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp:155
#19 AtlasMessage::fGuiSwitchPage_wrapper (msg=<optimized out>) at ../../../source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp:153
#20 0x0000000000701bc8 in RunEngine (data=<optimized out>) at ../../../source/tools/atlas/GameInterface/GameLoop.cpp:172
#21 0x00007ffff49f2efc in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#22 0x00007ffff472d59d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#23 0x0000000000000000 in ?? ()

Obviously a silent failure somewhere, which is annoying :( We don't check the return value of OpenOggNonstream() so that's bad, it could fail for one of many reasons.

Link to comment
Share on other sites

Some of the in-game sounds are quite loud already, maybe music needs to be boosted slightly, or which sounds are you thinking are too quiet?

Starting music of main menu. It also seems it's missing some sounds from alpha 10, e.g. the ride cymbal entry sound from which the music start. Maybe it just was removed in the music file (it sounded better before to me).

Link to comment
Share on other sites

Hello All,

OK, I added some more error handling to the ogg file inits, and hopefully it will both report and handle errors better... Sorry about the mFilename thing. Originally The sounds were reference counted and created, freed, and reinitialized dynamically. But it became apparent that the javascript engine isn't always good about reporting when things are deleted or go out of scope, also most sounds are rused again and again, so they should really be cached anyway.

I will go through and make sure all remnants of that system are cleaned up.

Link to comment
Share on other sites

I just wanted to mention here that some people are saying that the music quality isn't as good as in alpha 10 anymore.

Maybe it's the same that fabio mentioned about "missing some sounds".

I compared with alpha 10 and can't hear a difference, but my speakers aren't very good ones.

Check the discussion about that topic in the irc-logs(starts about 21:37)

http://irclogs.wildfiregames.com/2012-08-31-QuakeNet-%230ad-dev.log

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...