Skip to content

Commit

Permalink
make xmodits-lib a workspace dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
B0ney committed Oct 25, 2023
1 parent 4aa7adc commit ecf6606
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 23 deletions.
15 changes: 12 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,19 @@ wgpu = ["iced/wgpu"]
# version = "0.12.0"
git = "https://github.com/iced-rs/iced.git"
default-features = false
features = ["image", "tokio"]
features = ["image", "tokio", "palette"]

[workspace.dependencies]
tokio = { version = "1.33.0", features = ["sync", "fs", "io-util", "parking_lot"] }
dirs = "5.0.0"
anyhow = "1.0.0"
tracing = "0.1.40"

[workspace.dependencies.xmodits-lib]
git = "https://github.com/B0ney/xmodits-lib.git"
rev = "78675a3"
features = ["serde"]

[dependencies]
data = { path = "data" }
audio_engine = { path = "audio_engine", optional = true }
Expand All @@ -36,6 +41,7 @@ tokio.workspace = true
dirs.workspace = true
anyhow.workspace = true
tracing.workspace = true
xmodits-lib.workspace = true

tracing-subscriber = "0.3.17"
open = "5.0.0"
Expand Down
5 changes: 2 additions & 3 deletions audio_engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
data = { path = "../data" }
rubato = "0.14.1"
cpal = "0.15.2"
xmodits-lib.workspace = true
rodio = { version = "0.17.3", default-features = false }
2 changes: 1 addition & 1 deletion audio_engine/src/sample/buffer.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use data::xmodits_lib::dsp;
use xmodits_lib::dsp;

#[derive(Clone)]
pub struct SampleBuffer {
Expand Down
5 changes: 1 addition & 4 deletions data/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies.xmodits-lib]
git = "https://github.com/B0ney/xmodits-lib.git"
rev = "78675a3"
features = ["serde"]

[dependencies.iced_core]
git = "https://github.com/iced-rs/iced.git"
Expand All @@ -18,6 +14,7 @@ tokio.workspace = true
dirs.workspace = true
anyhow.workspace = true
tracing.workspace = true
xmodits-lib.workspace = true

serde = { version = "1.0", features = ["derive"] }
chrono = { version = "0.4", features = ["serde"] }
Expand Down
3 changes: 0 additions & 3 deletions data/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,3 @@ pub const SUPPORTED_FORMATS: &[AudioFormat] = &[
AudioFormat::IFF,
AudioFormat::RAW,
];

/// Reimport the xmodits core library.
pub use xmodits_lib;
1 change: 0 additions & 1 deletion src/app/simple.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use data::config::Config;
use data::xmodits_lib;

use crate::dialog;
use crate::logger::write_error_log;
Expand Down
2 changes: 1 addition & 1 deletion src/ripper/extraction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use super::Signal;
use crate::logger::GLOBAL_TRACKER;

use data::config::SampleRippingConfig;
use data::xmodits_lib::{extract, Ripper};
use xmodits_lib::{extract, Ripper};

use std::fs::File;
use std::io::{BufRead, BufReader, Seek, Write};
Expand Down
2 changes: 1 addition & 1 deletion src/ripper/extraction/error.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::path::PathBuf;

use data::xmodits_lib::Error;
use xmodits_lib::Error;

use crate::utils::filename;

Expand Down
2 changes: 1 addition & 1 deletion src/screen/config/name_preview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use std::path::PathBuf;

use data::config::{SampleNameConfig, SampleNameParams, SampleRippingConfig};
use data::xmodits_lib::interface::{name::Context, Sample};
use xmodits_lib::interface::{name::Context, Sample};

use crate::widget::Element;

Expand Down
4 changes: 2 additions & 2 deletions src/screen/config/sample_ripping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use std::path::{Path, PathBuf};

use data::config::SampleRippingConfig;
use data::xmodits_lib::exporter::AudioFormat;
use xmodits_lib::exporter::AudioFormat;

use crate::utils::folder_dialog;
use crate::widget::helpers::{centered_button, control, labelled_picklist};
Expand Down Expand Up @@ -73,7 +73,7 @@ pub fn view_destination_bar(ripping_cfg: &SampleRippingConfig) -> Element<Messag
.into()
}

pub fn view<'a>(ripping: &'a SampleRippingConfig) -> Element<'a, Message> {
pub fn view(ripping: &SampleRippingConfig) -> Element<Message> {
let col1 = column![
checkbox(
"Self Contained",
Expand Down
2 changes: 1 addition & 1 deletion src/screen/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pub fn non_gui(general: &config::GeneralConfig) -> Option<Element<Message>> {
}

#[cfg(not(target_env = "msvc"))]
pub fn non_gui(general: &config::GeneralConfig) -> Option<Element<Message>> {
pub fn non_gui(_general: &config::GeneralConfig) -> Option<Element<Message>> {
None
}

Expand Down
2 changes: 1 addition & 1 deletion src/screen/tracker_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::{
use crate::utils::filename;
use crate::widget::helpers::{centered_column_x, centered_text, control_filled};
use crate::widget::Element;
use data::xmodits_lib::common::info::Info;
use xmodits_lib::common::info::Info;
use iced::widget::{button, column, text, Space};

use crate::app::Message;
Expand Down

0 comments on commit ecf6606

Please sign in to comment.