Skip to main content

remove_ir_profile

Function remove_ir_profile 

Source
pub fn remove_ir_profile(
    file_service: State<'_, FileService>,
    audio_service: State<'_, Mutex<AudioService>>,
    file_name: String,
) -> Result<(), String>
Expand description

Removes a custom IR profile from the user’s custom IR directory. The following safety guards are enforced before deletion:

  1. Must exist – the profile must appear in the profile inventory.
  2. Must be custom – default (bundled) profiles cannot be removed.
  3. Must not be in use – if any Cabinet effect in any active channel currently references this profile, deletion is rejected to avoid corrupting the live signal chain.

§Errors

Returns Err with a user-facing message when any guard fails.