pub unsafe fn play_track_preview_2_ex_unchecked(
        &mut self,
        project: ProjectContext,
        preview: NonNull<raw::preview_register_t>,
        buffering_behavior: BitFlags<BufferingBehavior>,
        measure_alignment: MeasureAlignment,
    ) -> ReaperFunctionResult<()> {
        self.playing_preview_registers.insert(preview);
        let result = self.reaper.low().PlayTrackPreview2Ex(
            project.to_raw(),
            preview.as_ptr(),
            buffering_behavior.bits() as i32,
            measure_alignment.to_raw(),
        );
        if result == 0 {
            return Err(ReaperFunctionError::new("couldn't play track preview"));
        }
        Ok(())
    }
/// Plays a preview register on a specific track.
///
/// # Errors
///
/// Returns an error if not successful.
///
/// # Safety
///
/// REAPER can crash if you pass an invalid project or preview pointer, if the pointer gets
/// stale while still playing, if you don't properly handle synchronization via mutex or
/// critical section when modifying the register while playing. Use
/// [`play_track_preview_2_ex()`] if you want to be released from that burden.
///
/// [`play_track_preview_2_ex()`]: #method.play_track_preview_2_ex
Plays a preview register on a specific track.
Plays a preview register on a specific track .
pub unsafe fn play_track_preview_2_ex_unchecked(
        &mut self,
        project: ProjectContext,
        preview: NonNull<raw::preview_register_t>,
        buffering_behavior: BitFlags<BufferingBehavior>,
        measure_alignment: MeasureAlignment,
    ) -> ReaperFunctionResult<()> {
        self.playing_preview_registers.insert(preview);
        let result = self.reaper.low().PlayTrackPreview2Ex(
            project.to_raw(),
            preview.as_ptr(),
            buffering_behavior.bits() as i32,
            measure_alignment.to_raw(),
        );
        if result == 0 {
            return Err(ReaperFunctionError::new("couldn't play track preview"));
        }
        Ok(())
    }
pub unsafe fn play_track_preview_2_ex_unchecked ( & mut self , project : ProjectContext , preview : NonNull < raw :: preview_register_t > , buffering_behavior : BitFlags < BufferingBehavior > , measure_alignment : MeasureAlignment , ) -> ReaperFunctionResult < ( ) > { self . playing_preview_registers . insert ( preview ) ; let result = self . reaper . low ( ) . PlayTrackPreview2Ex ( project . to_raw ( ) , preview . as_ptr ( ) , buffering_behavior . bits ( ) as i32 , measure_alignment . to_raw ( ) , ) ; if result == 0 { return Err ( ReaperFunctionError :: new ( " " ) ) ; } Ok ( ( ) ) }
Plays a preview register on a specific track.
Plays a preview register on a specific track .
&mut self
project
ProjectContext
preview
NonNull<raw::preview_register_t>
buffering_behavior
BitFlags<BufferingBehavior>
measure_alignment
MeasureAlignment
&mut self
project
ProjectContext
preview
NonNull<raw::preview_register_t>
buffering_behavior
BitFlags<BufferingBehavior>
measure_alignment
MeasureAlignment
errors
Returns an error if not successful.
Returns an error if not successful .
safety
REAPER can crash if you pass an invalid project or preview pointer, if the pointer gets
stale while still playing, if you don't properly handle synchronization via mutex or
critical section when modifying the register while playing. Use
[`play_track_preview_2_ex()`] if you want to be released from that burden.

[`play_track_preview_2_ex()`]: #method.play_track_preview_2_ex
REAPER can crash if you pass an invalid project or preview pointer if the pointer gets stale while still playing if you don ' t properly handle synchronization via mutex or critical section when modifying the register while playing . Use [ ` play_track_preview_2_ex () ` ] if you want to be released from that burden . [ ` play_track_preview_2_ex () ` ] : #method . play_track_preview_2_ex