File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ use std::sync::OnceLock;
1515const SAMPLE_RATE : f32 = 48000. ;
1616const DURATION : usize = 10 ;
1717const SAMPLES : usize = SAMPLE_RATE as usize * DURATION ;
18+ const SAMPLES_SHORT : usize = SAMPLE_RATE as usize ; // only 1 second for heavy benchmarks
1819
1920/// Load an audio buffer and cache the result
2021///
@@ -220,7 +221,7 @@ pub fn bench_analyser_node() {
220221}
221222
222223pub fn bench_hrtf_panners ( ) {
223- let ctx = OfflineAudioContext :: new ( 2 , black_box ( SAMPLES ) , SAMPLE_RATE ) ;
224+ let ctx = OfflineAudioContext :: new ( 2 , black_box ( SAMPLES_SHORT ) , SAMPLE_RATE ) ;
224225
225226 let mut panner1 = ctx. create_panner ( ) ;
226227 panner1. set_panning_model ( PanningModelType :: HRTF ) ;
@@ -237,7 +238,7 @@ pub fn bench_hrtf_panners() {
237238 osc. connect ( & panner2) ;
238239 osc. start ( ) ;
239240
240- assert_eq ! ( ctx. start_rendering_sync( ) . length( ) , SAMPLES ) ;
241+ assert_eq ! ( ctx. start_rendering_sync( ) . length( ) , SAMPLES_SHORT ) ;
241242}
242243
243244#[ cfg( feature = "iai" ) ]
You can’t perform that action at this time.
0 commit comments