Jump to content

Audio timing in IE


JHook
 Share

Recommended Posts

Thought I'd post about this incase it might help someone else. My game uses a single sound file with multiple sound effects (like: http://examples.phaser.io/_site/view_full.html?d=audio&f=audio+sprite.js&t=audio%20sprite ) and it worked everywhere except for IE where the sound markers weren't lining up. My issue was that I had compressed to a low bitrate mp3 and that changed the sample rate. It seems that Internet Explorer expects the mp3 to have a sample rate of 44.1k and anything else will cause the markers to be at the wrong times.

 

So, lesson learned. Stick with 44.1k sample rate mp3s!

Link to comment
Share on other sites

  • 3 months later...

Just heads up.. Audiosprites have issues with browsers (such as IE) which don't have webaudio. This is caused by Phaser's way of caching audio loading to single audio-tag which in return is shared between different Phaser.Sound instances. Due this audiosprite can only play one sound at time, no matter what pooling you try to do. I have yet to test if I could overcome it by loading same audio multiple times with different keys and hope browser caches the loading automatically.

 

Another point for audiosprites is the marker accuracy which is not that great on (at least) IE. To overcome this I've found solution to adjust the markers slightly so that they start about 0.15s early and stop 0.6s late. This is fine as audiosprites have some gap (default 1s). It does introduce random start latency, but at least the audio is played fully and play experience is not totally flop.

Link to comment
Share on other sites

  • 11 months later...

You are absolutely right, I have this issue with my game. I some how fix this issue by adding empty sound files between each sound but it only solves the problem to some extent. Now going to use 44.1K Sample rate Hope so It will fix it.

Link to comment
Share on other sites

Hi, I am using AIMP3 (http://www.aimp.ru/index.php?do=download). There is utility AIMP3ac.exe - AIMP3 Audio Converter that allows me to convert between various formats and also tweak its settings (can also convert into M4A and OGG).

 

For some formats you will need to install additional encoders - look here: https://www.aimp.ru/forum/index.php?topic=34387.0 (for English scroll down)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...