Skip to content
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

still play after exit : from Scya597 #6

Closed
vibertthio opened this issue Jun 27, 2017 · 5 comments
Closed

still play after exit : from Scya597 #6

vibertthio opened this issue Jun 27, 2017 · 5 comments
Assignees

Comments

@vibertthio
Copy link
Owner

目前按了exit play record button之後animation還是會繼續播完
邏輯是在audio.js最後那邊,我在playRecord用Transport.schedule來設定接下來要播的動畫
然後react端按下按了exit play record button後會觸發keyboard的clearSchedule函數,這函數理論上要把這些剩餘的預設動畫清空。
但是我用的方法Transport.cancel([time]); 不知為何會當掉,目前是comment掉的狀。

@vibertthio
Copy link
Owner Author

我先去確定 transport 清掉應該用什麼方式比較好...

@Scya597
Copy link
Collaborator

Scya597 commented Jun 28, 2017

重現這個bug: 某個record播放到一半,按下exit play record,聲音會直接消失,但原本那個record預設的動畫會播完。

@csiejoey
Copy link
Collaborator

現在exit之後,sequencer的聲音消失,但key的聲音和動畫都會播完

@csiejoey
Copy link
Collaborator

暫時用mute的方法解決了

在clearSchedule裡
this.samples._players[this.notes[record.content[j].key]].mute = true;

在playRecord時
this.samples._players[this.notes[record.content[i].key]].mute = false;

@csiejoey
Copy link
Collaborator

用Player.disconnect的方式解決了:
可看這個commit: 1d36b1f

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

No branches or pull requests

3 participants