audio/transport.h file

Transport API.



struct Transport
The transport.


using Transport = struct Transport
The transport.


void transport_init(Transport* self, int loading)
Initialize transport.
void transport_set_bpm(Transport* self, float bpm)
Sets BPM and does any necessary processing (like notifying interested parties).
void transport_set_beat_unit(Transport* self, int beat_unit)
Updates beat unit and anything depending on it.
void transport_set_metronome_enabled(Transport* self, const int enabled)
Sets whether metronome is enabled or not.
void transport_add_to_playhead(Transport* self, const int nframes)
Moves the playhead by the time corresponding to given samples, taking into account the loop end point.
void transport_set_playhead_pos(Transport* self, Position* pos)
Setter for playhead Position.
void transport_get_playhead_pos(Transport* self, Position* pos)
Getter for playhead Position.
void transport_move_playhead(Position* target, int panic)
Moves playhead to given pos.
void transport_set_loop(Transport* self, int enabled)
Enables or disables loop.
void transport_goto_prev_marker(Transport* self)
Moves the playhead to the prev Marker.
void transport_goto_next_marker(Transport* self)
Moves the playhead to the next Marker.
void transport_update_position_frames()
Updates the frames in all transport positions.
auto transport_frames_add_frames(const Transport* self, const long gframes, const int frames) -> long
Adds frames to the given global frames, while adjusting the new frames to loop back if the loop point was crossed.
void transport_position_add_frames(const Transport* self, Position* pos, const int frames)
Adds frames to the given position similar to position_add_frames, except that it adjusts the new Position if the loop end point was crossed.