refactor: split soundtrack chapter and drive commands
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { AudioJourneyState } from '@/audio/types';
|
||||
import type { ChapterIntent } from '@/audio/types';
|
||||
|
||||
export const SOUNDTRACK_SAMPLE_RATE = 48_000;
|
||||
export const MUSIC_BPM = 86;
|
||||
@@ -25,7 +25,7 @@ export type InitialPlayback =
|
||||
| { readonly kind: 'intro' }
|
||||
| { readonly kind: 'main'; readonly offsetSeconds: number };
|
||||
|
||||
export function resolveInitialPlayback(state: AudioJourneyState): InitialPlayback {
|
||||
export function resolveInitialPlayback(state: ChapterIntent): InitialPlayback {
|
||||
return state.atStart
|
||||
? { kind: 'intro' }
|
||||
: { kind: 'main', offsetSeconds: mainPhraseOffsetSeconds(state.entryPhrase) };
|
||||
|
||||
Reference in New Issue
Block a user