mirror of
https://github.com/kaythomas0/noisedash.git
synced 2025-11-15 04:38:00 +00:00
Fix preview sample loop points bug
This commit is contained in:
@@ -852,6 +852,7 @@
|
|||||||
v-model="previewSampleLoopPointsEnabled"
|
v-model="previewSampleLoopPointsEnabled"
|
||||||
:disabled="previewSamplePlaying"
|
:disabled="previewSamplePlaying"
|
||||||
label="Use Loop Points"
|
label="Use Loop Points"
|
||||||
|
@change="updatePreviewSampleLoopPoints"
|
||||||
/>
|
/>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
|
|||||||
@@ -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 () {
|
previewSample () {
|
||||||
if (this.previewSamplePlaying) {
|
if (this.previewSamplePlaying) {
|
||||||
this.previewSamplePlaying = false
|
this.previewSamplePlaying = false
|
||||||
|
|||||||
Reference in New Issue
Block a user