Skip to content

소리 관련 블럭에서 대기할 때 일시정지한 동안의 시간도 포함하는 오류 해결 #2921

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

ChessBot-Entry
Copy link

개요

block_sound.js에서,
"소리 재생하고 기다리기" 관련 블럭이 일시정지 했을 때에도 대기가 멈추지 않습니다.
따라서, 특정 소리를 재생하고 기다린다고 할 때, 중간에 일시정지를 했다가 해제하면,
소리의 재생이 끝나기도 전에 다음 블럭이 실행됩니다.

수정 내역

현재 소리를 재생하고 기다리는 블럭은
sound_something_wait_with_block, sound_something_second_wait_with_block, sound_from_to_and_wait
이 3가지인데,
해당 블럭은 전부 setInterval을 이용해 대기를 하기 때문에 일시정지의 영향을 받지 않습니다.
해당 로직을 soundInstance의 complete 리스너로 변경했습니다.
추가적으로, ~초 재생하고 기다리기 코드는 음악 중단에 setInterval을 사용하고 있었기 때문에
Entry.Utils.playSoundduration 옵션으로 변경하였습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant