mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
use Arc<str> where applicable; use konst split_at
This commit is contained in:
parent
411fc0c4bc
commit
305481adee
35 changed files with 286 additions and 273 deletions
|
|
@ -4,7 +4,7 @@ use crate::*;
|
|||
pub struct Mixer {
|
||||
/// JACK client handle (needs to not be dropped for standalone mode to work).
|
||||
pub jack: Arc<RwLock<JackConnection>>,
|
||||
pub name: String,
|
||||
pub name: Arc<str>,
|
||||
pub tracks: Vec<MixerTrack>,
|
||||
pub selected_track: usize,
|
||||
pub selected_column: usize,
|
||||
|
|
@ -13,7 +13,7 @@ pub struct Mixer {
|
|||
/// A mixer track.
|
||||
#[derive(Debug)]
|
||||
pub struct MixerTrack {
|
||||
pub name: String,
|
||||
pub name: Arc<str>,
|
||||
/// Inputs of 1st device
|
||||
pub audio_ins: Vec<Port<AudioIn>>,
|
||||
/// Outputs of last device
|
||||
|
|
@ -47,7 +47,7 @@ impl Mixer {
|
|||
impl MixerTrack {
|
||||
pub fn new (name: &str) -> Usually<Self> {
|
||||
Ok(Self {
|
||||
name: name.to_string(),
|
||||
name: name.to_string().into(),
|
||||
audio_ins: vec![],
|
||||
audio_outs: vec![],
|
||||
devices: vec![],
|
||||
|
|
@ -267,7 +267,7 @@ const SYM_LV2: &str = "lv2";
|
|||
from_edn!("mixer/track" => |jack: &Arc<RwLock<JackConnection>>, args| -> MixerTrack {
|
||||
let mut _gain = 0.0f64;
|
||||
let mut track = MixerTrack {
|
||||
name: String::new(),
|
||||
name: "".into(),
|
||||
audio_ins: vec![],
|
||||
audio_outs: vec![],
|
||||
devices: vec![],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue