detect the music duration to see if it is ad.
removed test code