5minho / DreamRecorder

mino & bran BoostCamp Project
6 stars 0 forks source link

알람이 울리고 있는 동안 어플을 울리는 Notification을 삭제하기 때문에 알람소리가 멈춤. #51

Closed YoonJuHo closed 7 years ago

YoonJuHo commented 7 years ago

기존: AVQueuePlayer를 통해 Mute를 재생시키다가 queuePlayer.advanceToNextItem으로 했음. 수정: AVQueuePlayer는 지속적으로 Mute를 재생시키고 알람시간에 도달하면 AVPlayer에 해당 알람 Sound를 추가시켜 새롭게 재생시킴 (Mute와 알람음이 mix) 또한 AVPlayer는 따로 재생시키고 있기때문에 알람이 울리거나 Notification에서 일어나는 변화가 nextDate를 변화시켜도 지속적으로 재생되고 있음 -> 버튼을 눌러야 꺼지는 구조로 바꿈.(playViewController에서만 alarmPlayer.pause에 접근한다.