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

192kHz/24bit #7

Closed
auroranockert opened this issue Apr 10, 2013 · 10 comments
Closed

192kHz/24bit #7

auroranockert opened this issue Apr 10, 2013 · 10 comments

Comments

@auroranockert
Copy link
Contributor

Apparently there is some bug in the 192kHz/24bit support, I didn't get more information than that. We should test it at some point.

@satazor
Copy link

satazor commented Aug 12, 2013

There's a comment in the code saying that it requires 64 integer bits, which JS doesn't have. Is there any workaround for this?

@auroranockert
Copy link
Contributor Author

You could implement 64-bit integers using double-double arithmetic, I think.

On 12 Aug 2013, at 14:15, André Cruz [email protected] wrote:

There's a comment in the code saying that it requires 64 integer bits. Is there any workaround for this?


Reply to this email directly or view it on GitHub.

@mattberkowitz
Copy link
Contributor

I saw a couple implementations when I briefly looked into this in conjunction with seek tables. http://docs.closure-library.googlecode.com/git/class_goog_math_Long.html seemed like a viable starting point (http://stackoverflow.com/questions/6041124/javascript-typed-arrays-64-bit-integers suggests there are no external dependencies)

@devongovett
Copy link
Member

24-bit files are now fully supported as of 53e3f7c along with the fixes described in #15.

I tried using google's Long library, but it was way too slow, causing files playing back to use over 80% CPU. This is because it creates so many objects, rather than mutating the existing ones. I pulled out some stuff we needed, and made some optimizations based on assumptions we can make that the general purpose math library cannot. See comments in the code for details.

Performance isn't bad. I'm seeing around 6-8% CPU usage on average for the 24-bit files I've tested (in the latest Chrome on Mac). This isn't that much higher than 16-bit FLAC files on average, though the multiply_add function I added does show up first on a profile. Anyway, this impact was to be expected, at least it works. 😄

@Pheo-Player
Copy link

Just want to ask: Is the performance of 16bit files going to be affected by this update at all? Other than that, badass work.

@devongovett
Copy link
Member

Nope, shouldn't be affected. 16-bit files use the exact same code as before.

@fabslab
Copy link

fabslab commented Sep 1, 2014

seems like the demo site is still running into this error, does it need updating? http://audiocogs.org/codecs/flac/

@philkunz
Copy link

any update here?
just tried the npm version on node and 16bit plays fine, but 24bit fails.

@devongovett
Copy link
Member

npm version should work. what was the file you tried to play? not sure if the website got updated.

@philkunz
Copy link

about the testfiles:
24bit/96kHz encoded in flac, will retry with 192kHz, just saw the samplerate from all the files differ from 192kHz mentioned in the title...

@devongovett Do you have a Cloud9 account? If yes, mail me your username to [email protected], so I can give you access to a Cloud9 space that has the testfiles and a browserified test ready for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants