Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem importing wav file #9

Open
TheInfinityUser opened this issue Jun 2, 2023 · 1 comment
Open

Problem importing wav file #9

TheInfinityUser opened this issue Jun 2, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@TheInfinityUser
Copy link

The WAV file
A wav file which cannot be played by Media Player but interestingly on uploading it can be played on Chrome and Discord, when imported to Unity, I get this error,

Errors during import of AudioClip Assets/Weapons1.wav:
FSBTool ERROR: The format of the source file is invalid, see output for details.
FSBTool ERROR: Internal error from FMOD sub-system.

I tried ffprobe on the wav file and I got the following,

[wav @ 000002096b740900] Packet corrupt (stream = 0, dts = NOPTS).
[wav @ 000002096b740900] Estimating duration from bitrate, this may be inaccurate
Input #0, wav, from 'Adamant Sniper Rifle_shoot.wav':
Duration: 00:00:01.62, bitrate: 705 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 1 channels, s16, 705 kb/s]

Is there any tool to fix the wav file so that fmod can import it or any setting that would allow fmod to import the file?

@SamboyCoding
Copy link
Owner

ffmpeg should be able to trivially repair it, something along the lines of ffmpeg -i Weapons1.wav Weapons1_fixed.wav should re-encode it. That said, ideally this wouldn't happen at all, but it's very strange in general because the wav writing code should be tried-and-tested from libraries designed for it - it's not my own implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants