From fb020d6dbb9fc56549abae372051f6e43ef35800 Mon Sep 17 00:00:00 2001 From: Lajos Meszaros Date: Wed, 13 Sep 2023 23:44:38 +0200 Subject: [PATCH] fix(Audio): restore extension after filename --- src/Audio.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Audio.ts b/src/Audio.ts index 34ccde72..f8a3dc1c 100644 --- a/src/Audio.ts +++ b/src/Audio.ts @@ -30,6 +30,9 @@ export class Audio { constructor(props: AudioConstructorProps) { this.filename = props.filename + if (!this.filename.toLowerCase().endsWith('.wav')) { + this.filename += '.wav' + } this.isNative = props.isNative ?? true this.sourcePath = props.sourcePath this.type = props.type ?? 'sfx'