Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions akroasis/shared/akroasis-core/src/bin/harmonia/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,11 @@ fn read_duration_secs(path: &Path) -> f64 {
async fn main() -> Result<(), String> {
tracing_subscriber::fmt()
.with_env_filter(
tracing_subscriber::EnvFilter::from_default_env()
.add_directive("akroasis_core=warn".parse().unwrap_or_else(|_| unreachable!("static tracing directive is valid"))),
tracing_subscriber::EnvFilter::from_default_env().add_directive(
"akroasis_core=warn"
.parse()
.unwrap_or_else(|_| unreachable!("static tracing directive is valid")),
),
)
.with_writer(std::io::stderr)
.init();
Expand Down
17 changes: 14 additions & 3 deletions akroasis/shared/akroasis-core/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,12 @@ impl Engine {
/// Full inter-task seek coordination is completed in a subsequent pass.
#[instrument(skip(self))]
pub fn seek(&self, position: Duration) -> Result<Duration, EngineError> {
if self.session.lock().unwrap_or_else(|e| e.into_inner()).is_none() {
if self
.session
.lock()
.unwrap_or_else(|e| e.into_inner())
.is_none()
{
return Err(EngineError::SeekOutOfBounds {
position_secs: position.as_secs_f64(),
duration_secs: 0.0,
Expand Down Expand Up @@ -327,8 +332,14 @@ async fn decode_task_fn(
// DSP + output task
// ---------------------------------------------------------------------------

#[expect(clippy::too_many_arguments, reason = "DSP task receives all pipeline components; splitting further would require wrapper structs")]
#[expect(unused_variables, reason = "several parameters are used only when native-output feature is enabled")]
#[expect(
clippy::too_many_arguments,
reason = "DSP task receives all pipeline components; splitting further would require wrapper structs"
)]
#[expect(
unused_variables,
reason = "several parameters are used only when native-output feature is enabled"
)]
async fn dsp_task_fn(
source: AudioSource,
mut frame_rx: mpsc::Receiver<Option<DecodedFrame>>,
Expand Down
8 changes: 6 additions & 2 deletions akroasis/shared/akroasis-core/src/gapless/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ fn trim_from_start(frames: &mut VecDeque<Box<[f64]>>, mut remaining: usize) {
remaining -= frame_len;
frames.pop_front();
} else {
let frame = frames.pop_front().unwrap_or_else(|| unreachable!("frames.front() returned Some above"));
let frame = frames
.pop_front()
.unwrap_or_else(|| unreachable!("frames.front() returned Some above"));
let trimmed = frame[remaining..].to_vec().into_boxed_slice();
frames.push_front(trimmed);
remaining = 0;
Expand All @@ -93,7 +95,9 @@ fn trim_from_end(frames: &mut VecDeque<Box<[f64]>>, mut remaining: usize) {
remaining -= frame_len;
frames.pop_back();
} else {
let frame = frames.pop_back().unwrap_or_else(|| unreachable!("frames.back() returned Some above"));
let frame = frames
.pop_back()
.unwrap_or_else(|| unreachable!("frames.back() returned Some above"));
let keep = frame.len() - remaining;
let trimmed = frame[..keep].to_vec().into_boxed_slice();
frames.push_back(trimmed);
Expand Down
5 changes: 4 additions & 1 deletion akroasis/shared/akroasis-core/src/output/cpal.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#![expect(deprecated, reason = "cpal 0.17 deprecated name() in favour of description(); migration deferred until cpal 0.18 stabilizes")]
#![expect(
deprecated,
reason = "cpal 0.17 deprecated name() in favour of description(); migration deferred until cpal 0.18 stabilizes"
)]

use std::sync::atomic::{AtomicU64, Ordering};
use std::sync::{Arc, Mutex};
Expand Down
5 changes: 4 additions & 1 deletion akroasis/shared/akroasis-core/src/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ impl PlayQueue {
/// Advances to the next track and returns its path.
///
/// Returns `None` when there is no next track (end of queue).
#[expect(clippy::should_implement_trait, reason = "PlayQueue::next() advances the queue and returns the track; naming matches domain language, not Iterator")]
#[expect(
clippy::should_implement_trait,
reason = "PlayQueue::next() advances the queue and returns the track; naming matches domain language, not Iterator"
)]
pub fn next(&mut self) -> Option<PathBuf> {
if let Some(current) = self.current().map(PathBuf::from) {
self.history.push(current);
Expand Down
Loading
Loading