Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2022-11-01 11:27:48 +0300
committerSebastian Dröge <sebastian@centricular.com>2022-11-01 11:27:48 +0300
commita8250abbf1eeff3ee277d93f166c3fd4983d7af3 (patch)
treec72fb58c6477081417a0685b9dac19ff48b8f6c9 /audio
parent31d4ba2eaee98cb09eaf1b6c4ab29698018ff4e7 (diff)
Fix various new clippy warnings
Diffstat (limited to 'audio')
-rw-r--r--audio/audiofx/examples/hrtfrender.rs8
-rw-r--r--audio/audiofx/src/audioloudnorm/imp.rs6
-rw-r--r--audio/audiofx/src/ebur128level/imp.rs12
-rw-r--r--audio/csound/examples/effect_example.rs2
-rw-r--r--audio/csound/src/filter/imp.rs8
-rw-r--r--audio/csound/tests/csound_filter.rs2
6 files changed, 19 insertions, 19 deletions
diff --git a/audio/audiofx/examples/hrtfrender.rs b/audio/audiofx/examples/hrtfrender.rs
index 41ded273a..61d70988c 100644
--- a/audio/audiofx/examples/hrtfrender.rs
+++ b/audio/audiofx/examples/hrtfrender.rs
@@ -90,10 +90,10 @@ fn run() -> Result<(), Error> {
let new_z = -x * f32::sin(ROTATION) + z * f32::cos(ROTATION);
let objs = [gst::Structure::builder("application/spatial-object")
- .field("x", &new_x)
- .field("y", &y)
- .field("z", &new_z)
- .field("distance-gain", &gain)
+ .field("x", new_x)
+ .field("y", y)
+ .field("z", new_z)
+ .field("distance-gain", gain)
.build()];
hrtf.set_property("spatial-objects", gst::Array::new(objs));
diff --git a/audio/audiofx/src/audioloudnorm/imp.rs b/audio/audiofx/src/audioloudnorm/imp.rs
index 233982a23..915e5cb09 100644
--- a/audio/audiofx/src/audioloudnorm/imp.rs
+++ b/audio/audiofx/src/audioloudnorm/imp.rs
@@ -1560,7 +1560,7 @@ impl AudioLoudNorm {
}
// Need to reset the state now
- *state = State::new(&*self.settings.lock().unwrap(), state.info.clone());
+ *state = State::new(&self.settings.lock().unwrap(), state.info.clone());
}
state.adapter.push(buffer);
@@ -1602,7 +1602,7 @@ impl AudioLoudNorm {
Err(_) => return false,
};
}
- *state = Some(State::new(&*self.settings.lock().unwrap(), info));
+ *state = Some(State::new(&self.settings.lock().unwrap(), info));
drop(state);
if let Some(outbuf) = outbuf {
@@ -1623,7 +1623,7 @@ impl AudioLoudNorm {
Err(gst::FlowError::Eos) => None,
Err(_) => return false,
};
- *state = State::new(&*self.settings.lock().unwrap(), state.info.clone());
+ *state = State::new(&self.settings.lock().unwrap(), state.info.clone());
}
drop(state);
diff --git a/audio/audiofx/src/ebur128level/imp.rs b/audio/audiofx/src/ebur128level/imp.rs
index 2d9a98e10..f4f102e24 100644
--- a/audio/audiofx/src/ebur128level/imp.rs
+++ b/audio/audiofx/src/ebur128level/imp.rs
@@ -138,7 +138,7 @@ impl ObjectImpl for EbuR128Level {
.build()]
});
- &*SIGNALS
+ &SIGNALS
}
fn properties() -> &'static [glib::ParamSpec] {
@@ -482,7 +482,7 @@ impl BaseTransformImpl for EbuR128Level {
if state.ebur128.mode().contains(ebur128::Mode::M) {
match state.ebur128.loudness_momentary() {
- Ok(loudness) => s.set("momentary-loudness", &loudness),
+ Ok(loudness) => s.set("momentary-loudness", loudness),
Err(err) => gst::error!(
CAT,
imp: self,
@@ -494,7 +494,7 @@ impl BaseTransformImpl for EbuR128Level {
if state.ebur128.mode().contains(ebur128::Mode::S) {
match state.ebur128.loudness_shortterm() {
- Ok(loudness) => s.set("shortterm-loudness", &loudness),
+ Ok(loudness) => s.set("shortterm-loudness", loudness),
Err(err) => gst::error!(
CAT,
imp: self,
@@ -506,7 +506,7 @@ impl BaseTransformImpl for EbuR128Level {
if state.ebur128.mode().contains(ebur128::Mode::I) {
match state.ebur128.loudness_global() {
- Ok(loudness) => s.set("global-loudness", &loudness),
+ Ok(loudness) => s.set("global-loudness", loudness),
Err(err) => gst::error!(
CAT,
imp: self,
@@ -516,7 +516,7 @@ impl BaseTransformImpl for EbuR128Level {
}
match state.ebur128.relative_threshold() {
- Ok(threshold) => s.set("relative-threshold", &threshold),
+ Ok(threshold) => s.set("relative-threshold", threshold),
Err(err) => gst::error!(
CAT,
imp: self,
@@ -528,7 +528,7 @@ impl BaseTransformImpl for EbuR128Level {
if state.ebur128.mode().contains(ebur128::Mode::LRA) {
match state.ebur128.loudness_range() {
- Ok(range) => s.set("loudness-range", &range),
+ Ok(range) => s.set("loudness-range", range),
Err(err) => {
gst::error!(CAT, imp: self, "Failed to get loudness range: {}", err)
}
diff --git a/audio/csound/examples/effect_example.rs b/audio/csound/examples/effect_example.rs
index f1e8355fa..98c7b63e1 100644
--- a/audio/csound/examples/effect_example.rs
+++ b/audio/csound/examples/effect_example.rs
@@ -80,7 +80,7 @@ fn create_pipeline() -> Result<gst::Pipeline, Box<dyn Error>> {
let audio_sink = gst::parse_bin_from_description(AUDIO_SINK, true)?.upcast();
let csoundfilter = gst::ElementFactory::make("csoundfilter")
- .property("csd-text", &CSD)
+ .property("csd-text", CSD)
.build()
.unwrap();
diff --git a/audio/csound/src/filter/imp.rs b/audio/csound/src/filter/imp.rs
index 83c276be7..ea0fa4654 100644
--- a/audio/csound/src/filter/imp.rs
+++ b/audio/csound/src/filter/imp.rs
@@ -517,15 +517,15 @@ impl BaseTransformImpl for CsoundFilter {
let ichannels = csound.input_channels() as i32;
let ochannels = csound.output_channels() as i32;
for s in new_caps.make_mut().iter_mut() {
- s.set("format", &gst_audio::AUDIO_FORMAT_F64.to_str());
- s.set("rate", &sr);
+ s.set("format", gst_audio::AUDIO_FORMAT_F64.to_str());
+ s.set("rate", sr);
// replace the channel property with our values,
// if they are not supported, the negotiation will fail.
if direction == gst::PadDirection::Src {
- s.set("channels", &ichannels);
+ s.set("channels", ichannels);
} else {
- s.set("channels", &ochannels);
+ s.set("channels", ochannels);
}
// Csound does not have a concept of channel-mask
s.remove_field("channel-mask");
diff --git a/audio/csound/tests/csound_filter.rs b/audio/csound/tests/csound_filter.rs
index a6564be27..275a90e31 100644
--- a/audio/csound/tests/csound_filter.rs
+++ b/audio/csound/tests/csound_filter.rs
@@ -57,7 +57,7 @@ fn init() {
fn build_harness(src_caps: gst::Caps, sink_caps: gst::Caps, csd: &str) -> gst_check::Harness {
let filter = gst::ElementFactory::make("csoundfilter")
- .property("csd-text", &csd)
+ .property("csd-text", csd)
.build()
.unwrap();