(
&mut self,
info: &ProcInfo,
buffers: ProcBuffers,
extra: &mut ProcExtra,
)
| 1280 | |
| 1281 | fn process( |
| 1282 | &mut self, |
| 1283 | info: &ProcInfo, |
| 1284 | buffers: ProcBuffers, |
| 1285 | extra: &mut ProcExtra, |
| 1286 | ) -> ProcessStatus { |
| 1287 | let currently_processing_sample = self.currently_processing_sample(); |
| 1288 | |
| 1289 | if !currently_processing_sample && self.num_active_stop_declickers == 0 { |
| 1290 | return ProcessStatus::ClearAllOutputs; |
| 1291 | } |
| 1292 | |
| 1293 | let mut num_filled_channels = 0; |
| 1294 | |
| 1295 | if currently_processing_sample { |
| 1296 | let sample_state = self.loaded_sample_state.as_ref().unwrap(); |
| 1297 | |
| 1298 | let looping = self |
| 1299 | .params |
| 1300 | .repeat_mode |
| 1301 | .do_loop(sample_state.num_times_looped_back); |
| 1302 | |
| 1303 | let (finished, n_channels) = |
| 1304 | self.process_internal(buffers.outputs, info.frames, looping, extra); |
| 1305 | |
| 1306 | num_filled_channels = n_channels; |
| 1307 | |
| 1308 | self.proc_state.playhead_frames = |
| 1309 | self.loaded_sample_state.as_ref().unwrap().playhead_frames; |
| 1310 | |
| 1311 | if finished { |
| 1312 | self.playing = false; |
| 1313 | self.proc_state.playback_state = PlaybackState::Stopped; |
| 1314 | self.proc_state.last_finished_playback_id = self.proc_state.playback_id; |
| 1315 | } else { |
| 1316 | self.proc_state.playback_age_frames = self |
| 1317 | .proc_state |
| 1318 | .playback_age_frames |
| 1319 | .saturating_add(info.frames as u64); |
| 1320 | } |
| 1321 | |
| 1322 | self.sync_proc_state(); |
| 1323 | } |
| 1324 | |
| 1325 | for (i, out_buf) in buffers |
| 1326 | .outputs |
| 1327 | .iter_mut() |
| 1328 | .enumerate() |
| 1329 | .skip(num_filled_channels) |
| 1330 | { |
| 1331 | if !info.out_silence_mask.is_channel_silent(i) { |
| 1332 | out_buf[..info.frames].fill(0.0); |
| 1333 | } |
| 1334 | } |
| 1335 | |
| 1336 | if self.num_active_stop_declickers > 0 { |
| 1337 | let tmp_buffers = self.stop_declicker_buffers.as_ref().unwrap(); |
| 1338 | let fade_out_frames = tmp_buffers.frames(); |
| 1339 |
no test coverage detected