On Wed, Aug 20, 2014 at 12:04 PM, duanyao <duan...@ustc.edu> wrote: > 于 2014年08月20日 15:52, Philip Jägenstedt 写道: > >> On Tue, Aug 19, 2014 at 3:54 PM, duanyao <duan...@ustc.edu> wrote: >>> >>> I'm not familiar with game programing. Are sound effects small audio >>> files >>> that are usually >>> played as a whole? Then it should be safe to recreate the pipeline. >> >> There's also a trick called audio sprites where you put all sound >> effects into a single file with some silence in between and then seek >> to the appropriate offset. > > I think if UA can get and set currentTime property accurately, it should be > able to recreate the pipeline > with the same accuracy. What are the main factors limiting the accuracy?
I don't know, but would guess that not all media frameworks can seek to an exact audio sample but only to the beginning of a video frame or an audio frame, in which case currentTime would be slightly off. One could just lie about currentTime until playback continues, though. Philip