@@ -401,7 +401,6 @@ impl AudioBufferSourceRenderer {
401401 ControlMessage :: LoopEnd ( loop_end) => self . loop_state . end = * loop_end,
402402 }
403403
404- // @todo -
405404 self . clamp_loop_boundaries ( ) ;
406405 }
407406
@@ -427,7 +426,7 @@ impl AudioBufferSourceRenderer {
427426impl AudioProcessor for AudioBufferSourceRenderer {
428427 fn process (
429428 & mut self ,
430- _inputs : & [ AudioRenderQuantum ] , // no input...
429+ _inputs : & [ AudioRenderQuantum ] , // This node has no input
431430 outputs : & mut [ AudioRenderQuantum ] ,
432431 params : AudioParamValues < ' _ > ,
433432 scope : & AudioWorkletGlobalScope ,
@@ -525,10 +524,7 @@ impl AudioProcessor for AudioBufferSourceRenderer {
525524 // For now we just consider that we can go fast track if loop points are
526525 // bound to the buffer boundaries.
527526 //
528- // by default loop_end is equal to buffer_duration, so loop_start = 0 &&
529- // loop_end = buffer.duration should go to fast track
530-
531- // @todo - test loop_end against 0 too, semantics is loop_end as not been changed
527+ // By default, cf. clamp_loop_boundaries, loop_start == 0 && loop_end == buffer_duration,
532528 if loop_start != 0. || loop_end != buffer_duration {
533529 self . render_state . is_aligned = false ;
534530 }
@@ -624,8 +620,7 @@ impl AudioProcessor for AudioBufferSourceRenderer {
624620 if is_looping {
625621 if loop_start >= 0. && loop_end > 0. && loop_start < loop_end {
626622 actual_loop_start = loop_start;
627- // @todo - min is not required loop_end is already clamped
628- actual_loop_end = loop_end. min ( buffer_duration) ;
623+ actual_loop_end = loop_end;
629624 } else {
630625 actual_loop_start = 0. ;
631626 actual_loop_end = buffer_duration;
0 commit comments