Audio problem on Phonegap

0 favourites
  • 7 posts
From the Asset Store
100+ Musical High Quality Sound Effects for your game!
  • Hi everyone,

    I'm using the cordova media plugin and C2's audio plugin together. But the C2 audio plugin seems to be causing audio to crash when my app suspends and resumes.

    Most of the app uses the cordova media plugin for audio, but when the app is suspended (then resumed) the audio locks up and stops working.

    There seems to be a conflict of some kind, between the two different audio plugins. Because when I remove the C2 audio plugin, everything works fine.

    Does anyone have any idea why the two plugins might be causing a conflict (@Ashley)?

    Thanks for any advice you can offer

  • You don't need the cordova media plugin for audio playback any more. If you remove that, does it work?

  • Hey Ashley, thanks for your reply.

    I started using the cordova media plugin just a few weeks ago, to improve loading/playing times.

    I use quite a few large audio files. And when I used the C2 audio plugin, I often experienced long delays before the audio finally began to play. These delays could be anywhere between 3-10 seconds, depending upon the device and the version of Android it was running.

    So I began using the cordova media plugin, and audio now loads and plays immediately (on all devices).

    But I still need to use the C2 audio plugin on one of the pages in our app. I use it for the 'Set playback rate' action (which isn't supported in the cordova media plugin).

    So now I'm trying to juggle both plugins, but there seems to be a conflict between them. And when I resume from making a phone call, the cordova audio crashes.

    I'd really appreciate any ideas or advice you might have.

    Thanks

  • So you're using a third-party C2 addon right? We can't offer support for third-party addons, you should talk to the plugin developer.

  • Thanks Ashley, I'll try talking to the plugin developer.

    I wasn't really asking that you offer support for a third-party plugin. I simply wondered if you might have any ideas why there seems to be a conflict between the C2 audio and cordova media plugins, when used in the same project.

    I would've been happy to continue using the C2 audio plugin. But the 3-10 seconds delay experienced when playing larger audio tracks, just isn't acceptable.

    As mentioned in my previous message, the cordova media plugin I'm currently using, can load and play large audio files instantly. If the C2 audio plugin could do the same, I would just stick to using that instead.

    Are there any plans to update the C2 audio plugin to improve the loading / playing times, at some point?

    Thanks again for your time

    EDIT: The cordova media plugin I'm using also provides a way to unload / release audio files from memory. This could be another very useful improvement to the C2 audio plugin, if you do decide to update it.

  • This is one of those cases where really you want to solve the original problem (delay playing audio tracks) but instead you've found a broken workaround and you were asking how to solve that instead!

    File a report in the bugs forum following all the guidelines and I'll take a look. Although it may be as simple as you turned off audio preloading or something.

    I have no idea why any other plugin would conflict with an official plugin. I would say it's the third party developer's responsibility to ensure it doesn't conflict.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Ashley, thanks for your reply.

    I wouldn't say the cordova media plugin I'm using is broken. It works very well when I use it on its own. But when I add the official audio plugin to the project, they don't seem to work so well together.

    I've been using C2 for a few years now. And noticeable delays, when playing large audio files, seems to be an ongoing problem for the official audio plugin.

    I'm fairly sure these delays are not as a result of any mistakes on my part. And I should point out that, I do always make sure the audio preload settings are on. But I'll file a bug report for the issue, as soon as I have some time.

    Thanks again for your help

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