File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
use std:: any:: Any ;
2
- use std:: cell:: OnceCell ;
3
2
use std:: sync:: atomic:: { AtomicU32 , Ordering } ;
3
+ use std:: sync:: OnceLock ;
4
4
5
5
use rubato:: { FftFixedInOut , Resampler as _} ;
6
6
@@ -126,7 +126,7 @@ pub struct WaveShaperNode {
126
126
/// Infos about audio node channel configuration
127
127
channel_config : ChannelConfig ,
128
128
/// distortion curve
129
- curve : OnceCell < Vec < f32 > > ,
129
+ curve : OnceLock < Vec < f32 > > ,
130
130
/// oversample type
131
131
oversample : AtomicU32 ,
132
132
}
@@ -174,7 +174,7 @@ impl WaveShaperNode {
174
174
let node = Self {
175
175
registration,
176
176
channel_config : channel_config. into ( ) ,
177
- curve : OnceCell :: new ( ) ,
177
+ curve : OnceLock :: new ( ) ,
178
178
oversample : AtomicU32 :: new ( oversample as u32 ) ,
179
179
} ;
180
180
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ fn ensure_send_sync_static() {
37
37
context. create_periodic_wave ( web_audio_api:: PeriodicWaveOptions :: default ( ) ) ,
38
38
) ;
39
39
require_send_sync_static ( context. create_stereo_panner ( ) ) ;
40
+ require_send_sync_static ( context. create_wave_shaper ( ) ) ;
40
41
41
42
// Available nodes for online AudioContext
42
43
let media_track = web_audio_api:: media_streams:: MediaStreamTrack :: from_iter ( vec ! [ ] ) ;
You can’t perform that action at this time.
0 commit comments