Audio Mute and Volume issues on mobile

0 favourites
  • 15 posts
From the Asset Store
10 different explosions rendered as transparent PNG.
  • Hi

    I searched throughout the forums but the only topics I found were at least two years old and the issue was not resolved back than. Sorry if I'm missing something that was already posted.....

    I want to create an Audio Multitrack Player where you can play all different audio loops in sync and choose to mute/un-mute each of the loops to create your own "remix".

    This engine has to work properly within a mobile app (android and iOS) that I plan to create with Phone Gap.

    I have created this test project :

    It works fine on my desktop Chrome.

    (The annoying delay when looping is the result of poor looping job by my music guy... Ill have it fixed today and update the file.)

    When I tested over LAN preview I got the following results:

    Safari on iPad mini - works fine

    Chrome on iPad mini - mute/unmute dont work :(

    I have tested it with the Set Volume action as well, but I get the same results.

    Since I am not very familiar with PhoneGap so I wonder if the problem is going to persist on the mobile app. As far as I know the PG app runs on Chrominium which is a version of Chrome...

    Are there any suggested solutions/workarounds or PG settings that may resolve this problem?

    Thanks a lot!

    EDIT: The issue is now resolved. See my post on page 2.

  • Anyone?

  • MaorKeshet, did you learn anything else on this issue. I am having what sounds to be a similar issue with mute/unmute on the iOS platform. My in game audio is working beautifully within the game but when I switch to testing locally or deploying to the web the mute/unmute feature is not working the same across platforms. I am using tags on various audio throughout my build and went with a toggle variable for the sound.

    I am wondering if this has something to do with how iOS handles audio. I know that it will not play before the user touches the screen but don't understand how it could really effect the mute/unmute feature.

    At least wanted to let you know there was someone out there with a similar problem. Anybody have a fix or suggestion? It would be much appreciated!

  • For some reason the Pause action is not respected so soon after calling the Play action in your capx. I would just call Play every time it is needed and seek to the point at which you want to be in the sound which is what you are already doing. You are then calling the Pause action but the Stop action may give you a performance difference (likely not). You are going to seek the next time you play the sound rather than resume anyway so it doesn't matter from a logic standpoint.

  • Thanks a lot TheBogueRat ! Can you please fix the dropbox link I would love to take a look.

    I am actually working now on a solution quite similar to what you described.But now theres a new issue:

    The mobile Chrome on the iPad sets the loop from the seek point, not from start of file...It took some time to figure out- all is perfect on the desktop but total chaos on mobile... the workaround I will try now is to set manual looping at each loops end.

    ShagenBake I hope some of this info will help :)

  • MaorKeshet, the file was at my website not dropbox.

    I've been posting files like this a couple times and I didn't realize that it wasn't actually working. I'll post a good file in a minute.

  • MaorKeshet

    Example CAPX

    I think I learned more about posting a file to this forum than I was able to show you about Audio... Hope this helps.

  • MaorKeshet

    Example CAPX

    I think I learned more about posting a file to this forum than I was able to show you about Audio... Hope this helps.

    TheBogueRat I'm not quite sure about that... the last link links back to the topic page... at least this loop is working fine ;)

    BTW I find dropbox very handy for file sharing.

  • I managed to get good sync on the iPad: I'm using seek action to trigger non-looped audio.

    As the audio file ends it triggers the same file to create the repeating loop.

    My problem is that there is an audible delay at play start of the new file, so this solution is practically no good :( Any ideas?

  • Another try?

  • This one works!

    Well this time it worked. I've never had a problem before. I went back to my older posts and they worked fine without dropbox. I even tested the previous link and it was working. Maybe I had an issue since I was editing the pages rather than posting a new one.

  • I think my issue is slightly different and therefore have moved to a new thread. However, I thought that you guys may either have insight or benefit from the potential outcome of that thread.

    Have a look...

    iOS mute/unmute issues & sound vs. music folders

    Thanks for trying to help me out! As always the C2 forum has been great!

  • TheBogueRat - the link looks alright but it seems that you didn't set public sharing to the file on dropbox. I appreciate u keep trying :)

    Some good news on my project: I deployed the project to my server and I'm getting much better results. So it looks as there is a Preview on LAN issue involved as well....

    The looping is not very precise but it is good enough for my needs.

    For future reference, my solution is:

    1. Use the Audio folder and NOT the Music folder.

    2. Preload, Play and Pause all your audio loops.

    3. Play non-looped audio and re-trigger it at end of file.

    4. For activating a specified sound use Seek (to sync the new loops to the loops that are already playing) and Resume.

    5. For deactivating a sound use Pause.

    6. Add a re-sync event: this is a repeating event that sends an identical Seek command to all sounds. This will fix sync problems that may occur due to performance limitations.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • example

    I think I'll just use my website as a source then.

  • works at last :) thnx.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)