Sounds Bug

Discussion in 'Technical Discussion' started by AppTout, Jan 21, 2017.

  1. AppTout

    AppTout Boxer

    Joined:
    Jan 22, 2016
    Messages:
    39
    Likes Received:
    36
    there seems to be a bug with the sound.

    To reproduce:
    When the game over screen is active on screen (iOS), exit the app with home button then reenter app so that you see the game over screen again. Any button sound stops and any effects to characters etc stop yet background music will play.
     
  2. GTE Games

    GTE Games Avid Boxer

    Joined:
    Sep 25, 2015
    Messages:
    251
    Likes Received:
    254
    Same, this is a repeat issue from previous versions.

    Currently 2.2.8

    If at any point, I exit the game (physical home button) and then bring it back up. The sound is muted. I have to go to settings, hit the audio button in the game to actually mute it, and then hit the button again to unmute.
     
  3. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Currently experiencing a different sound issue in 2.2.9.

    I have a sound that is triggered when my character runs over an object that is set to wake up. The sound plays fine and last for approx 20 secs, but the player usually finishes this short world within 10-15 secs and a "Tutorial Complete" UI displays with a new background sound.

    Issue is, the triggered sound from the previous world is still playing underneath the new UI sound.

    Any ideas @Andy? Thanks.
     
    trudnai likes this.
  4. trudnai

    trudnai Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,235
    Likes Received:
    701
    Same issue here @Phill Mason , just trying to figure out if anything can be done with this. Have you figured it out already?
     
  5. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Hey @trudnai, this has been an issue in BB once before and I think the best way round it was to have an invisible object trigger a silent sound at the end of the world/scene in order to replace the sound that continues on. I haven't tried this yet in 2.2.9, but I'll give it a try and let you know if it works.
     
  6. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Hi @Andy, any news/findings on the sound issue in 2.2.9? It seems that the UI sounds are playing nice - ie, start menu sound plays okay, world 1 sound plays okay and the Game Over UI sound kicks in a stops the World sound just as it should, but any other in-world or in-scene sounds appear to continue after the world/scene is finished. I have just tested this with an idle sound on an enemy and when I get to my level 01 complete UI, that enemy sound is still playing.
     
  7. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    trudnai likes this.
  8. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    @Phill Mason have you sent example BBDOC to support@buildbox.com?

    I'm aware of the multi-tasking sound issues (where SFX get muted).

    There is one instance in particular that can cause some sounds to not play. If you are trying to initiate or play dozens of sounds within a 10 second or so period. Some sounds will start dropping (not playing) in this case. There is not much we can do about this issue as it's a current limitation of the sound engine we are using. It takes some time (should be less than 10 seconds) for completed sounds to clear the queue.
     
  9. trudnai

    trudnai Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,235
    Likes Received:
    701
    Yep so SFX never returns in my tests. Now I try to manually do something about the sounds stucks in the Cocos2D-x's AudioEngine queue but so far I could not find a reliable solution. I will let you know if figured it out.
     
  10. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Thanks @Andy, I've sent a thinned-out bbdoc of the game I'm working on to support. This displays the sound issue quite well in 2 or 3 different places.
     
    Andy likes this.
  11. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    141
    [QUOTE="but any other in-world or in-scene sounds appear to continue after the world/scene is finished. I have just tested this with an idle sound on an enemy and when I get to my level 01 complete UI, that enemy sound is still playing.[/QUOTE]

    Hi Phill,
    I reported the idle sound not stopping on pause in this bug report "https://www.buildbox.com/forum/inde...-to-play-when-game-is-paused.8272/#post-43556"

    This was in 2.2.8. It is a big problem in the game I'm building as the enemy idle sound serves as a audible clue to an enemy approaching. Removing them will hurt the game play so I'm hoping for a fix.
     
    Phill Mason likes this.
  12. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Cheers Bill, I did se your original post, thanks. Support have a copy of my bbdoc and @Andy is aware of the issue. Fingers crossed for a fix real soon.
     
  13. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    There are 2 issues being discussed in this thread, here is the current status:

    1) Losing SFX on iOS due to app switching/Siri/receiving a phone call.

    This is the higher priority issue and we are trying to solve and release this ASAP. I don't have a solution yet, so we are still investigating it.

    2) Specific SFX not stopping when desired, usually when the SFX is really long and you hit game over or even the pause screen. This again is 2 issues really, the game over and pause screens require different but similar behavior.


    The assumption, for now, you must make is that there is no way to stop a specific SFX once they are started. If you do know of ANY way to do this please send me a working example, it might help in providing a better workaround. We are actively looking into this and will address it to some degree. But I can't commit to any timeline on this at the moment.

    A workaround for the pause screen would be to hide an audio button underneath the pause button to mute SFX, then do the opposite when exiting the pause screen. Note that this is not pausing the SFX it just mutes it.

    @trudnai @Phill Mason I still have your tickets open and am being reminded of them every day until we get some resolution. :)
     
    Phill Mason and trudnai like this.
  14. trudnai

    trudnai Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,235
    Likes Received:
    701
    Thanks @Andy

    I actually do not have problem with the Pause screen, SFX paused and continued with the pause button pressed. I only have a very tiny issue when pressing Home button: SFX fades away as it supposed to, but then when coming back couple of those SFXs continue to play or start from the beginning (not quite sure), except the last one. So if there was 3 SFX started, first two plays again, last one does not.

    For me #1 issue is a little bit more severe.

    I use 2.2.9.
     
  15. Collin Wade Thiessen

    Collin Wade Thiessen Avid Boxer

    Joined:
    Sep 25, 2015
    Messages:
    291
    Likes Received:
    341
    Url unlocks on the character select and when you pause ur phone the SFX stop but background music continues to play on 2.2.8
     
  16. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    Interesting, I will add this to the list. I don't remember this being reported yet, If this was reported before I must have misunderstood.
     
  17. Collin Wade Thiessen

    Collin Wade Thiessen Avid Boxer

    Joined:
    Sep 25, 2015
    Messages:
    291
    Likes Received:
    341
    I reported the url character unlock but the phone pause my son found today while testing out our new game.
     
  18. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    141
    Hi Andy,

    Since the SFX button is a toggle, this really isn't a practical workaround in some(most?) cases. If you mute the SFX in this way and have sound toggle buttons in your Pause screen(common I would think - I do) then your SFX button will display the opposite of what the user is expecting. If he notices this and clicks the SFX button to say turn the sound back on, then when they click on the Continue button the SFX will now be muted, the opposite of what they'll be expecting, and of course this could go the other way too. The game may also have other buttons in the Pause screen, such as a Shop button, Main menu button, etc. In this cases it also wouldn't work since you couldn't hide SFX buttons in those screens to get the SFX state back to where it was.

    Since muting the SFX has the desired affect of stopping all SFX and if you un-mute it appears to put the system in a state that the next effect will start playing correctly, I assume you do(or can) programmatically track the state that the SFX is currently in, I would think after the Pause button is pressed, if the current state is on, you could toggle the state off, then immediately toggle it back on. Since the game has been paused at this point I'm speculating that no new SFX would start while in the Pause screen. Of course I'm making assumptions here since I can't see the code, but it seems this might work.
    ============
    OK, after writing all that I came up with what appears to be a workable solution to Idle sounds not stopping when the game is paused. I put two sound SFX buttons over my Pause button, with Block touch through off of course. What this did was what I just suggested above to do programmatically. What it does is it toggles the SFX off and then back on, or on then off depending on the state when the pause button is pressed. In either case it maintains the current state of the SFX set by the user but if the SFX were on it stops the SFX while in the Pause dialog, but after returning to the game the next SFX will start correctly. I only tested this with my issue of Idle sounds not stopping when the game is Paused. I have no idea if this will solve any other problems. Please let me know if you find any problems with this workaround.

    trudnal: Was this what you were saying you do when you said, "....SFX paused and continued when the pause button pressed."?

    Bill
     
    Last edited: Mar 14, 2017
  19. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    Yes, as I mention it's just a workaround, it might work in a pinch for some situations until it is properly dealt with. Pausing SFX is what the proper behavior should be instead of muting it.
     
  20. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    141
    Hi Andy,

    Unfortunately after further testing I've found this really is not a viable workaround for idle sounds because on a device I found (as would be expected if I had thought about it) if you switch out of the app on a device, the app is paused programmatically, which means of course the Pause button is not pressed so the "mute" workaround is not triggered, so when you switch back to the app the Pause screen is showing but the idle sounds are still playing. Looks like a real fix is the only solution if you want to use idle sounds.
     

Share This Page