AudioSource loop not working

Hi ! I made a 3D game and now I implementing the sound effects on it.
I followed this document:
https://docs.cocos.com/creator/manual/en/audio/audio.html

But I am facing an issue, I checked the loop option, But the sound is play only 1 time.
I also attached the screenshot of AudioSource component, The sound is play but only one time, Not in loop, I want to play it in loop.
Please help me out, I am looking forward to it. .
ss

Hi, what is the version of Creator or Creator 3D? Did you get an error? Can you provide a demo that reproduces the problem?

1 Like

Thanks for your reply @yufang.wu. .
I am using Cocos Creator 2.4.2.
No, I didn’t get any error, And the issue is almost solved, But there is a bug or some issues in loop, I played different sounds tracks to check this issue, Loop is working now but sound track is repeat after some seconds, not immediately.
Means In loop, there is a break of some seconds before start again.

This problem can be solved by modifying the engine script CCAudiosource.js.


This issue has also been fixed in version 2.4.3.

Need to compile engine after modification, https://docs.cocos.com/creator/manual/en/advanced-topics/engine-customization.html#13-安装编译依赖

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.