mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 18:33:33 +00:00
[bugfix]: Validate audio sample range, catch AudioContext error (#470)
This commit is contained in:
parent
3bca85b3a8
commit
5f1d0a3b5e
4 changed files with 32 additions and 8 deletions
|
|
@ -251,6 +251,7 @@ export interface SettingsState {
|
|||
export interface SettingsSlice extends SettingsState {
|
||||
actions: {
|
||||
reset: () => void;
|
||||
resetSampleRate: () => void;
|
||||
setSettings: (data: Partial<SettingsState>) => void;
|
||||
setSidebarItems: (items: SidebarItemType[]) => void;
|
||||
setTable: (type: TableType, data: DataTableProps) => void;
|
||||
|
|
@ -567,6 +568,11 @@ export const useSettingsStore = create<SettingsSlice>()(
|
|||
set(initialState);
|
||||
}
|
||||
},
|
||||
resetSampleRate: () => {
|
||||
set((state) => {
|
||||
state.playback.mpvProperties.audioSampleRateHz = 0;
|
||||
});
|
||||
},
|
||||
setSettings: (data) => {
|
||||
set({ ...get(), ...data });
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue