Comments (3)
I'm going to guess the correct fix here is to either move the !_format check earlier in the function, or insert a few extra "if zero don't blow up" checks, but before I blindly go changing code, do you have an example of an unsupported wave file I could repro this bug with?
from tinyoal.
http://www.nch.com.au/acm/11kadpcm.wav I was able to replicate the issue with this file, which is listed on the Wikipedia page for WAV, https://en.wikipedia.org/wiki/WAV#WAV_file_audio_coding_formats_compared hope that helps narrow it down :)
from tinyoal.
This bug turns out to be a bit more subtle than I anticipated. While the format itself is technically not supported, it actually is a valid format. The real bug here is that all formats with less than 8 bits per sample will divide by zero. This was fixed by forcing the byte calculation to work in terms of bits, and only convert down to bytes afterwards. I wasn't able to do this elsewhere due to precision concerns, but TinyOAL doesn't support any 4 bit formats anyway.
In addition to this, I've added a few checks to prevent any divide by zeros that might occur from null format data.
from tinyoal.
Related Issues (3)
- 3d audio support HOT 1
- arm support ? HOT 4
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 tinyoal.