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
287287
288288 // Read sample from buffer
289289 int32_t word = (int32_t )window_buffer [read_index + window_size * buf_offset ];
290-
290+
291291 // Check if we're within the overlap range and mix buffer sample with overlap sample
292292 if (overlap_size && read_overlap_offset > 0 && read_overlap_offset <= overlap_size ) {
293293 // 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
316316 hword_buffer [i ] = (uint8_t )mixed ^ 0x80 ;
317317 }
318318 }
319-
319+
320320 if (self -> base .channel_count == 1 || buf_offset ) {
321321 // Increment window buffer write pointer
322322 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+ }
324326
325327 // Increment overlap buffer pointer
326328 if (overlap_size ) {
327329 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+ }
329333 }
330334
331335 // Increment window buffer read pointer by rate
332336 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+ }
334340 }
335341 }
336342
You can’t perform that action at this time.
0 commit comments