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

Fix a bug with AudioBufferSourceNode #652

Merged
merged 1 commit into from
Dec 4, 2016
Merged

Conversation

fabioelia
Copy link
Contributor

#226

It seems as though AudioBufferSourceNode can get caught in cases where the seek and duration are negative
"Failed to execute 'start' on 'AudioBufferSourceNode': The duration provided (-0.17) is less than the minimum bound (0)"

We can protect this by defaulting to 0 when we seek or set a duration below 0.

goldfire#226

It seems as though AudioBufferSourceNode can get caught in cases where the seek and duration are negative 
"Failed to execute 'start' on 'AudioBufferSourceNode': The duration provided (-0.17) is less than the minimum bound (0)"

We can protect this by defaulting to 0 when we seek or set a duration below 0.
@fabioelia
Copy link
Contributor Author

Hey @goldfire this could get merged in at some point.
Currently monkey patching it for our project.

Thanks

@goldfire
Copy link
Owner

This should technically never happen, so I'm wondering if we've got another issue elsewhere leading to this. Do we know any scenarios that can cause this?

@fabioelia
Copy link
Contributor Author

I wasn't able to trace out where the negative values originate from.
It seems as though the Phaser library hit the same problems as well
phaserjs/phaser#2351

I'll look further into it as well

@goldfire
Copy link
Owner

goldfire commented Dec 4, 2016

We've been seeing this with CasinoRPG as well and it just seems to be very edge-case timing issues. I haven't found a good solution other than what you've got in this PR, so I'm going to go ahead and merge it.

@goldfire goldfire merged commit bbcbc2b into goldfire:2.0 Dec 4, 2016
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

Successfully merging this pull request may close these issues.

2 participants