Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::dsp::ITransport Class Referenceabstract

Interface for transport. More...

#include <src/dsp/itransport.h>

Inheritance diagram for zrythm::dsp::ITransport:

Public Types

enum class  PlayState { RollRequested , Rolling , PauseRequested , Paused }
 

Public Member Functions

virtual std::pair< signed_frame_t, signed_frame_tget_loop_range_positions () const =0
 Returns the loop range positions in samples.
 
virtual PlayState get_play_state () const =0
 
virtual signed_frame_t get_playhead_position_in_audio_thread () const =0
 Get the playhead position.
 
virtual signed_frame_t get_playhead_position_after_adding_frames_in_audio_thread (signed_frame_t frames) const =0
 Gets the playhead position, similarly to get_playhead_position(), except that it adjusts the new position if the loop end point was crossed.
 
virtual bool get_loop_enabled () const =0
 
virtual nframes_t is_loop_point_met_in_audio_thread (signed_frame_t g_start_frames, nframes_t nframes) const =0
 Returns the number of processable frames until and excluding the loop end point as a positive number (>= 1) if the loop point was met between g_start_frames and (g_start_frames + nframes), otherwise returns 0;.
 

Detailed Description

Interface for transport.

Definition at line 11 of file itransport.h.

Member Enumeration Documentation

◆ PlayState

enum class zrythm::dsp::ITransport::PlayState
strong

Definition at line 14 of file itransport.h.

Member Function Documentation

◆ get_loop_range_positions()

virtual std::pair< signed_frame_t, signed_frame_t > zrythm::dsp::ITransport::get_loop_range_positions ( ) const
pure virtual

Returns the loop range positions in samples.

Implemented in zrythm::engine::session::Transport.

◆ get_playhead_position_after_adding_frames_in_audio_thread()

virtual signed_frame_t zrythm::dsp::ITransport::get_playhead_position_after_adding_frames_in_audio_thread ( signed_frame_t frames) const
pure virtual

Gets the playhead position, similarly to get_playhead_position(), except that it adjusts the new position if the loop end point was crossed.

Returns
The position in samples.

Implemented in zrythm::engine::session::Transport.

◆ get_playhead_position_in_audio_thread()

virtual signed_frame_t zrythm::dsp::ITransport::get_playhead_position_in_audio_thread ( ) const
pure virtual

Get the playhead position.

Returns
The position in samples.

Implemented in zrythm::engine::session::Transport.

◆ is_loop_point_met_in_audio_thread()

virtual nframes_t zrythm::dsp::ITransport::is_loop_point_met_in_audio_thread ( signed_frame_t g_start_frames,
nframes_t nframes ) const
pure virtual

Returns the number of processable frames until and excluding the loop end point as a positive number (>= 1) if the loop point was met between g_start_frames and (g_start_frames + nframes), otherwise returns 0;.

Implemented in zrythm::engine::session::Transport.


The documentation for this class was generated from the following file: