decord/alpha/source/modules/checkpoint/native/useCheckpointSound.tsx
github-actions 72019a2d0c chore: update source for alpha 348.4
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5014.js (118.4 MB)
2026-09-25 08:38:05 +00:00

43 lines
1.3 KiB
TypeScript

// Module ID: 15225
// Function ID: 15226
// Name: useCheckpointSound
// Dependencies: [19, 15220, 504, 9346, 2]
// Exports: default
// Module 15225 (useCheckpointSound)
import SoundUtils from "SoundUtils" /* 9346 */;
import noop from "module_19" /* 19 */;
import CheckpointStore from "CheckpointStore" /* 15220 */;
import size from "module_2" /* 2 */;
const require = globalThis.__r;
({ useCallback: c2, useEffect: c3, useRef: closure_4 } = noop);
const result = size.fileFinishedImporting("modules/checkpoint/native/useCheckpointSound.tsx");
export default function useCheckpointSound(arg0) {
_require = arg0;
const items = [CheckpointStore];
stateFromStores = require("initialize").useStateFromStores(items, () => isMuted.isMuted);
let obj = require("initialize");
closure_3(() => () => {
const current = ref.current;
let stopResult;
if (current != null) {
stopResult = current.stop();
}
return stopResult;
}, []);
const items1 = [stateFromStores, arg0];
return closure_4(null)(() => {
if (!stateFromStores) {
const current = ref.current;
if (current != null) {
current.stop();
}
ref.current = SoundUtils.createSound(closure_0, "vibing_wumpus");
const current2 = tmp.current;
current2.play();
}
}, items1);
};