clear_events() must run in realtime context, which is likely to be asynchronous
with respect to the thread that calls it. So allow caller to pass in a functor
that will be executed (also in realtime context) after the clear is done.
Additionally, allow for a cross-thread callback to the event loop/thread which
initiated/allocated the clear event request so that it can flush its own pending
loop. This part probably isn't necessary but doesn't hurt and is a useful model.
The event would be placed back in the free list at the next event allocation
by the calling thread anyway.
Expanded API splits apart some CrossThreadPool functionality, and provides
access to current pool status information (available(), total(), used(), pending_size())
Gain for a newly created route depends on
the current output_auto_connect mode:
-18 for Stereo Out mode
-0 Multi Out mode
As well removed unnecessary setting gain with 0 dB.
Fader of newly created track(s) has wrong position (values)
Default fader position should be different according to PRD
In Stereo mode fader should have position -18dB
In Multiout mode fader should have position 0dB
The size of the buffer now needs to reflect that we calculate read
refills in bytes, and if we are not using 32 bit float sample format
on disk, that can translate into > 1M samples.
When refilling playback buffer, try to fill it completely, or at least
using the next-lowest power-of-2 as the amount to read. When locating,
where we use do_refill_with_alloc(), only partially fill the buffer.
Work not yet finished, but possibly promising.
Conflicts:
libs/ardour/ardour/midi_diskstream.h
libs/ardour/diskstream.cc
[Details] Please, note, that insensitive (during record) topbar buttons will have incorrect look so far. Will be fixed by VKamyshniy
[Reviewed by QA] MKosharniy
[Deatils] Fixed up region partitioning when slicing a range inside a region. Defect description is completely wrong. Region partitioning was not correct but NOT "split makes 2 operations".
[Reviewed by QA] MKosharniy
[Details] It happened because ARDOUR::Butler::thread_work() was called before Buttler::map_parameters() method was called, which sets up the correct buffering parameters (set_buffering_parameters () call) according to chosen preset.
I've added this calls into Butler::start_thread () to make sure everything is set up and ready for use for Butler.
This is a hot fix, because it requires the review from Paul Davis, and probably more gentle solution. But it's possible this commit may become the main solution itself.