stwf Posted April 8, 2013 Author Report Share Posted April 8, 2013 OK, I will play around with that. I agree that if the action doesn't pause the music shouldn't. I will also smooth out the abrupt cut offs.I can look into what kind of options we have here, as you said I'm not sure we can tell if we are minimized or not. SI this something the Design Committee might get involved in?This originally sprang out of http://trac.wildfiregames.com/ticket/1712 . But for some reason this bug still persists. It seems like the Atlas engine doesn't stop or pause through the same mechanism that the regular game does... But it does seem to start the music normally, oddMy one option is to just make Atlas aware of the sound manager and pause the music when the simulation is paused. But that doesn't seem right. Any ideas in how I can best capture Atlas starts and stops? Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted April 9, 2013 Report Share Posted April 9, 2013 In Atlas, there are basically two states: * "Reset" where the game UI is hidden, the game is essentially paused but not in the same way as a normal game, it's like the map was just loaded and initialized, so it needs a special case to deal with that. This is Atlas' default state, no sound should play. * "Simulation test" where the session UI is shown and the game may be run at some arbitrary speed (0.0 = paused, but as you've seen it's not handled through global variables like a normal game).So the point with Atlas sound is not to pause or mute it at all, but to reset it to nothing in the "Reset" mode. When it's in "simulation test" mode, it doesn't really matter what happens with sound IMO, since that's a much less common case, but we could also special case pause to mute the sound. Atlas doesn't minimize or pause automatically, so it's not necessary to handle that.If you can provide some API for sound manager to reset sound to default state with nothing playing (all buffers cleared), I or someone else can write some AtlasUI / GameInterface code to use it. Unless you really want to delve into AtlasUI, it's not too bad once you get used to it, but you do have to realize it's running in a separate thread from the game engine and thus custom message passing is used to control and query the engine. Quote Link to comment Share on other sites More sharing options...
stwf Posted April 10, 2013 Author Report Share Posted April 10, 2013 Keep in mind that there's a config option "pauseonfocusloss" that can be changed, so the game doesn't necessarily pause when it loses focus. Do you play in windowed mode? Try it, and switch from the game quickly to say, a chat window, and back, and listen to what happens Sometimes there's a tendency to add an option for everything, but maybe time for muteonfocusloss or muteonpause in the config?I just put in a fade in and out when the app switches focus. It also honors the pauseonfocusloss flag. Otherwise I left the behavior as is. It turns out I can differentiate between being minimized and losing focus. So what ever the consensus for the behavior is I will implement. I don't think that having a set of preferences for background behavior is overdoing it.If you can provide some API for sound manager to reset sound to default state with nothing playing (all buffers cleared), I or someone else can write some AtlasUI / GameInterface code to use it. Unless you really want to delve into AtlasUI, it's not too bad once you get used to it, but you do have to realize it's running in a separate thread from the game engine and thus custom message passing is used to control and query the engine.You can turn the sound off using the static function CSoundManager::SetEnabled(false). You can turn it back on by passing true to that function. That completely closes it down and then reinitializes it.This snippet will pause and unpause it, I could put this into a static function if you like.if ( g_SoundManager ) g_SoundManager->Pause(g_Game->m_Paused);At some point I would like to get into the Atlas stuff but it seems like there is plenty to do game wise for the time being ;-)... I did wonder why the actor editor didn't play the units sounds. But otherwise I haven't spent much time in Atlas at all. If you could put this in at some point I'd appreciate it. Quote Link to comment Share on other sites More sharing options...
stwf Posted April 12, 2013 Author Report Share Posted April 12, 2013 Just a reminder that one of the MSVC warnings still exists 1> CBufferItem.cpp1>e:\devel\ps\source\soundmanager\items\cbufferitem.cpp(88): warning C4702: unreachable codeAny idea how to fix this? I guess its missing the fact that the variable is being passed in by address and can be changed? I tried declaring it volatile, but that conflicts with how OpenAL defines the function... Quote Link to comment Share on other sites More sharing options...
stwf Posted April 24, 2013 Author Report Share Posted April 24, 2013 ok, first pass at playlist functionality is in. Let me know if there are any problems. 1 Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted April 25, 2013 Report Share Posted April 25, 2013 ok, first pass at playlist functionality is in. Let me know if there are any problems.Sound effects cut out after a few minutes. Then the music cuts out a few minutes later. Quote Link to comment Share on other sites More sharing options...
alpha123 Posted April 25, 2013 Report Share Posted April 25, 2013 Sound effects cut out after a few minutes. Then the music cuts out a few minutes later.I can reproduce this on Windows. quantumstate was unable to on Linux, so I assume it's a platform thing.I'm not using the autobuild though, so it could be an issue with my build, I guess. Quote Link to comment Share on other sites More sharing options...
stwf Posted April 25, 2013 Author Report Share Posted April 25, 2013 Sound effects cut out after a few minutes. Then the music cuts out a few minutes later.ughI don't get that on Mac either, obviously or I wouldn't have released the code. oh well I'll try to figure out what is going on. Any good details? In windowed mode or pausing the action somehow else? Sound effects cutting out is strange. Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted April 26, 2013 Report Share Posted April 26, 2013 ughI don't get that on Mac either, obviously or I wouldn't have released the code. oh well I'll try to figure out what is going on. Any good details? In windowed mode or pausing the action somehow else? Sound effects cutting out is strange.I can hear the birds chirping. That's the only sound I can hear. Happens in all different cases. Quote Link to comment Share on other sites More sharing options...
alpha123 Posted April 26, 2013 Report Share Posted April 26, 2013 In windowed mode or pausing the action somehow else? Sound effects cutting out is strange.It happens to me regardless of mode (single player, multiplayer, windowed, fullscreen). Quote Link to comment Share on other sites More sharing options...
stwf Posted April 26, 2013 Author Report Share Posted April 26, 2013 ok r13372 should clear this up. sorry! Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted April 27, 2013 Report Share Posted April 27, 2013 ok r13372 should clear this up. sorry!Problem is fixed! Another problem though is that the game will sometimes play music from the wrong faction. Quote Link to comment Share on other sites More sharing options...
WhiteTreePaladin Posted April 27, 2013 Report Share Posted April 27, 2013 Playlist support is going to be awesome! Quote Link to comment Share on other sites More sharing options...
Yves Posted April 27, 2013 Report Share Posted April 27, 2013 Playlist support is going to be awesome! Yes it was a pitty that the same pieces of music repeated over an over when we have multiple awesome tracks available.I'm happy this is fixed now! Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted April 27, 2013 Report Share Posted April 27, 2013 Problem is fixed! Another problem though is that the game will sometimes play music from the wrong faction.It appears that if you start a game, and then return to main menu, any more games will play the music from the first one, regardless of civilization. Quote Link to comment Share on other sites More sharing options...
stwf Posted April 29, 2013 Author Report Share Posted April 29, 2013 It appears that if you start a game, and then return to main menu, any more games will play the music from the first one, regardless of civilization.OK, this actually seems to be a javascript error. The variable this.tracks.PEACE keeps getting each civs music added tothe list.I can clear this up with a call totracks.PEACE = [];at line 120 of music.js. But I don't know the javascript code very well. Does this seem like the best place to do this? This only works for peace tracks which seems to be all that there is in the civ json files at this moment... Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted June 2, 2013 Report Share Posted June 2, 2013 I think training and building complete sounds should be omnipresent. This, after watching some Age of Kings gameplay videos and also when playing 0 A.D. being confused when I couldn't hear these sounds when off-camera. Quote Link to comment Share on other sites More sharing options...
stwf Posted June 3, 2013 Author Report Share Posted June 3, 2013 I think training and building complete sounds should be omnipresent. This, after watching some Age of Kings gameplay videos and also when playing 0 A.D. being confused when I couldn't hear these sounds when off-camera.I think that can be fixed by editing the appropriate XML file and turning on eOmnipresent if you want it to play at the listener location, or turning on eDistanceless and it is played at a location, but at full volume. Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted June 3, 2013 Report Share Posted June 3, 2013 I think that can be fixed by editing the appropriate XML file and turning on eOmnipresent if you want it to play at the listener location, or turning on eDistanceless and it is played at a location, but at full volume.Here is the code for the Barracks completion sound:<?xml version="1.0" encoding="utf-8" standalone="no" ?><SoundGroup><Gain>1</Gain><Pitch>1</Pitch><Priority>30</Priority><ConeGain>1</ConeGain><ConeInner>360</ConeInner><ConeOuter>360</ConeOuter><Looping>0</Looping><RandOrder>1</RandOrder><RandGain>1</RandGain><GainUpper>1</GainUpper><GainLower>0.8</GainLower><RandPitch>1</RandPitch><PitchUpper>1.1</PitchUpper><PitchLower>0.9</PitchLower><Threshold>1</Threshold><Decay>3</Decay><Replacement>complete_barracks.ogg</Replacement><Path>audio/interface/complete/building</Path><Sound>complete_barracks.ogg</Sound></SoundGroup>What do I need to add so that the player can always hear this, whether it is on-screen or not? <eOmnipresent>yes</eOmnipresent> or something like this? Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted June 3, 2013 Report Share Posted June 3, 2013 I'm now getting these kind of warnings with the latest revision:WARNING: OpenAL: stereo sounds can't be positioned: audio/voice/hellenes/civ/female/civ_female_what_is_it_2.oggWARNING: OpenAL: stereo sounds can't be positioned: audio/voice/hellenes/civ/female/civ_female_repair_1.oggWARNING: OpenAL: stereo sounds can't be positioned: audio/voice/hellenes/civ/female/civ_female_repair_2.oggWARNING: OpenAL: stereo sounds can't be positioned: audio/voice/hellenes/civ/female/civ_female_repair_1.oggUsing Xcursor to sys_cursor_create 32 x 32 cursorWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/complete/building/complete_house.oggWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/complete/building/complete_house.oggWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/complete/building/complete_house.oggWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/select/building/sel_civ_center.oggUsing Xcursor to sys_cursor_create 32 x 32 cursorWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/complete/building/complete_house.oggWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/select/building/sel_civ_center.oggUsing Xcursor to sys_cursor_create 32 x 32 cursorWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/complete/building/complete_house.oggTIMER| LoadDLL: 46.7448 msWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/select/building/sel_civ_center.oggWARNING: OpenAL: stereo sounds can't be positioned: audio/voice/hellenes/civ/female/civ_female_what_is_it_3.oggUsing Xcursor to sys_cursor_create 32 x 32 cursorWARNING: OpenAL: stereo sounds can't be positioned: audio/voice/hellenes/civ/female/civ_female_gather_together_1.oggUsing Xcursor to sys_cursor_create 32 x 32 cursorWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/complete/building/complete_dock.oggWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/select/building/sel_dock.oggWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/select/building/sel_civ_center.oggWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/select/building/sel_dock.oggUsing Xcursor to sys_cursor_create 32 x 32 cursorWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/alarm/alarm_warship_03.oggSomething wrong? Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted June 3, 2013 Report Share Posted June 3, 2013 I'm now getting these kind of warnings with the latest revision:WARNING: OpenAL: stereo sounds can't be positioned: audio/voice/hellenes/civ/female/civ_female_what_is_it_2.oggWARNING: OpenAL: stereo sounds can't be positioned: audio/voice/hellenes/civ/female/civ_female_repair_1.oggWARNING: OpenAL: stereo sounds can't be positioned: audio/voice/hellenes/civ/female/civ_female_repair_2.oggWARNING: OpenAL: stereo sounds can't be positioned: audio/voice/hellenes/civ/female/civ_female_repair_1.oggUsing Xcursor to sys_cursor_create 32 x 32 cursorWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/complete/building/complete_house.oggWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/complete/building/complete_house.oggWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/complete/building/complete_house.oggWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/select/building/sel_civ_center.oggUsing Xcursor to sys_cursor_create 32 x 32 cursorWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/complete/building/complete_house.oggWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/select/building/sel_civ_center.oggUsing Xcursor to sys_cursor_create 32 x 32 cursorWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/complete/building/complete_house.oggTIMER| LoadDLL: 46.7448 msWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/select/building/sel_civ_center.oggWARNING: OpenAL: stereo sounds can't be positioned: audio/voice/hellenes/civ/female/civ_female_what_is_it_3.oggUsing Xcursor to sys_cursor_create 32 x 32 cursorWARNING: OpenAL: stereo sounds can't be positioned: audio/voice/hellenes/civ/female/civ_female_gather_together_1.oggUsing Xcursor to sys_cursor_create 32 x 32 cursorWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/complete/building/complete_dock.oggWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/select/building/sel_dock.oggWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/select/building/sel_civ_center.oggWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/select/building/sel_dock.oggUsing Xcursor to sys_cursor_create 32 x 32 cursorWARNING: OpenAL: stereo sounds can't be positioned: audio/interface/alarm/alarm_warship_03.oggSomething wrong?Thanks for reporting. That message has been added for debugging purposes, because stereo sounds won't respect entity position, most of them will be fixed by r13450, but not all. There will be a few more fixes before it's all sorted out. 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.