File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
shared-module/audiodelays Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -287,7 +287,7 @@ audioio_get_buffer_result_t audiodelays_pitch_shift_get_buffer(audiodelays_pitch
287
287
288
288
// Read sample from buffer
289
289
int32_t word = (int32_t )window_buffer [read_index + window_size * buf_offset ];
290
-
290
+
291
291
// Check if we're within the overlap range and mix buffer sample with overlap sample
292
292
if (overlap_size && read_overlap_offset > 0 && read_overlap_offset <= overlap_size ) {
293
293
// Apply volume based on overlap position to buffer sample
@@ -316,21 +316,27 @@ audioio_get_buffer_result_t audiodelays_pitch_shift_get_buffer(audiodelays_pitch
316
316
hword_buffer [i ] = (uint8_t )mixed ^ 0x80 ;
317
317
}
318
318
}
319
-
319
+
320
320
if (self -> base .channel_count == 1 || buf_offset ) {
321
321
// Increment window buffer write pointer
322
322
self -> window_index ++ ;
323
- if (self -> window_index >= window_size ) self -> window_index = 0 ;
323
+ if (self -> window_index >= window_size ) {
324
+ self -> window_index = 0 ;
325
+ }
324
326
325
327
// Increment overlap buffer pointer
326
328
if (overlap_size ) {
327
329
self -> overlap_index ++ ;
328
- if (self -> overlap_index >= overlap_size ) self -> overlap_index = 0 ;
330
+ if (self -> overlap_index >= overlap_size ) {
331
+ self -> overlap_index = 0 ;
332
+ }
329
333
}
330
334
331
335
// Increment window buffer read pointer by rate
332
336
self -> read_index += self -> read_rate ;
333
- if (self -> read_index >= window_size << PITCH_READ_SHIFT ) self -> read_index -= window_size << PITCH_READ_SHIFT ;
337
+ if (self -> read_index >= window_size << PITCH_READ_SHIFT ) {
338
+ self -> read_index -= window_size << PITCH_READ_SHIFT ;
339
+ }
334
340
}
335
341
}
336
342
You can’t perform that action at this time.
0 commit comments