Skip to content
Open
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: 1 addition & 6 deletions src/software/resampling/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,7 @@ impl Context {

/// Get the remaining delay.
pub fn delay(&self) -> Option<Delay> {
unsafe {
match swr_get_delay(self.as_ptr() as *mut _, 1) {
0 => None,
_ => Some(Delay::from(self)),
}
}
unsafe { Some(Delay::from(self)).filter(|d| d.output > 0) }
}

/// Run the resampler from the given input to the given output.
Expand Down