Accurate BPM event listener in AS3

前端 未结 4 774
盖世英雄少女心
盖世英雄少女心 2021-01-03 12:08

I\'m trying to sync animation to music at a specific BPM. I\'ve tried using the Timer but it isn\'t accurate when dealing with small intervals in milliseconds. I did some re

4条回答
  •  再見小時候
    2021-01-03 12:56

    You can also use the new Sound API with the SampleDataEvent and basically play your MP3 manually using Sound.extract(). In that case you know the latency up front and can even count up to the sample when your (delayed) event should happen.

    This is what we do in the AudioTool and it works very well.

提交回复
热议问题