k776 Posted May 20, 2012 Report Share Posted May 20, 2012 (this is the log Ben is talking about - http://irclogs.wildfiregames.com/2012-05-19-QuakeNet-%230ad-dev.log - See timestamp 22:29 and onward) Quote Link to comment Share on other sites More sharing options...
feneur Posted May 21, 2012 Report Share Posted May 21, 2012 Is there much left before this can be added to SVN? Would be nice to have it in asap so it can be as well tested as possible before release, and it definitely sounds like it will be ready for the Alpha 11 release, so best to get it in soon It's definitely wise to fix any possible major bugs and preferably add the above directionality, but apart from that? Quote Link to comment Share on other sites More sharing options...
khegarty Posted May 21, 2012 Report Share Posted May 21, 2012 I agree, I'd like to hear a warning sound when one of my units is under attack, and maybe see a ping on the minimap to show where it is happening. Battle sounds could probably travel further than other less critical sounds, but not to the other side of the map.I do think you would want to hear attacks and such offscreen, but I do agree they shouldn't be very loud. I would think you would want them just loud enough that you are aware of them, but not in your face present. Maybe the volume could depend on how far away the attack was? Like Pureon mentioned, if they are totally across the world I don't think you should hear them. Quote Link to comment Share on other sites More sharing options...
Sonarpulse Posted May 22, 2012 Report Share Posted May 22, 2012 That's what the current implementation does. It's only 'realistic' if you imagine you're in a (silent) helicopter high above the ground watching through binoculars, i.e. not very realistic at all . (And it's not good for playability since off-screen objects will usually sound about the same as on-screen objects, which is confusing and unhelpful and unintuitive.)Ah, I knew the current sound scheme was something like realistic 3D, but I thought it was an unintentionally flawed 3D, due to the overall lousiness of the system. I guess some HUD-like sounds (EUS, ear-up-speaker, anyone?) would never make sense as 3D too. Quote Link to comment Share on other sites More sharing options...
memmaker650 Posted May 22, 2012 Report Share Posted May 22, 2012 Sorry, an stupid question, this new sound system will work on OS X ???? OS X version still haven't sound and music. Thanks for your great work. Quote Link to comment Share on other sites More sharing options...
quantumstate Posted May 22, 2012 Report Share Posted May 22, 2012 Sorry, an stupid question, this new sound system will work on OS X ???? OS X version still haven't sound and music.Thanks for your great work.Yes. Quote Link to comment Share on other sites More sharing options...
Zeta1127 Posted May 23, 2012 Report Share Posted May 23, 2012 What about the music not working after a match ends? Quote Link to comment Share on other sites More sharing options...
feneur Posted May 23, 2012 Report Share Posted May 23, 2012 What about the music not working after a match ends?That as well Those are some of the bigger reasons why the sound system is being rewritten after all Quote Link to comment Share on other sites More sharing options...
stwf Posted May 23, 2012 Author Report Share Posted May 23, 2012 (edited) Yes to all questions... Works on Mac (I'm developing it on a mac), and can play the music continually.Here is a new diff file that fixes the build on Windows... All it needed was to add 'precompiled.h' to all of the files and I got it to build in VC++10. Try it out if you like. No directional code yet. So if you'd rather wait a few more days for that it's fine...new_sound_manager_3.diff Edited May 23, 2012 by stwf Quote Link to comment Share on other sites More sharing options...
fabio Posted May 29, 2012 Report Share Posted May 29, 2012 I tested the patch under Ubuntu 12.04 and, after doing some quick tests, it seems it is working fine .There are just some additional compiler warnings when building:==== Building lowlevel (release) ====Config.cppCSoundManager.cppCOggData.cppCSoundData.cpp../../../source/soundmanager/data/CSoundData.cpp:20:2: warning: #import is a deprecated GCC extension [-Wdeprecated]CSoundItem.cppCSoundBase.cpp../../../source/soundmanager/items/CSoundBase.cpp:141:6: warning: unused parameter ‘position’ [-Wunused-parameter]../../../source/soundmanager/data/CSoundData.cpp: In static member function ‘static CSoundData* CSoundData::soundDataFromFile(OsPath&)’:../../../source/soundmanager/data/CSoundData.cpp:83:42: warning: ‘answer’ may be used uninitialized in this function [-Wuninitialized]CBufferItem.cppCStreamItem.cppSMSoundGroup.cppJSound.cpp../../../source/soundmanager/js/SMSoundGroup.cpp:158:6: warning: unused parameter ‘TimeSinceLastFrame’ [-Wunused-parameter]../../../source/soundmanager/js/SMSoundGroup.cpp: In member function ‘bool CSMSoundGroup::LoadSoundGroup(const VfsPath&)’:../../../source/soundmanager/js/SMSoundGroup.cpp:193:1: warning: unused variable ‘el_replacement’ [-Wunused-variable]../../../source/soundmanager/js/JSound.cpp:92:6: warning: unused parameter ‘argc’ [-Wunused-parameter]../../../source/soundmanager/js/JSound.cpp:160:8: warning: unused parameter ‘argc’ [-Wunused-parameter]../../../source/soundmanager/js/SMSoundGroup.cpp: At global scope:../../../source/soundmanager/js/SMSoundGroup.cpp:114:13: warning: ‘void HandleError(const wstring&, const VfsPath&, Status)’ defined but not used [-Wunused-function]JAmbientSound.cpp../../../source/soundmanager/js/JAmbientSound.cpp:83:8: warning: unused parameter ‘argc’ [-Wunused-parameter]JMusicSound.cpp../../../source/soundmanager/js/JMusicSound.cpp:72:8: warning: unused parameter ‘argc’ [-Wunused-parameter]==== Building mongoose (release) ======== Building mocks_test (release) ======== Building AtlasObject (release) ======== Building AtlasScript (release) ======== Building Collada (release) ======== Building AtlasUI (release) ======== Building ActorEditor (release) ====Linking engine==== Building pyrogenesis (release) ======== Building test (release) ====main.cppLinking test../../../source/main.cpp: In function ‘void Frame()’:../../../source/main.cpp:381:10: warning: unused variable ‘pos’ [-Wunused-variable]../../../source/main.cpp:382:10: warning: unused variable ‘dir’ [-Wunused-variable]../../../source/main.cpp:387:9: warning: unused variable ‘down’ [-Wunused-variable] Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted May 29, 2012 Report Share Posted May 29, 2012 I get basically the same errors in VS2010 with the latest patch, are you sure it's a new one?1>------ Build started: Project: simulation2, Configuration: Release Win32 ------2>------ Build started: Project: engine, Configuration: Release Win32 ------1> CCmpSoundManager.cpp2> COggData.cpp2>..\..\..\source\soundmanager\data\COggData.cpp(49): error C2065: '_O_BINARY' : undeclared identifier2>..\..\..\source\soundmanager\data\COggData.cpp(49): error C3861: '_setmode': identifier not found2>..\..\..\source\soundmanager\data\COggData.cpp(50): error C2065: '_O_BINARY' : undeclared identifier2>..\..\..\source\soundmanager\data\COggData.cpp(50): error C3861: '_setmode': identifier not found2>..\..\..\source\soundmanager\data\COggData.cpp(119): error C2057: expected constant expression2>..\..\..\source\soundmanager\data\COggData.cpp(119): error C2466: cannot allocate an array of constant size 02>..\..\..\source\soundmanager\data\COggData.cpp(119): error C2133: 'pcmout' : unknown size2> CSoundData.cpp1>C:\Users\Ben\devel\ps\source\lib/external_libraries/openal.h(34): fatal error C1083: Cannot open include file: 'AL/al.h': No such file or directory2>..\..\..\source\soundmanager\data\CSoundData.cpp(20): fatal error C1083: Cannot open type library file: 'c:\users\ben\devel\ps\source\soundmanager\data\csounddata.h': Error loading type library/DLL.2> 2> CBufferItem.cpp2>..\..\..\source\soundmanager\items\CBufferItem.cpp(42): error C2057: expected constant expression2>..\..\..\source\soundmanager\items\CBufferItem.cpp(42): error C2466: cannot allocate an array of constant size 02>..\..\..\source\soundmanager\items\CBufferItem.cpp(42): error C2133: 'al_buf' : unknown size2> CSoundBase.cpp2>..\..\..\source\soundmanager\items\CSoundBase.cpp(18): warning C4627: '#include "CSoundBase.h"': skipped when looking for precompiled header use2> Add directive to 'precompiled.h' or rebuild precompiled header2>..\..\..\source\soundmanager\items\CSoundBase.cpp(19): warning C4627: '#include "soundmanager/CSoundManager.h"': skipped when looking for precompiled header use2> Add directive to 'precompiled.h' or rebuild precompiled header2>..\..\..\source\soundmanager\items\CSoundBase.cpp(20): warning C4627: '#include "soundmanager/data/CSoundData.h"': skipped when looking for precompiled header use2> Add directive to 'precompiled.h' or rebuild precompiled header2>..\..\..\source\soundmanager\items\CSoundBase.cpp(24): warning C4627: '#include "lib/timer.h"': skipped when looking for precompiled header use2> Add directive to 'precompiled.h' or rebuild precompiled header2>..\..\..\source\soundmanager\items\CSoundBase.cpp(266): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "precompiled.h"' to your source?2> CSoundItem.cpp2>..\..\..\source\soundmanager\items\CSoundItem.cpp(18): warning C4627: '#include "CSoundItem.h"': skipped when looking for precompiled header use2> Add directive to 'precompiled.h' or rebuild precompiled header2>..\..\..\source\soundmanager\items\CSoundItem.cpp(19): warning C4627: '#include "soundmanager/data/CSoundData.h"': skipped when looking for precompiled header use2> Add directive to 'precompiled.h' or rebuild precompiled header2>..\..\..\source\soundmanager\items\CSoundItem.cpp(66): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "precompiled.h"' to your source?2> CStreamItem.cpp2>..\..\..\source\soundmanager\items\CStreamItem.cpp(18): warning C4627: '#include "CStreamItem.h"': skipped when looking for precompiled header use2> Add directive to 'precompiled.h' or rebuild precompiled header2>..\..\..\source\soundmanager\items\CStreamItem.cpp(19): warning C4627: '#include "soundmanager/data/COggData.h"': skipped when looking for precompiled header use2> Add directive to 'precompiled.h' or rebuild precompiled header2>..\..\..\source\soundmanager\items\CStreamItem.cpp(93): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "precompiled.h"' to your source?2> JAmbientSound.cpp2>..\..\..\source\soundmanager\js\JAmbientSound.cpp(18): warning C4627: '#include "JAmbientSound.h"': skipped when looking for precompiled header use2> Add directive to 'precompiled.h' or rebuild precompiled header2>..\..\..\source\soundmanager\js\JAmbientSound.cpp(19): warning C4627: '#include "maths/Vector3D.h"': skipped when looking for precompiled header use2> Add directive to 'precompiled.h' or rebuild precompiled header2>..\..\..\source\soundmanager\js\JAmbientSound.cpp(21): warning C4627: '#include "lib/utf8.h"': skipped when looking for precompiled header use2> Add directive to 'precompiled.h' or rebuild precompiled header2>..\..\..\source\soundmanager\js\JAmbientSound.cpp(22): warning C4627: '#include "ps/Filesystem.h"': skipped when looking for precompiled header use2> Add directive to 'precompiled.h' or rebuild precompiled header2>..\..\..\source\soundmanager\js\JAmbientSound.cpp(24): warning C4627: '#include "soundmanager/CSoundManager.h"': skipped when looking for precompiled header use2> Add directive to 'precompiled.h' or rebuild precompiled header2>..\..\..\source\soundmanager\js\JAmbientSound.cpp(98): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "precompiled.h"' to your source?2> JMusicSound.cpp2>..\..\..\source\soundmanager\js\JMusicSound.cpp(18): warning C4627: '#include "JMusicSound.h"': skipped when looking for precompiled header use2> Add directive to 'precompiled.h' or rebuild precompiled header2>..\..\..\source\soundmanager\js\JMusicSound.cpp(19): warning C4627: '#include "maths/Vector3D.h"': skipped when looking for precompiled header use2> Add directive to 'precompiled.h' or rebuild precompiled header2>..\..\..\source\soundmanager\js\JMusicSound.cpp(21): warning C4627: '#include "lib/utf8.h"': skipped when looking for precompiled header use2> Add directive to 'precompiled.h' or rebuild precompiled header2>..\..\..\source\soundmanager\js\JMusicSound.cpp(22): warning C4627: '#include "ps/Filesystem.h"': skipped when looking for precompiled header use2> Add directive to 'precompiled.h' or rebuild precompiled header2>..\..\..\source\soundmanager\js\JMusicSound.cpp(24): warning C4627: '#include "soundmanager/CSoundManager.h"': skipped when looking for precompiled header use2> Add directive to 'precompiled.h' or rebuild precompiled header2>..\..\..\source\soundmanager\js\JMusicSound.cpp(86): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "precompiled.h"' to your source?2> Generating Code...========== Build: 0 succeeded, 2 failed, 16 up-to-date, 0 skipped ========== Quote Link to comment Share on other sites More sharing options...
stwf Posted May 31, 2012 Author Report Share Posted May 31, 2012 hmm, wow that was a mistake. I did upload the wrong one. I apologize for the time wasted...The good news is that the directionality is done and will get uploaded tonight. I think the overall workings of it should get tweaked over a couple of iterations, the first pass is handled like this.Objects on the screen or in the a 10% buffer area around the screen are laid out as they appear horizontally on the screen with the sides of the screen at 60 degrees off center, all at a constant distance that is equal to the height of the camera. The volume rolloff is handled is set as exponential, so the higher the camera is the quieter all of the placed sounds are. The only other modification is that items in the 10% buffer around the screen get triple volume rolloff as items on the screen, so they will always sound quieter than similar sounds on screen.Anything outside of the 10% buffer just isn't played, although I do support the eOmnipresent flag that plays the sound at the same location as the listener.Also I added a flag eDistanceless that will play a sound at a location whether or not it is on the screen. Sounds with this flag set get pinned to 70 degrees maximum right or left of center, since the object would be to get the user to scroll the map to the right or left, not to look behind themselves!As always all comments or questions welcome... Quote Link to comment Share on other sites More sharing options...
k776 Posted May 31, 2012 Report Share Posted May 31, 2012 Sounds good. Can't wait to test it and provide feedback. Quote Link to comment Share on other sites More sharing options...
stwf Posted June 1, 2012 Author Report Share Posted June 1, 2012 The code is up in my github branch, but I'm having a windows build problem. So, one more day delay... Quote Link to comment Share on other sites More sharing options...
k776 Posted June 1, 2012 Report Share Posted June 1, 2012 Works very well. Only issues I saw:1) Menu > Settings > Enable Music has no effect (unticking still plays music)2) When asking units to move into an area off screen, there is no audio verification that the click happened (maybe user clicks need to be omnipresent?)3) Some music and voices and actions and such are louder than others - this really needs to be balanced by the sound guys!Other than those, works nicely. Directional sound appears to be working nicely, and when I move away sounds stop, sounds aren't bleeding through the FoW/SoD, and nothing too far off screen is playing. So looks like all the current issues with the Alpha 10 sound system have been fixed.Nice job! :-) Once you finish the windows build fixes, lets start the work to get this reviewed and committed. Post your patch on the trac ticket, mark with "patch review" tags, and then bug someone to review it :-) Quote Link to comment Share on other sites More sharing options...
Pureon Posted June 1, 2012 Report Share Posted June 1, 2012 Brilliant work! 3) Some music and voices and actions and such are louder than others - this really needs to be balanced by the sound guys!Does the Gain value work in the new sound manager? In most cases it should already be set to balance the sounds. Otherwise I can go through and make changes after it's committed. Quote Link to comment Share on other sites More sharing options...
fabio Posted June 1, 2012 Report Share Posted June 1, 2012 Brilliant work! Does the Gain value work in the new sound manager? In most cases it should already be set to balance the sounds. Otherwise I can go through and make changes after it's committed.In this case make sure you use vorbisgain (supposing 0 A.D. is compatible with it) to do it, to avoid losing audio quality.Other audio suggestion here. Quote Link to comment Share on other sites More sharing options...
stwf Posted June 2, 2012 Author Report Share Posted June 2, 2012 Here is the assertion I keep getting, on the Windows build only Quote Link to comment Share on other sites More sharing options...
WhiteTreePaladin Posted June 2, 2012 Report Share Posted June 2, 2012 Definitely agree that a new sound system is worth a slight delay... also on that matter, where does programming stand with battle tracks?I.e. how likely are they to be introduced in A11?http://www.wildfiregames.com/forum/index.php?showtopic=16140entry241354Might be possible to get battle detection in and update the sound system. Just posting this here for reference.[edit] Just realized that's not public, so that link isn't much good for you. Quote Link to comment Share on other sites More sharing options...
Potter Posted June 3, 2012 Report Share Posted June 3, 2012 Here is the assertion I keep getting, on the Windows build onlyFrom the message "path uses both slash and backslash", Looks like somewhere there is a mismatch with path separators (which is slash for mac, linux and backslash for windows ) Quote Link to comment Share on other sites More sharing options...
fabio Posted June 4, 2012 Report Share Posted June 4, 2012 Tried current git, it fails to build on Ubuntu 12.04:In file included from ../../../source/ps/Game.cpp:48:0:../../../source/soundmanager/CSoundManager.h:14:23: fatal error: OpenAL/al.h: File or directory not foundcompilation terminated.(error message translated to english by me) Quote Link to comment Share on other sites More sharing options...
fabio Posted June 4, 2012 Report Share Posted June 4, 2012 OK, I forget the code was in a branch. It builds fine now, there are still these warnings:../../../source/soundmanager/data/CSoundData.cpp: In static member function ‘static CSoundData* CSoundData::soundDataFromFile(OsPath&)’:../../../source/soundmanager/data/CSoundData.cpp:78:42: warning: ‘answer’ may be used uninitialized in this function [-Wuninitialized]CSoundItem.cppCSoundBase.cpp../../../source/soundmanager/items/CSoundBase.cpp: In member function ‘virtual void CSoundBase::setLocation(const CVector3D&)’:../../../source/soundmanager/items/CSoundBase.cpp:147:19: warning: unused variable ‘loatArr’ [-Wunused-variable]Camera.cppCBufferItem.cppCStreamItem.cppSMSoundGroup.cppTextRenderer.cpp../../../source/soundmanager/js/SMSoundGroup.cpp: In member function ‘void CSMSoundGroup::UploadPropertiesAndPlay(int, const CVector3D&)’:../../../source/soundmanager/js/SMSoundGroup.cpp:157:18: warning: unused variable ‘screenWidth’ [-Wunused-variable]../../../source/soundmanager/js/SMSoundGroup.cpp: At global scope:../../../source/soundmanager/js/SMSoundGroup.cpp:231:6: warning: unused parameter ‘TimeSinceLastFrame’ [-Wunused-parameter]../../../source/soundmanager/js/SMSoundGroup.cpp: In member function ‘bool CSMSoundGroup::LoadSoundGroup(const VfsPath&)’:../../../source/soundmanager/js/SMSoundGroup.cpp:266:1: warning: unused variable ‘el_replacement’ [-Wunused-variable]../../../source/soundmanager/js/SMSoundGroup.cpp: At global scope:../../../source/soundmanager/js/SMSoundGroup.cpp:188:13: warning: ‘void HandleError(const wstring&, const VfsPath&, Status)’ defined but not used [-Wunused-function]JSound.cpp../../../source/soundmanager/js/JSound.cpp:91:6: warning: unused parameter ‘argc’ [-Wunused-parameter]../../../source/soundmanager/js/JSound.cpp:159:8: warning: unused parameter ‘argc’ [-Wunused-parameter]ParticleEmitter.cppJAmbientSound.cppHeightMipmap.cpp../../../source/soundmanager/js/JAmbientSound.cpp:84:8: warning: unused parameter ‘argc’ [-Wunused-parameter]Color.cppColladaManager.cppJMusicSound.cpp../../../source/soundmanager/js/JMusicSound.cpp:73:8: warning: unused parameter ‘argc’ [-Wunused-parameter]...==== Building pyrogenesis (release) ====Creating obj/pyrogenesis_Releasemain.cpp../../../source/main.cpp: In function ‘void Frame()’:../../../source/main.cpp:378:10: warning: unused variable ‘pos’ [-Wunused-variable]../../../source/main.cpp:379:10: warning: unused variable ‘dir’ [-Wunused-variable]../../../source/main.cpp:384:9: warning: unused variable ‘down’ [-Wunused-variable] Quote Link to comment Share on other sites More sharing options...
stwf Posted June 4, 2012 Author Report Share Posted June 4, 2012 (edited) Thanks to historic_bruno and others I have fixed all of the problems and will be pushing the final version up tonight. It's functionally the same as the current version but without the warnings and assertions on Windows.Brilliant work! Does the Gain value work in the new sound manager? In most cases it should already be set to balance the sounds. Otherwise I can go through and make changes after it's committed.Yes, the gain being set through the xml files is being honored although I'll take another look and double check. But if not thats a bug I can fix. So that should be enough to rebalance the sound.In this case make sure you use vorbisgain (supposing 0 A.D. is compatible with it) to do it, to avoid losing audio quality.Other audio suggestion here.http://www.wildfireg...40Might be possible to get battle detection in and update the sound system. Just posting this here for reference.[edit] Just realized that's not public, so that link isn't much good for you. Since we're nearing the end of Phase 1 of this system, to get something stable and working. I'd love to move on and start adding new features and support. Most of these things will require developer support, so its more up to the community which ones they want and will implement (or be willing to lose control of)... Edited June 4, 2012 by stwf Quote Link to comment Share on other sites More sharing options...
stwf Posted June 7, 2012 Author Report Share Posted June 7, 2012 OK, the long awaited final version of the first pass of the sound manager is here. Should build and run cleanly on Mac, linux and Windows. I'll keep on the lookout for bug reports... fingers crossed...patch12.diff 1 Quote Link to comment Share on other sites More sharing options...
Echelon9 Posted June 7, 2012 Report Share Posted June 7, 2012 Great. Is it in trunk? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.