Skip to content

Commit f29d8f3

Browse files
committed
fix: absurdly large sample rate in tests
1 parent ac50a0b commit f29d8f3

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/node/delay.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ mod tests {
669669

670670
#[test]
671671
fn test_audioparam_value_applies_immediately() {
672-
let context = OfflineAudioContext::new(1, 128, 48000.);
672+
let context = OfflineAudioContext::new(1, 128, 48_000.);
673673
let options = DelayOptions {
674674
delay_time: 0.12,
675675
..Default::default()
@@ -681,7 +681,7 @@ mod tests {
681681
#[test]
682682
fn test_sample_accurate() {
683683
for delay_in_samples in [128., 131., 197.].iter() {
684-
let sample_rate = 48000.;
684+
let sample_rate = 48_000.;
685685
let mut context = OfflineAudioContext::new(1, 256, sample_rate);
686686

687687
let delay = context.create_delay(2.);
@@ -710,7 +710,7 @@ mod tests {
710710
fn test_sub_sample_accurate() {
711711
{
712712
let delay_in_samples = 128.5;
713-
let sample_rate = 48000.;
713+
let sample_rate = 48_000.;
714714
let mut context = OfflineAudioContext::new(1, 256, sample_rate);
715715

716716
let delay = context.create_delay(2.);
@@ -737,7 +737,7 @@ mod tests {
737737

738738
{
739739
let delay_in_samples = 128.8;
740-
let sample_rate = 48000.;
740+
let sample_rate = 48_000.;
741741
let mut context = OfflineAudioContext::new(1, 256, sample_rate);
742742

743743
let delay = context.create_delay(2.);
@@ -766,7 +766,7 @@ mod tests {
766766
#[test]
767767
fn test_multichannel() {
768768
let delay_in_samples = 128.;
769-
let sample_rate = 48000.;
769+
let sample_rate = 48_000.;
770770
let mut context = OfflineAudioContext::new(2, 2 * 128, sample_rate);
771771

772772
let delay = context.create_delay(2.);
@@ -799,7 +799,7 @@ mod tests {
799799
#[test]
800800
fn test_input_number_of_channels_change() {
801801
let delay_in_samples = 128.;
802-
let sample_rate = 48000.;
802+
let sample_rate = 48_000.;
803803
let mut context = OfflineAudioContext::new(2, 3 * 128, sample_rate);
804804

805805
let delay = context.create_delay(2.);
@@ -843,7 +843,7 @@ mod tests {
843843
fn test_node_stays_alive_long_enough() {
844844
// make sure there are no hidden order problem
845845
for _ in 0..10 {
846-
let sample_rate = 48000.;
846+
let sample_rate = 48_000.;
847847
let mut context = OfflineAudioContext::new(1, 5 * 128, sample_rate);
848848

849849
// Set up a source that starts only after 5 render quanta.
@@ -878,7 +878,7 @@ mod tests {
878878
#[test]
879879
fn test_subquantum_delay() {
880880
for i in 0..128 {
881-
let sample_rate = 48000.;
881+
let sample_rate = 48_000.;
882882
let mut context = OfflineAudioContext::new(1, 128, sample_rate);
883883

884884
let delay = context.create_delay(1.);
@@ -905,7 +905,7 @@ mod tests {
905905

906906
#[test]
907907
fn test_min_delay_when_in_loop() {
908-
let sample_rate = 480000.;
908+
let sample_rate = 48_000.;
909909
let mut context = OfflineAudioContext::new(1, 256, sample_rate);
910910

911911
let delay = context.create_delay(1.);
@@ -942,7 +942,7 @@ mod tests {
942942
// that everything works even if order of processing is not guaranteed
943943
// (i.e. when delay is in a loop)
944944
for _ in 0..10 {
945-
let sample_rate = 480000.;
945+
let sample_rate = 48_000.;
946946
let mut context = OfflineAudioContext::new(1, 256, sample_rate);
947947

948948
// this will be internally clamped to 128 * sample_rate
@@ -984,7 +984,7 @@ mod tests {
984984

985985
// set delay and max delay time exactly 1 render quantum
986986
{
987-
let sample_rate = 48000.;
987+
let sample_rate = 48_000.;
988988
let mut context = OfflineAudioContext::new(1, 256, sample_rate);
989989

990990
let delay = context.create_delay(1.);
@@ -1010,7 +1010,7 @@ mod tests {
10101010

10111011
// set delay and max delay time exactly 2 render quantum
10121012
{
1013-
let sample_rate = 48000.;
1013+
let sample_rate = 48_000.;
10141014
let mut context = OfflineAudioContext::new(1, 3 * 128, sample_rate);
10151015

10161016
let delay = context.create_delay(2.);
@@ -1037,7 +1037,7 @@ mod tests {
10371037

10381038
#[test]
10391039
fn test_subquantum_delay_dynamic_lifetime() {
1040-
let sample_rate = 48000.;
1040+
let sample_rate = 48_000.;
10411041
let mut context = OfflineAudioContext::new(1, 3 * 128, sample_rate);
10421042

10431043
// Setup a source that emits for 120 frames, so it deallocates after the first render

0 commit comments

Comments
 (0)