Extremely Accurate Sound / Beats

How should I go about it. If I use frames, it is not flexible. If i use Timer, it still screws up.

I did hear there was some really cool method where you play a blank file, with a specific time length, and that will loop, and using that sound file, it will dispatch a event when it finishes, hence you get a very accurate loop.

But not really sure how that works. Anyone?