Comments (9)
I've done some testing, and it seems as if wav files with 24 bps don't play properly, while the ones with 16 bps have no problem.
Maybe that helps in finding the bug.
I will continue my research.
from gdscriptaudioimport.
Hi, could you try to send/post the file via a third party service? I recommend https://tmp.ninja/ since it has a 10gb limit.
Looks like an error in the parsing, since it expects the wav files to have the same structure. This could help to adapt the parsing to different pre-data chunk sizes, so it will be very helpful
from gdscriptaudioimport.
Ah right I have mega, l'll share it via there
I do think it has to do with the header. I also tried porting the built-in parser to gdscript but that's really slow
from gdscriptaudioimport.
It seems to sometimes happen with music downloaded as wav with youtubedl
re-exporting it with audacity fixes the issue
from gdscriptaudioimport.
I've done some testing, and it seems as if wav files with 24 bps don't play properly, while the ones with 16 bps have no problem.
Maybe that helps in finding the bug.
I will continue my research.
Makes sense since the bitrate is not handled in the current version, just printed out. See lines 118 and 119. I added a "TODO" in the comments
Also, as mentioned in #7 , the format code "3" , which seems to be for 24bit audio is not handled yet.
from gdscriptaudioimport.
When loading the 24bps wav file directly into a Godot AudioPlayer node everything plays fine, although the stream in GD source code seems to not handle format code "3": https://github.com/godotengine/godot/blob/master/scene/resources/audio_stream_sample.cpp#L368
from gdscriptaudioimport.
Yup, I've been checking the Godot ResourceImporter code, and it automatically converts bitrates greater than 16bit to 16bit. See lines 289 and below https://github.com/godotengine/godot/blob/a02620f3a5f3b94c68dfbe18874b34ac1c32374a/editor/import/resource_importer_wav.cpp
The file mentioned in #7 is 32bit and when imported with the built-in resource importer it's converted to 16bit.
I assume they did not cover this since they expected users to always use the built-in resource importer
from gdscriptaudioimport.
This might have been fixed by #13 . Awaiting confirmation!
from gdscriptaudioimport.
Works like a charm. Nearly my whole wav-library can be played back now. Thanks a lot.
However, I found some that don't play. Somehow, the data-part of "those4bytes" seems empty.
https://drive.proton.me/urls/FDQ71VN5WC#zIZqoIAFgZ1n
from gdscriptaudioimport.
Related Issues (13)
- [FIX] Longer wav files don't work HOT 2
- Noise instead of sound in many wav files HOT 4
- Add some tags to the project to make it easier to find via GitHub search HOT 1
- Make extensions case-insensitive to handle .MP3, not only mp3
- help
- wrong calculations of loop_end (assuming 4 bytes per sample)
- Update for godot 4 HOT 1
- ogg doesn't always start HOT 1
- mp3 support HOT 1
- The parsed format code is 3, so it doesn't work HOT 1
- unable to put newstream.data into $AudioStreamPlayer.stream and play it manually
- In-memory based parsing and some appreciation. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gdscriptaudioimport.