parent
b9a9dda233
commit
28a18819cf
4 changed files with 306 additions and 286 deletions
563
Cargo.lock
generated
563
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -20,10 +20,10 @@ strum = "0.26.3"
|
|||
strum_macros = "0.26.4"
|
||||
ron = "0.8.1"
|
||||
sqlx = { version = "0.8.2", features = ["sqlite", "runtime-tokio"] }
|
||||
dirs = "5.0.1"
|
||||
dirs = "6.0.0"
|
||||
tokio = "1.41.1"
|
||||
crisp = { git = "https://git.tfcconnection.org/chris/crisp", version = "0.1.3" }
|
||||
rodio = { version = "0.20.1", features = ["symphonia-all", "tracing"] }
|
||||
rodio = { version = "0.21.1", features = ["symphonia-all", "tracing"] }
|
||||
gstreamer = "0.23"
|
||||
gstreamer-app = "0.23"
|
||||
# gstreamer-video = "0.23"
|
||||
|
|
|
@ -15,13 +15,13 @@ use cosmic::iced_widget::{column, row, stack};
|
|||
use cosmic::theme;
|
||||
use cosmic::widget::dnd_destination::dnd_destination;
|
||||
use cosmic::widget::nav_bar::nav_bar_style;
|
||||
use cosmic::widget::text;
|
||||
use cosmic::widget::tooltip::Position as TPosition;
|
||||
use cosmic::widget::Container;
|
||||
use cosmic::widget::{
|
||||
button, horizontal_space, mouse_area, nav_bar, search_input,
|
||||
tooltip, vertical_space, Space,
|
||||
};
|
||||
use cosmic::widget::{container, text};
|
||||
use cosmic::widget::{icon, slider};
|
||||
use cosmic::{executor, Application, ApplicationExt, Element};
|
||||
use crisp::types::Value;
|
||||
|
@ -1115,7 +1115,9 @@ impl cosmic::Application for App {
|
|||
];
|
||||
|
||||
if let Some(_editor) = &self.editor_mode {
|
||||
Element::from(song_editor)
|
||||
container(song_editor)
|
||||
.padding(cosmic::theme::spacing().space_xxl)
|
||||
.into()
|
||||
} else {
|
||||
Element::from(column)
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ use cosmic::{
|
|||
Task,
|
||||
};
|
||||
use iced_video_player::{gst_pbutils, Position, Video, VideoPlayer};
|
||||
use rodio::{Decoder, OutputStream, Sink};
|
||||
use rodio::{Decoder, OutputStream, OutputStreamBuilder, Sink};
|
||||
use tracing::{debug, error, info, warn};
|
||||
use url::Url;
|
||||
|
||||
|
@ -44,7 +44,7 @@ pub(crate) struct Presenter {
|
|||
pub video: Option<Video>,
|
||||
pub video_position: f32,
|
||||
pub audio: Option<PathBuf>,
|
||||
sink: (OutputStream, Arc<Sink>),
|
||||
sink: (Arc<Sink>, OutputStream),
|
||||
hovered_slide: Option<(usize, usize)>,
|
||||
scroll_id: Id,
|
||||
current_font: Font,
|
||||
|
@ -159,11 +159,14 @@ impl Presenter {
|
|||
video_position: 0.0,
|
||||
hovered_slide: None,
|
||||
sink: {
|
||||
let (stream, stream_handle) =
|
||||
OutputStream::try_default().unwrap();
|
||||
let stream_handle =
|
||||
OutputStreamBuilder::open_default_stream()
|
||||
.expect("Can't open default rodio stream");
|
||||
(
|
||||
stream,
|
||||
Arc::new(Sink::try_new(&stream_handle).unwrap()),
|
||||
Arc::new(Sink::connect_new(
|
||||
&stream_handle.mixer(),
|
||||
)),
|
||||
stream_handle,
|
||||
)
|
||||
},
|
||||
scroll_id: Id::unique(),
|
||||
|
@ -385,7 +388,7 @@ impl Presenter {
|
|||
return Action::Task(self.start_audio());
|
||||
}
|
||||
Message::EndAudio => {
|
||||
self.sink.1.stop();
|
||||
self.sink.0.stop();
|
||||
}
|
||||
Message::None => debug!("Presenter Message::None"),
|
||||
Message::Error(error) => {
|
||||
|
@ -660,7 +663,7 @@ impl Presenter {
|
|||
debug!(?audio, "This is where audio should be changing");
|
||||
let audio = audio.clone();
|
||||
Task::perform(
|
||||
start_audio(Arc::clone(&self.sink.1), audio),
|
||||
start_audio(Arc::clone(&self.sink.0), audio),
|
||||
|()| Message::None,
|
||||
)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue