Age | Commit message (Collapse) | Author |
|
The disk-reader assumes that all playback ringbuffers are in sync
and have the same fill_level.
|
|
JACK is not yet finished.
Changes also include minor reformatting and a spelling correction (latecies to latencies)
|
|
|
|
This fixes a crash with missing [MIDI] write-sources after
duplicating tracks [1]: Stealing write-source name fails, because
there is no write-source.
When duplicating tracks, reset_write_sources() is called before
any playlists are set [2]. So no new write-sources are created
because _playlists[DATA-TYPE] is empty.
During normal track creation write-sources are usually added
by the input-change handler [3]. However in this case the
state has been set, and since there is no change,
DiskWriter::configure_io does not call use_new_write_source()
NB. This also re-creates write-source when playlists are changed.
-=-
[1]
#3 0x00007f4420690102 in __GI___assert_fail at assert.c:101
#4 0x0000562bfa300dc9 in boost::shared_ptr<ARDOUR::SMFSource>::operator->() const at /usr/include/boost/smart_ptr/shared_ptr.hpp:734
#5 0x00007f442579ffa1 in ARDOUR::DiskWriter::steal_write_source_name[abi:cxx11]() at ../libs/ardour/disk_writer.cc:1290
#6 0x00007f4425e476b6 in ARDOUR::Track::steal_write_source_name[abi:cxx11]() at ../libs/ardour/track.cc:476
#7 0x00007f4425d060a2 in ARDOUR::Session::create_midi_source_by_stealing_name at ../libs/ardour/session.cc:4955
#8 0x0000562bf9ed39ab in MidiTimeAxisView::add_region at ../gtk2_ardour/midi_time_axis.cc:1650
#9 0x0000562bf9b05f2a in Drag::add_midi_region at ../gtk2_ardour/editor_drag.cc:568
-=-
[2]
#0 0x00007ffff7582e2f in ARDOUR::DiskWriter::reset_write_sources at ../libs/ardour/disk_writer.cc:946
#1 0x00007ffff757fce6 in ARDOUR::DiskWriter::set_state at ../libs/ardour/disk_writer.cc:333
#2 0x00007ffff7a81c93 in ARDOUR::Route::set_processor_state at ../libs/ardour/route.cc:3054
#3 0x00007ffff7a7f5d5 in ARDOUR::Route::set_state at ../libs/ardour/route.cc:2697
#4 0x00007ffff7c2aa1d in ARDOUR::Track::set_state at ../libs/ardour/track.cc:172
#5 0x00007ffff794f204 in ARDOUR::MidiTrack::set_state at ../libs/ardour/midi_track.cc:152
#6 0x00007ffff7b7e06b in ARDOUR::Session::XMLRouteFactory at ../libs/ardour/session_state.cc:1890
#7 0x00007ffff7addf7e in ARDOUR::Session::new_route_from_template at ../libs/ardour/session.cc:3048
#8 0x000055555621329a in DuplicateRouteDialog::on_response(int) at ../gtk2_ardour/duplicate_routes_dialog.cc:194
-=-
[3]
#0 0x00007ffff7583243 in ARDOUR::DiskWriter::use_new_write_source at ../libs/ardour/disk_writer.cc:996
#1 0x00007ffff75831c7 in ARDOUR::DiskWriter::reset_write_sources at ../libs/ardour/disk_writer.cc:989
#2 0x00007ffff75851ea in ARDOUR::DiskWriter::configure_io at ../libs/ardour/disk_writer.cc:1335
#3 0x00007ffff7a7b308 in ARDOUR::Route::configure_processors_unlocked at ../libs/ardour/route.cc:1912
#4 0x00007ffff7a79e4b in ARDOUR::Route::configure_processors at ../libs/ardour/route.cc:1719
#5 0x00007ffff7a86695 in ARDOUR::Route::input_change_handler at ../libs/ardour/route.cc:3632
|
|
|
|
This is mainly for windows compatibility "%F" is not supported.
An alternative would be to s/%F/%Y-%m-%d/ to produce the ISO date.
|
|
|
|
Loop recording creates a single long source, regions have to be
"split" from this source, using "start" as offset.
Since MIDI uses absolute timestamps, offsetting this by accumulating
buffer_position += (*ci)->samples;
like Track::use_captured_audio_sources() does, is not correct.
Furthermore, record_enabled() may be off when stopping recording,
MIDI needs to be flushed regardless.
|
|
|
|
DiskWriter::transport_looped() is called from the session
when engine loops. This does not take local disk-reader run()
latency offset into account.
finish_capture() needs to be postponed until the disk-writer
itself reaches the loop-position. This is achieved by
postponing loop() and calling it once loop-length of samples
has been captured.
This works because engaging loop always seeks to the loop-position
and first loop resets _capture_captured.
|
|
This fixes Audio/MIDI alignment when recording normally.
Loop and/or Punch-in recording is still not aligned properly
(both audio and MIDI).
_accumulated_capture_offset is initialized once, accumulated
offsets (rec_nframes) are kept, even when ::check_record_status()
is called multiple times.
|
|
_accumulated_capture_offset is only used for MIDI,
however this is helpful when debugging.
Previously audio kept accumulating the offset indefinitely.
|
|
This reverts commit 254f22e372ff1155e76bea2c9a6f9c6c85a94868.
|
|
When there is no overlap (Evoral::OverlapNone) of local transport
position and the record-range, MIDI data does not need to be
offset.
This matches audio recording: Only write to the capture ringbuffer
when there is an overlap.
(There is still some unknown, unresolved discrepancy remaining
to be tracked down)
|
|
|
|
to_write must not exceed `total = _samples_pending_write`.
If the write succeeds (events spanning `to_write` samples are written)
to_write is atomically subtracted from `_samples_pending_write`.
|
|
|
|
butler (to write to disk)
|
|
boost::shared_ptr<Track> rather than Route
(this the raw pointers used inside SessionEvent)
|
|
... which implies it has no MIDI input port(s) either.
This fixes behaviour caused by BufferSet::get...() returning a valid MidiBuffer because it was
based on using the _available count within the BufferSet, even though the _count value
indicated there was no buffer available (to match the I/O configuration of the Route).
|
|
When I/O port-counts do not change, plugin re-order happens
in sync in the process-thread. ::configure_io() is only called
to ensure that the current configuration is valid.
In case that the ChanCount does not change, the method must
be realtime-safe and not block.
DiskWriter::reset_write_sources() is not realtime-safe and
implicitly causes a session-save:
Write-sources are destroyed and re-created. This includes
a call to write_source->drop_references(), which triggers
ARDOUR::Session::remove_source(), which saves the session.
Furthermore adding/removing plugins will likewise call
::configure_io().
Previously any processor change on a track lead to
saving the session!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This fixes a memory-leak (_midi_buf was allocated in DiskIOProc
but only delete in DiskReader). Also skip midi-refill early on
|
|
This allows to use different types for write and read buffers, in
preparation for a dedicated reader-buffer.
|
|
The processors will becomes responsible to know about loop-positions
and map latency-compensated start_sample, end_sample into the loop-range
as needed.
|
|
* Processor implement get_state(), classes derived from Processor
implement protected ::state() -- as documented in processor.h
* likewise for Route, Track: make ::state() a protected interface
* removal of "full_state", use explicit "template_save"
* use RAII/Unwind to skip saving automation-state
|
|
|
|
gui_feed_buffer is used for DiskWriter -> GUI notifications.
It was wrongly migrated from MidiDiskstream to DiskReader in 7fb6807
|
|
- Fix API call to add region(midi_region) -- set count to "1"
- Forward DataRecorded() signal
- remove botched merge/rebase"
a4a87f56 accidentally brought back code from old-destructive API
which was removed in af103cf3 and 08c13007
There is no per track NonLayered record mode anymore, it's session global.
- set can_record correctly to not accidentally clear last capture sources
for cont'd recording (toggle track's rec-arm)
|
|
|
|
|
|
This API was not used, also superseded by record w/preroll.
|
|
The general goal is to align transport-sample to be the audible frame
and use that as "anchor" for all processing.
transport_sample cannot become negative (00:00:00:00 is the first audible
frame).
Internally transport pre-rolls (read-ahead) before the transport starts
to move. This allows inputs and disk to prefill the pipeline.
When starting to roll, the session counts down a global "remaning preroll"
counter, which is the worst-latency from in-to-out.
Each route in turn will start processing at its own output-latency.
Route::process_output_buffers() - which does the actual processing
incl disk i/o - begins by offsetting the "current sample" by the
route's process-latency and decrements the offset for each latent
processor. At the end of the function the output will be aligned
and match transport-sample - downstream-playback-latency (if any).
PS. This commit is a first step only: transport looping & vari-speed have
not yet been implemented/updated.
|
|
|
|
|
|
|
|
|
|
The DiskWriter uses AlignStyle which is set dynamically
by the Track and may depend on I/O connections.
|
|
"i18n.h" needs to be included last, after types have been defined or
clang bails out:
"call to function 'operator<<' is not visible in the template definition"
|
|
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode
and video in order to keep the legible
|
|
is needed); split into by-type array to deal with different rate of audio & MIDI i/o
|
|
SerializedRCUManager can't do this by itself
|
|
|
|
|