Skip to content

Commit 838855b

Browse files
committed
Fix clippy lint
1 parent efec96b commit 838855b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

playback/src/audio_backend/portaudio.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use super::{Open, Sink, SinkError, SinkResult};
22
use crate::config::AudioFormat;
33
use crate::convert::Converter;
44
use crate::decoder::AudioPacket;
5-
use crate::{NUM_CHANNELS, SAMPLE_RATE};
5+
use crate::NUM_CHANNELS;
66
use portaudio_rs::device::{get_default_output_index, DeviceIndex, DeviceInfo};
77
use portaudio_rs::stream::*;
88
use std::process::exit;
@@ -141,9 +141,9 @@ impl<'a> Sink for PortAudioSink<'a> {
141141
}};
142142
}
143143
match self {
144-
Self::F32(stream, _) => stop_sink!(ref mut stream),
145-
Self::S32(stream, _) => stop_sink!(ref mut stream),
146-
Self::S16(stream, _) => stop_sink!(ref mut stream),
144+
Self::F32(stream, _, _) => stop_sink!(ref mut stream),
145+
Self::S32(stream, _, _) => stop_sink!(ref mut stream),
146+
Self::S16(stream, _, _) => stop_sink!(ref mut stream),
147147
};
148148

149149
Ok(())
@@ -161,15 +161,15 @@ impl<'a> Sink for PortAudioSink<'a> {
161161
.map_err(|e| SinkError::OnWrite(e.to_string()))?;
162162

163163
let result = match self {
164-
Self::F32(stream, _parameters) => {
164+
Self::F32(stream, _parameters, _sample_rate) => {
165165
let samples_f32: &[f32] = &converter.f64_to_f32(samples);
166166
write_sink!(ref mut stream, samples_f32)
167167
}
168-
Self::S32(stream, _parameters) => {
168+
Self::S32(stream, _parameters, _sample_rate) => {
169169
let samples_s32: &[i32] = &converter.f64_to_s32(samples);
170170
write_sink!(ref mut stream, samples_s32)
171171
}
172-
Self::S16(stream, _parameters) => {
172+
Self::S16(stream, _parameters, _sample_rate) => {
173173
let samples_s16: &[i16] = &converter.f64_to_s16(samples);
174174
write_sink!(ref mut stream, samples_s16)
175175
}

0 commit comments

Comments
 (0)