feat: add playback speed control (0.25x - 2x)

Implemented variable playback speed functionality:
- Added playbackRate state and ref to useMultiTrackPlayer (0.25x - 2x range)
- Applied playback rate to AudioBufferSourceNode.playbackRate
- Updated timing calculations to account for playback rate
- Real-time playback speed adjustment for active playback
- Dropdown UI control in PlaybackControls with preset speeds
- Integrated changePlaybackRate function through AudioEditor

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-20 07:35:39 +01:00
parent a47bf09a32
commit 9007522e18
3 changed files with 54 additions and 1 deletions

View File

@@ -300,6 +300,8 @@ export function AudioEditor() {
toggleLoop,
setLoopPoints,
setLoopFromSelection,
playbackRate,
changePlaybackRate,
} = useMultiTrackPlayer(tracks, masterVolume, handleAutomationRecording);
// Reset latch triggered state when playback stops
@@ -1983,6 +1985,8 @@ export function AudioEditor() {
loopEnd={loopEnd}
onToggleLoop={toggleLoop}
onSetLoopPoints={setLoopPoints}
playbackRate={playbackRate}
onPlaybackRateChange={changePlaybackRate}
/>
</div>
</div>