@@ -1110,8 +1110,8 @@ impl AudioParamProcessor {
1110
1110
1111
1111
if infos. is_a_rate {
1112
1112
let start_index = self . buffer . len ( ) ;
1113
- // we need to ` round()` because if `end_time` is between two samples
1114
- // we actually want the sample before `end_time` to be computed
1113
+ // TODO use ceil() or round() when `end_time` is between two samples?
1114
+ // <https://github.com/orottier/web-audio-api-rs/pull/460>
1115
1115
let end_index = ( ( end_time - infos. block_time ) . max ( 0. ) / infos. dt ) . round ( ) as usize ;
1116
1116
let end_index_clipped = end_index. min ( infos. count ) ;
1117
1117
@@ -1212,8 +1212,8 @@ impl AudioParamProcessor {
1212
1212
1213
1213
if infos. is_a_rate {
1214
1214
let start_index = self . buffer . len ( ) ;
1215
- // we need to ` round()` because if `end_time` is between two samples
1216
- // we actually want the sample before `end_time` to be computed
1215
+ // TODO use ceil() or round() when `end_time` is between two samples?
1216
+ // <https://github.com/orottier/web-audio-api-rs/pull/460>
1217
1217
let end_index = ( ( end_time - infos. block_time ) . max ( 0. ) / infos. dt ) . round ( ) as usize ;
1218
1218
let end_index_clipped = end_index. min ( infos. count ) ;
1219
1219
@@ -1337,8 +1337,8 @@ impl AudioParamProcessor {
1337
1337
1338
1338
if infos. is_a_rate {
1339
1339
let start_index = self . buffer . len ( ) ;
1340
- // we need to ` round()` because if `end_time` is between two samples
1341
- // we actually want the sample before `end_time` to be computed
1340
+ // TODO use ceil() or round() when `end_time` is between two samples?
1341
+ // <https://github.com/orottier/web-audio-api-rs/pull/460>
1342
1342
let end_index = ( ( end_time - infos. block_time ) . max ( 0. ) / infos. dt ) . round ( ) as usize ;
1343
1343
let end_index_clipped = end_index. min ( infos. count ) ;
1344
1344
@@ -1437,8 +1437,8 @@ impl AudioParamProcessor {
1437
1437
1438
1438
if infos. is_a_rate {
1439
1439
let start_index = self . buffer . len ( ) ;
1440
- // we need to ` round()` because if `end_time` is between two samples
1441
- // we actually want the sample before `end_time` to be computed
1440
+ // TODO use ceil() or round() when `end_time` is between two samples?
1441
+ // <https://github.com/orottier/web-audio-api-rs/pull/460>
1442
1442
let end_index = ( ( end_time - infos. block_time ) . max ( 0. ) / infos. dt ) . round ( ) as usize ;
1443
1443
let end_index_clipped = end_index. min ( infos. count ) ;
1444
1444
0 commit comments