crashing from wav file size i think

This commit is contained in:
2026-04-08 00:48:05 -06:00
parent 56be227245
commit 38ca9cfbad
5 changed files with 303 additions and 120 deletions

View File

@ -55,6 +55,8 @@ interface EditorActions {
getWordAtTime: (time: number) => number;
loadProject: (projectData: any) => void;
reset: () => void;
pauseUndo: () => void;
resumeUndo: () => void;
}
const initialState: EditorState = {
@ -327,6 +329,22 @@ export const useEditorStore = create<EditorState & EditorActions>()(
},
reset: () => set(initialState),
pauseUndo: () => {
// Access the temporal store through the useEditorStore
const temporalStore = (useEditorStore as any).temporal;
if (temporalStore) {
temporalStore.getState().pause();
}
},
resumeUndo: () => {
// Access the temporal store through the useEditorStore
const temporalStore = (useEditorStore as any).temporal;
if (temporalStore) {
temporalStore.getState().resume();
}
},
}),
{ limit: 100 },
),