Skip to content

[fix] 결과화면 노래 재생 오류 해결#136

Merged
Sonny-Kor merged 3 commits into
devfrom
fix/#131
May 25, 2025
Merged

[fix] 결과화면 노래 재생 오류 해결#136
Sonny-Kor merged 3 commits into
devfrom
fix/#131

Conversation

@Sonny-Kor

Copy link
Copy Markdown
Contributor

필수 리뷰어

@hyunjuntyler

관련 이슈

완료 및 수정 내역

  • [ ]

테스트 방법 (선택)

리뷰 노트

  • 원인은 제출버튼에 stopMusic()을 호출해주고있었습니다.
    • 해당 메서드는 GameAudioHelper.shared.stopPlaying() 메서드를 비동기로 호출 하고있는 메서드입니다.

    • Engine이 생기고 나서 부터 제출버튼을 눌러도 Engine은 멈추지 않고 재생이 되고 있었고, Game Navigation Controller 에서 뷰 전환 시 BGM을 재생해야 하기 때문에 stopPlaying()stopEngine() 을 호출하고 있어, Result에서 Publish 값들이 꼬인 것 같습니다.

    • 해결 방법으로 GameNavigationController 에서 노래 정지 부분을 삭제하고, SubmitMusic, Answer, Humming, Rehumming ViewController 에서 제출 버튼 을 누를 때 노래 정지되도록 수정하였습니다.

    • 추가적으로 Navigaiton Push로 뷰를 이동하다 보니,
      Audio Player Component들의 deinit이 호출되지 않아, Binding을 계속 유지하고 있는 문제가 있어, ViewController에서 따로 unbind() 를 호출하도록 수정하였습니다.

스크린샷 (선택)

화면 기록 2025-05-22 오후 5 04 36

@around-forest around-forest left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다 :)

* 원인은 제출 시 StopPlayer()를 호출해주고있었음 , + 중복적으로 네비게이션 컨트롤러에서 stopPlayer()와 stopEngine()을 비동기로 처리하고있었음.

* 중복적으로 동작하다보니 Publish해야하는 State가 꼬이게 됨.

* ViewController 내부에서 제출 버튼을 누르면 노래가 멈추도록 수정

@hyunjuntyler hyunjuntyler left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다. 👍

@Sonny-Kor Sonny-Kor merged commit 40ace43 into dev May 25, 2025
7 checks passed
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.

SubmitAnswer 에서 노래를 재생 시키고있는 중 , 다음 결과로 넘어갈 경우 결과뷰 버그 문제 해겱

3 participants