wip: fixing runtime crashes, pt.1

(you thought this was over?)
This commit is contained in:
🪞👃🪞 2024-11-21 18:42:57 +01:00
parent 132093f14a
commit 94a16b9dbc
3 changed files with 32 additions and 32 deletions

View file

@ -12,7 +12,7 @@ impl<'a, T: TransportViewState> Content for TransportView<'a, T> {
Some(TransportState::Rolling) => "▶ PLAYING",
Some(TransportState::Starting) => "READY ...",
Some(TransportState::Stopped) => "⏹ STOPPED",
_ => unreachable!(),
_ => "???",
}
).min_xy(11, 2).push_x(1)).align_x().fill_x(),

View file

@ -58,59 +58,59 @@ macro_rules! impl_midi_player {
&mut self$(.$field)*.reset
}
fn phrase (&self) -> &Option<(Instant, Option<Arc<RwLock<Phrase>>>)> {
todo!()
todo!("phrase")
}
fn phrase_mut (&self) -> &mut Option<(Instant, Option<Arc<RwLock<Phrase>>>)> {
todo!()
todo!("phrase_mut")
}
fn next_phrase (&self) -> &Option<(Instant, Option<Arc<RwLock<Phrase>>>)> {
todo!()
todo!("next_phrase")
}
fn next_phrase_mut (&mut self) -> &mut Option<(Instant, Option<Arc<RwLock<Phrase>>>)> {
todo!()
todo!("next_phrase_mut")
}
}
impl MidiInputApi for $Struct {
fn midi_ins(&self) -> &Vec<Port<jack::MidiIn>> {
todo!()
fn midi_ins (&self) -> &Vec<Port<jack::MidiIn>> {
todo!("midi_ins")
}
fn midi_ins_mut(&self) -> &mut Vec<Port<jack::MidiIn>> {
todo!()
fn midi_ins_mut (&self) -> &mut Vec<Port<jack::MidiIn>> {
todo!("midi_ins_mut")
}
fn recording(&self) -> bool {
todo!()
fn recording (&self) -> bool {
todo!("recording")
}
fn recording_mut(&mut self) -> &mut bool {
todo!()
fn recording_mut (&mut self) -> &mut bool {
todo!("recording_mut")
}
fn monitoring(&self) -> bool {
todo!()
fn monitoring (&self) -> bool {
todo!("monitoring")
}
fn monitoring_mut(&mut self) -> &mut bool {
todo!()
fn monitoring_mut (&mut self) -> &mut bool {
todo!("monitoring_mut")
}
fn overdub(&self) -> bool {
todo!()
fn overdub (&self) -> bool {
todo!("overdub")
}
fn overdub_mut(&mut self) -> &mut bool {
todo!()
fn overdub_mut (&mut self) -> &mut bool {
todo!("overdub_mut")
}
fn notes_in(&self) -> &Arc<RwLock<[bool; 128]>> {
todo!()
fn notes_in (&self) -> &Arc<RwLock<[bool; 128]>> {
todo!("notes_in")
}
}
impl MidiOutputApi for $Struct {
fn midi_outs (&self) -> &Vec<Port<jack::MidiOut>> {
todo!()
todo!("midi_outs")
}
fn midi_outs_mut (&mut self) -> &mut Vec<Port<jack::MidiOut>> {
todo!()
todo!("midi_outs_mut")
}
fn midi_note (&mut self) -> &mut Vec<u8> {
todo!()
todo!("midi_note")
}
fn notes_out (&self) -> &Arc<RwLock<[bool; 128]>> {
todo!()
todo!("notes_out")
}
}
impl MidiPlayerApi for $Struct {}
@ -144,10 +144,10 @@ macro_rules! impl_phrase_editor_control {
//state.editor.phrase = phrase.clone();
//state.focus(ArrangerFocus::PhraseEditor);
//state.focus_enter();
todo!()
todo!("edit_phrase")
}
fn editing_phrase (&self) -> &Option<Arc<RwLock<Phrase>>> {
todo!()
todo!("editing_phrase")
}
fn phrase_editor_entered (&self) -> bool {
self.entered && self.focused() == $Focus
@ -165,7 +165,7 @@ macro_rules! impl_phrase_editor_control {
&mut self.editor.note_len
}
fn put_note (&mut self) {
todo!()
todo!("put_note")
}
}
}

View file

@ -26,7 +26,7 @@ impl TryFrom<&Arc<RwLock<JackClient>>> for SequencerTui {
cursor: (0, 0),
entered: false,
split: 20,
midi_buf: vec![],
midi_buf: vec![vec![];65536],
note_buf: vec![],
transport,
})
@ -54,7 +54,7 @@ impl TryFrom<&Arc<RwLock<JackClient>>> for ArrangerTui {
entered: false,
menu_bar: None,
status_bar: None,
midi_buf: vec![],
midi_buf: vec![vec![];65536],
note_buf: vec![],
})
}