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

ソング:trackChannelStrips、sequences周りを変更 #2205

Merged

Conversation

sigprogramming
Copy link
Contributor

内容

trackChannelStrips、sequences周りを変更して、

  • tracksとtrackChannelStripsの同期
  • ChannelStripとシーケンス(フレーズの音声)の接続

が同期的に行われるようにします。

関連 Issue

close #2197

その他

@sigprogramming sigprogramming requested a review from a team as a code owner August 6, 2024 11:39
@sigprogramming sigprogramming requested review from Hiroshiba and removed request for a team August 6, 2024 11:39
Copy link
Member

@sevenc-nanashi sevenc-nanashi left a comment

Choose a reason for hiding this comment

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

出先なので動作確認はできてませんがコード自体は大丈夫だと思います。

src/store/singing.ts Outdated Show resolved Hide resolved
Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

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

なるほどな設計でした!!!
いくつかコメントはしていますが、この設計でマージするのに賛成です!!

SYNC_TRACKS_AND_TRACK_CHANNEL_STRIPSを追加した部分や、RENDERを消した部分もう確認して、多分問題ないことを確認しました!

コメントにも書いてあるのですが、ちょっと組み合わせ爆発が起こりつつあるかもと感じました。
関数ごとにRENDER呼ぶか+SYNC呼ぶかを考える形になっているなと。
個人的にはwatchにできるところはそうしておいてあげると、これからコードを追加していきやすいかもと思いました。
(とはいえちょっと自信ないので今回はsync関数用意に賛成です!)

src/store/singing.ts Outdated Show resolved Hide resolved
src/store/singing.ts Show resolved Hide resolved
Comment on lines 288 to 292
// ChannelStripがある場合は接続する
const channelStrip = trackChannelStrips.get(trackId);
if (channelStrip != undefined) {
getOutputOfAudioSource(sequence).connect(channelStrip.input);
}
Copy link
Member

Choose a reason for hiding this comment

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

この処理はsync関数内にもあるのですが、2箇所にあることが自明ではないので、片方だけ変更してもう片方の変更が忘れることがありえるかもとちょっと思いました!

この辺AudioNodeとかをmock化して、undo/redo含めてVuexのテストを書きたいかもですね・・・。
VuexがDIできないので相当難しそうですが。。。。

src/store/singing.ts Show resolved Hide resolved
src/store/singing.ts Show resolved Hide resolved
src/store/singing.ts Show resolved Hide resolved
Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

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

LGTM!!!!

変更ありがとうございました!!!

@Hiroshiba Hiroshiba merged commit d9281e0 into VOICEVOX:main Aug 7, 2024
9 checks passed
@sigprogramming sigprogramming deleted the change_around_track_channel_strips branch August 8, 2024 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants