Preloading Audio on Mobile

0 favourites
  • 11 posts
From the Asset Store
a ready made template of Mobile Advert, Google Play and Mobile IAP Plugin,
  • Preloading audio on mobile doesnt seem to be working when I test on my Blackberry Z10.

    In my game I preload two sound files max per layout - on start of layout.

    When all preloads are complete the game is suppose to go to the next layout

    The preloads never complete so my game never goes to the next layout.

    So I switched all my audio files to be called by functions and preload on call of the function.. Still doesnt work

    Has anyone else experienced this same issue? This is the first time I've experienced it, after the release of r169, preloading worked perfectly before and I even had it to originally preload 8 audio files on start of layout on my first loader layout and that even worked fine.. thought maybe I was preloading too many files at the same time so I scattered them to preload right before loading into the layouts that would use them

    I know this is not an issue regarding bandwidth/internet connection because when I test it in webworks as a release ready app the preload issue persists.

    -On start of layout - preload sounds (2max)

    • All preloads complete - go to next layout

    Result: Stays on current layout - preload never finishes

    Expected Result:

    -All preloads complete - go to next layout

    Affected Browsers:

    • Blackberry 10 (WebGL) Browser

    -Mobile?

    Operating System:

    Windows 7 64-Bit

    Construct 2 Version ID:

    C2 r169 Beta

  • for a local app you might want to drop the preloading.. i've had some weird inconsistencies with that as well..

    basically in my experience preloading only works for browsers.. not for apps.. you don't have to remove all the preload requests, but just be sure you don't rely on "upon completion" to proceed..

    honestly you shouldn't need to preload sounds for mobile anyway because all of the content is available.. preloading is more important for web sites because a browser is downloading data from the internet which varies in how fast it can deliver it's apps.

  • part12studios Thanks for the clarification, I'll try exporting without preloading any sounds at all.

  • Nothing works, by not preloading the sounds the audio simply doesnt play. When I trigger my devices volume button I can see that its locked into a specific sound file but no other sounds play.

    I'll just export anyways - without preloading anything.. Chances are the sounds wont play but at least I did everything possible on my part to ensure it does. It might be a blackberry 10 bug idk.. All I know is that I didnt have this problem 3-4 days ago when my event sheet was the same.

  • A preload is complete when the audio object's readyState turns to 4 (HAVE_ENOUGH_DATA). This is standards-compliant code and AFAIK works on every other platform - so it sounds like a problem with BB10 that you will need to report to them.

  • Ashley that's great to know.. I've run into problems with preloading through iOS, but it's never been a big issue to work around,

    what is this ""audio object's readyState turns to 4 (HAVE_ENOUGH_DATA)." I feel like I'm missing something here.. the value becomes "4"? how do I see that to know its "4"?

    Also, in case I have your ear here, I'm seeing some trouble with Windows Universal Apps and Audio on WP8.1 the current WP8 plugin that has an audio call doesn't seem to fire off audio on 8.1 and the straight audio from Win8 (which works fine) is very laggy on WP8.1 devices..

    Thanks,

    Caleb

  • Ashley I'm having issues with my HTML5 export believe it or not. Seems very intermittent in whether it decides to load or not. Tried it on 3 browsers, and 3 computers.

    It works fine on my main PC and laptop, but for my client it simply won't load. It just sits on my loader layout saying it's loading. Apparently they sat there for 5 minutes before contacting me and asking why it took so long to load.

    It didn't work on IE or Chrome (oddly enough), and only loaded on Firefox. A few minutes later, however, they closed it down reopened it, and it wouldn't load properly.

    I have it set up so when the loader layout has finished loading and the preloads are done, go to layout. Not sure why it would only work some of the time.

    I'm guessing it's simply a problem with their PC, but I thought I'd post anyway just in case it is related somehow.

  • Thanks for the support Ashley , it was Blackberry that was having issues playing any audio, I'm very sorry about that. Wish I had known that before I put this post up but thanks again I appreciate it.

    part12studios brings up a great point, I decided to export to windows phone 8.0 for that very same reason.

  • AnD4D are you running ok local but not ok online? i remember i was having trouble with audio because my Web host didn't have m4a audio files authorized. i had to actually go and set that up on the host site in the control panel.. then browsers like IE10 (at the time) started to work great..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • also keep in mind that if you actually PLAY the sounds in a preload screen let the screen hang (deliberately) for 5-10 sec depending how many sounds you have.. this allows the buffer to get and play the sounds.. you can totally test it for what time is what you need.. but instant is almost certainly going to not be enough time.. while these sounds are playing.. you turn the volume wayyyy down.. i did something like -100 and then turn audio back up when you go to main menu.. i found this to be a good solution for my windows 8.1 game "Voider".. its totally a hack and I'm sure that in the coming months things will change / improve.. 8.1 isn't public yet for a reason.. it's not ready, but very close..

    the only catch with my hack is that it requires music you want to play start at the start of the game.. in my game "Bee Active" it worked fine until I had to go to the actual game where the menu music changed over to the game music.. the game music experienced the typical music lag I've been experiencing on WP 8.1

    The interesting thing I've also seen with 8.1 is they have relaxed the need for back button functionality.. i have two games so far that got approved without any back button logic (the stuff needed for 8.0 apps) which is kinda cool, although its also a shame we can't access the back button easily. thehen made the 8.0 plugin which i'd love to see make it's way to WP 8.1..

    Thanks!

    Caleb

  • I face a problem with audio on Blackberry Z10 testing too, in every type of testing, i get all sounds played twice, duplicated.

    Does anybody know what may cause this? Is it because of a different audio API? Any workaround or fix for sound that you may have discovered?

    I export via the Html5 option, and set up the app package with Blackberry Webworks 2.0

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