pub unsafe fn stop_track_preview_2_unchecked(
        &mut self,
        project: ProjectContext,
        register: NonNull<raw::preview_register_t>,
    ) -> ReaperFunctionResult<()> {
        let successful = self
            .reaper
            .low()
            .StopTrackPreview2(project.to_raw() as _, register.as_ptr());
        if successful == 0 {
            return Err(ReaperFunctionError::new("couldn't stop track preview"));
        }
        self.playing_preview_registers.remove(&register);
        Ok(())
    }
/// Stops a preview that you have played with [`play_track_preview_2_ex_unchecked()`].
///
/// Please note that stopping preview registers manually just for cleaning up is
/// unnecessary in most situations because *reaper-rs* takes care of automatically
/// unregistering everything when this struct is dropped (RAII). This happens even when using
/// the unsafe function variants.
///
/// # Errors
///
/// Returns an error if not successful.
///
/// # Safety
///
/// REAPER can crash if you pass an invalid project or register pointer.
///
/// [`play_track_preview_2_ex_unchecked()`]: #method.play_track_preview_2_ex_unchecked
Stops a preview that you have played with [`play_track_preview_2_ex_unchecked()`].
Please note that stopping preview registers manually just for cleaning up is
unnecessary in most situations because *reaper-rs* takes care of automatically
unregistering everything when this struct is dropped (RAII). This happens even when using
the unsafe function variants.
Stops a preview that you have played with [ ` play_track_preview_2_ex_unchecked () ` ] . Please note that stopping preview registers manually just for cleaning up is unnecessary in most situations because * reaper - rs * takes care of automatically unregistering everything when this struct is dropped ( RAII ) . This happens even when using the unsafe function variants .
pub unsafe fn stop_track_preview_2_unchecked(
        &mut self,
        project: ProjectContext,
        register: NonNull<raw::preview_register_t>,
    ) -> ReaperFunctionResult<()> {
        let successful = self
            .reaper
            .low()
            .StopTrackPreview2(project.to_raw() as _, register.as_ptr());
        if successful == 0 {
            return Err(ReaperFunctionError::new("couldn't stop track preview"));
        }
        self.playing_preview_registers.remove(&register);
        Ok(())
    }
pub unsafe fn stop_track_preview_2_unchecked ( & mut self , project : ProjectContext , register : NonNull < raw :: preview_register_t > , ) -> ReaperFunctionResult < ( ) > { let successful = self . reaper . low ( ) . StopTrackPreview2 ( project . to_raw ( ) as _ , register . as_ptr ( ) ) ; if successful == 0 { return Err ( ReaperFunctionError :: new ( " " ) ) ; } self . playing_preview_registers . remove ( & register ) ; Ok ( ( ) ) }
Stops a preview that you have played with [`play_track_preview_2_ex_unchecked()`].
Stops a preview that you have played with [ ` play_track_preview_2_ex_unchecked () ` ] .
&mut self
project
ProjectContext
register
NonNull<raw::preview_register_t>
&mut self
project
ProjectContext
register
NonNull<raw::preview_register_t>
errors
Returns an error if not successful.
Returns an error if not successful .
safety
REAPER can crash if you pass an invalid project or register pointer.

[`play_track_preview_2_ex_unchecked()`]: #method.play_track_preview_2_ex_unchecked
REAPER can crash if you pass an invalid project or register pointer . [ ` play_track_preview_2_ex_unchecked () ` ] : #method . play_track_preview_2_ex_unchecked