add config vars to control max size of captured MIDI and audio clips
This commit is contained in:
parent
8305ea5762
commit
87ab0a9e0f
@ -295,3 +295,6 @@ CONFIG_VARIABLE (bool, show_video_server_dialog, "show-video-server-dialog", fal
|
||||
CONFIG_VARIABLE (float, export_preroll, "export-preroll", 2.0) // seconds
|
||||
CONFIG_VARIABLE (float, export_silence_threshold, "export-silence-threshold", -90) // dB
|
||||
CONFIG_VARIABLE (float, ppqn_factor_for_export, "ppqn-factor-for-export", 1) // Temporal::ticks_per_beat
|
||||
|
||||
CONFIG_VARIABLE (float, max_midi_clip_size, "max-midi-clip-size", 1024) // number of MIDI events
|
||||
CONFIG_VARIABLE (float, max_audio_clip_duration, "max-audio-clip-duration" , 30.) // seconds
|
||||
|
@ -3519,9 +3519,9 @@ TriggerBox::arm_from_another_thread (Trigger& slot, samplepos_t now, uint32_t ch
|
||||
|
||||
if (_data_type == DataType::MIDI) {
|
||||
ai->midi_buf = new RTMidiBufferBeats;
|
||||
ai->midi_buf->resize (1024); // XXX Config->max_slot_midi_event_size
|
||||
ai->midi_buf->resize (Config->get_max_midi_clip_size());
|
||||
} else {
|
||||
ai->audio_buf.alloc (_session.sample_rate() * 30, chans); // XXX Config->max_slot_audio_duration
|
||||
ai->audio_buf.alloc ((samplecnt_t) round (_session.sample_rate() * Config->get_max_audio_clip_duration()), chans);
|
||||
AudioTrigger* at = dynamic_cast<AudioTrigger*> (&slot);
|
||||
assert (at);
|
||||
ai->stretcher = at->alloc_stretcher ();
|
||||
|
Loading…
Reference in New Issue
Block a user