summaryrefslogtreecommitdiff
path: root/apps/web/src/sounds/sounds-store.ts
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/src/sounds/sounds-store.ts')
-rw-r--r--apps/web/src/sounds/sounds-store.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/web/src/sounds/sounds-store.ts b/apps/web/src/sounds/sounds-store.ts
index b9b3f070..13ced962 100644
--- a/apps/web/src/sounds/sounds-store.ts
+++ b/apps/web/src/sounds/sounds-store.ts
@@ -4,6 +4,7 @@ import { storageService } from "@/services/storage/service";
import { toast } from "sonner";
import { EditorCore } from "@/core";
import { buildLibraryAudioElement } from "@/timeline/element-utils";
+import { mediaTimeFromSeconds } from "@/wasm";
interface SoundsStore {
topSoundEffects: SoundEffect[];
@@ -227,7 +228,7 @@ export const useSoundsStore = create<SoundsStore>((set, get) => ({
const element = buildLibraryAudioElement({
sourceUrl: audioUrl,
name: sound.name,
- duration: sound.duration,
+ duration: mediaTimeFromSeconds({ seconds: sound.duration }),
startTime: currentTime,
buffer,
});