Fix preview sample loop points bug

This commit is contained in:
Kevin Thomas
2022-07-24 13:38:28 -07:00
parent c2aad26e3f
commit 496b71ee7b
2 changed files with 8 additions and 0 deletions

View File

@@ -852,6 +852,7 @@
v-model="previewSampleLoopPointsEnabled"
:disabled="previewSamplePlaying"
label="Use Loop Points"
@change="updatePreviewSampleLoopPoints"
/>
</v-row>

View File

@@ -652,6 +652,13 @@ export default {
}
})
},
updatePreviewSampleLoopPoints () {
if (this.previewSampleLoopPointsEnabled) {
this.samplePreviewPlayer.setLoopPoints(this.previewSampleLoopStart, this.previewSampleLoopEnd)
} else {
this.samplePreviewPlayer.setLoopPoints(0, this.samplePreviewPlayer.buffer.duration)
}
},
previewSample () {
if (this.previewSamplePlaying) {
this.previewSamplePlaying = false