stride3d / stride3d/stride

[Assets] AssetCompiler uses spatialized flag for channel count

Open
#1,944 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Version: 4.1.0.1

Describe the bug
Instead of detecting the channel count from the audio file, or as an explicit import option, the spatialized flag is used to set the channel count to 1 if true, 2 if false.

To Reproduce
Steps to reproduce the behavior:

  1. Import a mono wav file without the "spatialized" flag set.
  2. Try to play from an Audio emitter component
  3. It will give you an exception that the channel count is greater than 1

Expected behavior
A mono file will be imported with a channel count of 1.

Screenshots
If applicable, add screenshots to help explain your problem (use GitHub drag & drop)

Log and callstacks
This is caused by SoundAssetCompiler.DoCommandOverride, line 54.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at SoundAssetCompiler.DoCommandOverride, identified at line 54, and trace how the spatialized flag determines the imported channel count. Reproduce the issue by importing a mono WAV without spatialized enabled and playing it from an Audio emitter component. Done means the mono file is imported with one channel and does not raise the channel-count exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.