armory3d / armory3d/armory

Error when using sound and compiles for Browser.

Open
#1,829 9 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
3.3k
Forks
353
Avg merge
3d 16h
Merged PRs (30d)
1

Description

Thank you for contributing to Armory!

**Description**
Error when using sound and compiles for Browser.

Browser error:
localhost/:11 GET http://localhost:8040/build_TestSound2/debug/html5/kha.js net::ERR_ABORTED 404 (File not found)

Blender console error:
(node:3468) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, stat ...\TestSound2\build_TestSound2\debug\html5\hit0.ogg'

Does not export * .ogg sound, when manually copying this file it works.

When it compile for Krom, it works too.

**To Reproduce**
Create a new project, add Speaker - add sound, Play Sound in Logic and compile for Browser

**Expected behavior**
Nice if it worked the same as for Krom :)

Apple does not support * .ogg audio files (IOS audio does not work in the browser) please add the option to change from * .ogg to * .mp3

In the browser on Android, no sound can be heard when I use Logic -> Play Sound Node, it only works in Logic -> Play Speaker (with the "Stream" option on the speaker enabled).

It is possible to set the sounds volume in Logic?

**System**
Blender: 2.82a
Armory: 2020.09.0
OS: Windows 10 64
Graphics card: Radeon R9 200

**Test File**
[TestSound2.zip](https://github.com/armory3d/armory/files/5163185/TestSound2.zip)

*(drag & drop the zipped .blend file here)*

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the report with the attached TestSound2.zip in Blender 2.82a, following the Speaker and Logic → Play Sound browser workflow and comparing it with Krom and Play Speaker with Stream enabled. Inspect the browser build output and the reported missing hit0.ogg and kha.js paths first. Done means the browser build exports and loads the sound reliably; the MP3 option, Android playback, and volume request may need separate scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
blender
Domain
game-dev, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.