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

Minor WebAudio fixes #21906

Merged
merged 2 commits into from Oct 11, 2018
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

Handle case when OfflineAudioContext doesn't receive all the buffers

  • Loading branch information
Manishearth committed Oct 10, 2018
commit ceb2cd2279e06449fb4f98d7f95b39832384f0c2
@@ -151,10 +151,14 @@ impl OfflineAudioContextMethods for OfflineAudioContext {
task!(resolve: move || {
let this = this.root();
let processed_audio = processed_audio.lock().unwrap();
let processed_audio: Vec<_> = processed_audio
let mut processed_audio: Vec<_> = processed_audio
.chunks(this.length as usize)
.map(|channel| channel.to_vec())
.collect();
// it can end up being empty if the task failed
if processed_audio.len() != this.length as usize {
processed_audio.resize(this.length as usize, Vec::new())
}
let buffer = AudioBuffer::new(
&this.global().as_window(),
this.channel_count,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.