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

Make probing async #97

Open
devongovett opened this issue Sep 30, 2014 · 6 comments
Open

Make probing async #97

devongovett opened this issue Sep 30, 2014 · 6 comments

Comments

@devongovett
Copy link
Member

Basically, allow reading more data than just the first chunk we received. This is especially important for MP3, and in Node.js where the default chunk size is smaller.

See audiocogs/mp3.js#12

@fabslab
Copy link
Contributor

fabslab commented Sep 30, 2014

👍 seems like this has been the cause of a lot of streaming related issues aurora has received

@Pheo-Player
Copy link

Definitely the source of some headaches, and it'd be great to see this 'fixed'.

However, I can't think of a way that this would not be a breaking change to users. Do we want probe to return a promise? Then we'd probably need all API logic to return promises as well. While in my opinion that'd be actually a great thing to have, it's a. again, a breaking change and b. probably a lot of work. I'll be glad to help after trying to read into the source code some more.

@devongovett
Copy link
Member Author

I don't think the API would need to change at all, it would work just like the decoders do when there isn't enough data. When trying to read from a stream and there isn't enough data, an UnderflowError is thrown. This can be caught by the framework and the probing request can be retried when more data is available.

@Pheo-Player
Copy link

Makes sense! Is this commit 7e59806 related to this?

@devongovett
Copy link
Member Author

Kinda. I was going to mention that. That commit ignores errors while probing and goes to the next format instead of erroring completely.

@allphat
Copy link
Contributor

allphat commented Nov 6, 2014

Quick question : This should fix the no sound on small mp3 files ?
I m trying to read some relatively small mp3s (approx. 60s) but no sound and no errors too.

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

4 participants