Skip to content

Conversation

@akikukeo
Copy link
Contributor

内容

文の途中から連続再生すると、次以降の文も途中から再生される問題を修正します。

本修正により、次以降の文は常に文頭から再生されます。

関連 Issue

close #2634

スクリーンショット・動画など

その他

@voicevox-preview-pages
Copy link

voicevox-preview-pages bot commented Dec 31, 2025

🚀 プレビュー用ページを作成しました 🚀

更新時点でのコミットハッシュ:ad4f165

@akikukeo akikukeo marked this pull request as ready for review December 31, 2025 16:37
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.

特に問題なさそう。

動作確認したらマージします。

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes issue #2634 where continuous playback starting from the middle of a sentence would cause subsequent sentences to also start playing from the same offset position instead of from the beginning. The fix resets the audio play start point to undefined (which means play from the beginning) when transitioning to a different audio item during continuous playback.

Key changes:

  • Added logic to reset the play start point when the audio key changes during continuous playback
  • The original play start point is preserved and restored after continuous playback completes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1847 to +1849
if (currentAudioKey !== e.audioKey) {
mutations.SET_AUDIO_PLAY_START_POINT({ startPoint: undefined });
}
Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

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

The logic to reset the audio play start point appears in both the playAudioBlob callback and the waitstart event listener. This creates redundancy since playstart (which calls playAudioBlob) always follows waitstart in the event flow. Consider removing the duplicate logic from one of these locations to improve maintainability. The reset in playAudioBlob should be sufficient since it's called whenever audio starts playing.

Suggested change
if (currentAudioKey !== e.audioKey) {
mutations.SET_AUDIO_PLAY_START_POINT({ startPoint: undefined });
}

Copilot uses AI. Check for mistakes.
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.

文の途中から連続再生すると、次以降の文も途中から再生される

2 participants