|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
Handles the recording logic for the application. More...
#include <src/gui/dsp/recording_manager.h>


Public Types | |
| using | Position = zrythm::dsp::Position |
Public Member Functions | |
| RecordingManager (QObject *parent=nullptr) | |
| Creates the event queue and starts the event loop. | |
| void | handle_recording (const TrackProcessor *track_processor, const EngineProcessTimeInfo *time_nfo) |
| Handles the recording logic inside the process cycle. | |
| Q_SLOT void | process_events () |
Data Fields | |
| int | num_active_recordings_ = 0 |
| Number of recordings currently in progress. | |
| MPMCQueue< RecordingEvent * > | event_queue_ |
| Event queue. | |
| ObjectPool< RecordingEvent > | event_obj_pool_ |
| Memory pool of event structs to avoid real time allocation. | |
| std::vector< ArrangerObjectPtrVariant > | objects_before_start_ |
| Cloned objects before starting recording. | |
| std::vector< Region::Uuid > | recorded_ids_ |
| Recorded region identifiers, to be used for creating the undoable actions. | |
| std::vector< AutomationPoint * > | pending_aps_ |
| Pending recorded automation points. | |
| bool | currently_processing_ = false |
| std::binary_semaphore | processing_sem_ { 1 } |
| bool | freeing_ = false |
Handles the recording logic for the application.
This class is responsible for managing the recording process, including handling recording events, creating new regions, and managing automation points. It uses a queue to process recording events in a separate thread, and provides methods for starting, pausing, and stopping recording.
The class is designed to be thread-safe, with a binary semaphore to ensure that only one thread can access the recording logic at a time.
Definition at line 38 of file recording_manager.h.
Definition at line 41 of file recording_manager.h.
| RecordingManager::RecordingManager | ( | QObject * | parent = nullptr | ) |
Creates the event queue and starts the event loop.
Must be called from a GTK thread.
| void RecordingManager::handle_recording | ( | const TrackProcessor * | track_processor, |
| const EngineProcessTimeInfo * | time_nfo ) |
Handles the recording logic inside the process cycle.
The MidiEvents are already dequeued at this point.
| g_frames_start | Global start frames. |
| nframes | Number of frames to process. If this is zero, a pause will be added. See RECORDING_EVENT_TYPE_PAUSE_TRACK_RECORDING and RECORDING_EVENT_TYPE_PAUSE_AUTOMATION_RECORDING. |
| bool RecordingManager::currently_processing_ = false |
Definition at line 173 of file recording_manager.h.
| ObjectPool<RecordingEvent> RecordingManager::event_obj_pool_ |
Memory pool of event structs to avoid real time allocation.
Definition at line 160 of file recording_manager.h.
| MPMCQueue<RecordingEvent *> RecordingManager::event_queue_ |
Event queue.
Definition at line 155 of file recording_manager.h.
| bool RecordingManager::freeing_ = false |
Definition at line 176 of file recording_manager.h.
| int RecordingManager::num_active_recordings_ = 0 |
Number of recordings currently in progress.
Definition at line 152 of file recording_manager.h.
| std::vector<ArrangerObjectPtrVariant> RecordingManager::objects_before_start_ |
Cloned objects before starting recording.
Definition at line 163 of file recording_manager.h.
| std::vector<AutomationPoint *> RecordingManager::pending_aps_ |
Pending recorded automation points.
Definition at line 171 of file recording_manager.h.
| std::binary_semaphore RecordingManager::processing_sem_ { 1 } |
Definition at line 174 of file recording_manager.h.
| std::vector<Region::Uuid> RecordingManager::recorded_ids_ |
Recorded region identifiers, to be used for creating the undoable actions.
Definition at line 168 of file recording_manager.h.