2014년 12월 4일 목요일

Break in audio loop

Has anyone else noticed that when using an audio loop there is a break in the sound when the loop restarts? It's just a tenth of a second or something like that, but it does happen. Seems like it's an unresolved issue

For reference, this is happening with an MP3 file, in the Player component, with Loop checked off. 



Sal... Scott was probably correct in that reply he made to the other thread.  There is probably a split-second of empty sound in that MP3 at the beginning or the end.  If there's both, combined, they'd make up a gap.  Also, the player has to "rewind" the sound by reinitializing and reloading the sound...



No break in the sound unfortunately, that was the first thing I checked. Interesting on the "rewind" idea. I assumed there was some sort of reinitializing/reload but I wasn't sure if it would have been perceptible when working with such a small file (160kb). 

So if the file needs to be initialized I doubt setting a loop of two audio files would help. That is, the jump from audio file 1 to audio file 2 would be the same as from 1 back to 1. 

Is AI2 able to taper sound off? I could have the volume drop from 100 to 0 on file 1 as file 2 goes from 0 to 100. 

trying not to over-engineer this thing, but the audio breaks are super annoying!



Hello Sal (our names are almost the same, maybe we have some ancestors in common ...)
Try to use 2 player. with a clock you can start the second some milliseconds the end of the player active and than off it.



Good call! So player 1 going to player 2 still has a break in the audio, so more advanced methods are required. Any ideas how to start a player a few seconds into the audio file?



Sal, the reality is that there's overhead... there's always overhead.  AI or any other development language sends a call to the OS.  The OS does it as fast as it can.  But the OS is doing MANY things at the same time, and the call is put in a queue.  In addition, there's a priotiry to the queue, so Android will do it as fast as it can, or wants.



Quite right Enis. I'm just being lazy by relying on loop. I'm going to brew up a timer and figure out a smarter way around it. This wouldn't been a nice way to save myself some time though! 


댓글 없음:

댓글 쓰기