mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
ref -> rev; fix some warns; cov 33.46%
This commit is contained in:
parent
bcc3f5809e
commit
60e4bb49b2
14 changed files with 43 additions and 43 deletions
|
|
@ -47,27 +47,27 @@ pub trait MidiRecordApi: HasClock + HasPlayClip + HasMidiIns {
|
|||
if let Some((started, ref clip)) = self.play_clip().clone() {
|
||||
self.record_clip(scope, started, clip, midi_buf);
|
||||
}
|
||||
if let Some((start_at, clip)) = &self.next_clip() {
|
||||
if let Some((_start_at, _clip)) = &self.next_clip() {
|
||||
self.record_next();
|
||||
}
|
||||
}
|
||||
fn record_clip (
|
||||
&mut self,
|
||||
scope: &ProcessScope,
|
||||
started: Moment,
|
||||
clip: &Option<Arc<RwLock<MidiClip>>>,
|
||||
midi_buf: &mut Vec<Vec<Vec<u8>>>
|
||||
scope: &ProcessScope,
|
||||
started: Moment,
|
||||
clip: &Option<Arc<RwLock<MidiClip>>>,
|
||||
_midi_buf: &mut Vec<Vec<Vec<u8>>>
|
||||
) {
|
||||
if let Some(clip) = clip {
|
||||
let sample0 = scope.last_frame_time() as usize;
|
||||
let start = started.sample.get() as usize;
|
||||
let recording = self.recording();
|
||||
let _recording = self.recording();
|
||||
let timebase = self.clock().timebase().clone();
|
||||
let quant = self.clock().quant.get();
|
||||
let mut clip = clip.write().unwrap();
|
||||
let length = clip.length;
|
||||
for input in self.midi_ins_mut().iter() {
|
||||
for (sample, event, bytes) in parse_midi_input(input.port().iter(scope)) {
|
||||
for (sample, event, _bytes) in parse_midi_input(input.port().iter(scope)) {
|
||||
if let LiveEvent::Midi { message, .. } = event {
|
||||
clip.record_event({
|
||||
let sample = (sample0 + sample - start) as f64;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue