[Assets] AssetCompiler uses spatialized flag for channel count
Nobody has claimed this yet.
- 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:
- Import a mono wav file without the "spatialized" flag set.
- Try to play from an Audio emitter component
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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