mirror of
https://github.com/servo/servo.git
synced 2025-07-22 06:43:40 +01:00
Add support for multichannel decoded audio
This commit is contained in:
parent
795e7f6002
commit
f423ede07f
4 changed files with 113 additions and 21 deletions
|
@ -144,6 +144,10 @@ impl OfflineAudioContextMethods for OfflineAudioContext {
|
|||
task!(resolve: move || {
|
||||
let this = this.root();
|
||||
let processed_audio = processed_audio.lock().unwrap();
|
||||
let processed_audio: Vec<_> = processed_audio
|
||||
.chunks(this.length as usize)
|
||||
.map(|channel| channel.to_vec())
|
||||
.collect();
|
||||
let buffer = AudioBuffer::new(
|
||||
&this.global().as_window(),
|
||||
this.channel_count,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue