mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:07:34 +00:00
LibDSP: Fix potential slicing issue in volume_from_envelope
Use pointer or reference to avoid slicing from "PitchedEnvelope" to "Envelope". This was found by SonarCloud.
This commit is contained in:
parent
a225b26d88
commit
55aecf5381
3 changed files with 3 additions and 3 deletions
|
@ -64,7 +64,7 @@ Signal Classic::process_impl(Signal const& input_signal)
|
|||
}
|
||||
|
||||
// Linear ADSR envelope with no peak adjustment.
|
||||
double Classic::volume_from_envelope(Envelope envelope)
|
||||
double Classic::volume_from_envelope(Envelope const& envelope)
|
||||
{
|
||||
switch (static_cast<EnvelopeState>(envelope)) {
|
||||
case EnvelopeState::Off:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue