Skip to content

Commit

Permalink
Use the audio store in 404 view
Browse files Browse the repository at this point in the history
Fix view props migrated to Pinia

ref #512
  • Loading branch information
frostburn committed Dec 21, 2023
1 parent b3b1daf commit 6504011
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions src/views/NotFoundView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type { Scale } from 'scale-workshop-core'
import { nextTick, ref } from 'vue'
import { useRouter, type LocationQuery } from 'vue-router'
import { version } from '../../package.json'
import { useAudioStore } from '@/stores/audio'
const props = defineProps<{
scaleName: string
Expand All @@ -26,17 +27,6 @@ const props = defineProps<{
equaveShift: number
degreeShift: number
waveform: string
attackTime: number
decayTime: number
sustainLevel: number
releaseTime: number
pingPongDelayTime: number
pingPongFeedback: number
pingPongSeparation: number
pingPongGain: number
}>()
const emit = defineEmits(['update:scale', 'update:scaleName'])
Expand All @@ -45,6 +35,8 @@ const ritualInProgress = ref(false)
const router = useRouter()
const audio = useAudioStore()
function openTheGates(scale: Scale) {
emit('update:scale', scale)
Expand All @@ -64,16 +56,16 @@ function openTheGates(scale: Scale) {
equaveShift: props.equaveShift,
degreeShift: props.degreeShift,
waveform: props.waveform,
attackTime: props.attackTime,
decayTime: props.decayTime,
sustainLevel: props.sustainLevel,
releaseTime: props.releaseTime,
waveform: audio.waveform,
attackTime: audio.attackTime,
decayTime: audio.decayTime,
sustainLevel: audio.sustainLevel,
releaseTime: audio.releaseTime,
pingPongDelayTime: props.pingPongDelayTime,
pingPongFeedback: props.pingPongFeedback,
pingPongSeparation: props.pingPongSeparation,
pingPongGain: props.pingPongGain
pingPongDelayTime: audio.pingPongDelayTime,
pingPongFeedback: audio.pingPongFeedback,
pingPongSeparation: audio.pingPongSeparation,
pingPongGain: audio.pingPongGain
}
const query = encodeQuery(state) as LocationQuery
Expand Down

0 comments on commit 6504011

Please sign in to comment.