Commit Graph

42 Commits

Author SHA1 Message Date
Paul Davis 9652789e22 remove unusued capture_transition member (leftover from old Disk processor) 2023-01-28 16:59:36 -07:00
Paul Davis 7c10cf1d54 Automatable now requires (and owns) a time domain to be used by automation data 2021-08-13 12:51:32 -06:00
Paul Davis eae9d276fe libardour: conversion to use timeline types (mega-commit) 2021-08-13 12:51:29 -06:00
Robin Gareus f61eb7e067
Remove unused variables 2021-07-11 08:07:38 +02:00
Robin Gareus acae86781b
Fix race condition when deleting tracks
In rare cases it can happen that the GUI thread results in
a call to DropReferences(), while the backend (RCU) still has a
reference to the track and processes the track.

However the call to DropReferences, DiskIO processor will
have cleared the pointer to _track, leading to segfaults when
the processor runs.

Since the DIO processor is owned by the track, one cannot directly
pass a shared_ptr<Track>. That would keep the Track around forever.

However the DIO processor cannot exist without a track passing
a reference is acceptable.
2021-02-14 21:43:36 +01:00
Robin Gareus ea2bda6668
Fix playback alignment when adding/removing channels
The disk-reader assumes that all playback ringbuffers are in sync
and have the same fill_level.
2020-04-14 03:57:26 +02:00
Paul Davis a4d7b45fe0 remove destructive/tape mode tracks 2020-03-17 16:31:49 -06:00
Paul Davis c3e3930f14 revert to single buffer for disk playback, and 5.x-style overwrite
Also address issues with MIDI and also atomicity of _pending_overwrite
2019-12-10 09:29:22 -07:00
Paul Davis cf7bfae926 fix error when continuing to refill audio playback buffers after a buffer switch
The file_sample[AUDIO] member was not updated to reflect the last-read sample in the
switched-to buffer.

Also move several methods and members from DiskIO to DiskReader where they belong.
2019-12-08 22:39:31 -07:00
Paul Davis 238cc8ed5f functional double buffering when using DiskReader::overwrite_existing_buffers 2019-12-07 10:30:38 -07:00
Paul Davis 1008ac20ff a few parameter changes, and flesh out code to switch rbufs in DiskReader 2019-12-07 10:30:38 -07:00
Paul Davis 8d05f6d4b7 initial conversion to double buffering inside DiskReader
Second buffer is not used (or allocated) yet.
2019-12-07 10:30:38 -07:00
Paul Davis addebc3240 move ownership of an RT MIDI buffer from DiskIO to MidiPlaylist 2019-11-02 16:32:18 -06:00
Paul Davis 2cf9ad8f8c refactor SessionEvent and DiskIO so that we pass around boost::shared_ptr<Track> rather than Route
(this the raw pointers used inside SessionEvent)
2019-11-02 16:32:18 -06:00
Paul Davis 08ab8fc58a remove unused member variable 2019-11-02 16:32:18 -06:00
Paul Davis 22da779322 introduce new all-in-RAM MIDI datastructure and use it for MIDI playback 2019-11-02 16:32:18 -06:00
Paul Davis bd229936ec add finite state machine to control/manage transport state 2019-09-17 18:26:03 -06:00
Robin Gareus a22f918d9d
Update libardour GPL boilerplate and (C) from git log 2019-08-03 15:53:16 +02:00
Robin Gareus 007c4ffdc0
Towards a new disk-reader ringbuffer
This is mainly a NO-OP, introducing a new PlaybackBuffer type
and preparing for its use.

At this point in time, the buffer is just a power-of-two sized
ringbuffer and the disk-reader's read-logic is still unchanged.

Eventually the read and write sample position that are currently
private to the disk-reader can be migrated to be owned by the buffer.
Also Diskreader::read() positions can be matched to read-position ..
+/- buffer reservation and de-click can read w/o committing the read.
2019-02-05 23:29:31 +01:00
Paul Davis e6915e01de new transport slave/master implementation, libs/ edition 2018-09-18 19:06:04 -04:00
Robin Gareus 59029765e8 NO-OP: Rename disk-reader buffer for consistency
This is in preparation to replace the Ringbuffer and avoid over-using
"buf" as variable (it's already used for vectors, as parameter name and
Audiobuffers.
2018-07-09 19:49:18 +02:00
Robin Gareus 87b2c94759 Separate ChannelInfo for disk reader and writer
This allows to use different types for write and read buffers, in
preparation for a dedicated reader-buffer.
2018-07-09 17:30:38 +02:00
Robin Gareus cf11764763 Remove unused disk-reader vari-speed 2018-07-09 17:30:38 +02:00
Robin Gareus 00a4ad712c Move Loop Location to Processors
The processors will becomes responsible to know about loop-positions
and map latency-compensated start_sample, end_sample into the loop-range
as needed.
2017-10-31 18:32:26 +01:00
Paul Davis a2703ea503 remove midi_interpolation member of DiskIOProcessor (was used only to call ::distance() method 2017-10-02 12:43:34 -04:00
Paul Davis 54f9edaf4b NO-OP: comment format change and whitespace 2017-10-02 12:43:34 -04:00
Paul Davis ee3090dff6 remove cruft from DiskIOProcessor header 2017-10-02 12:43:34 -04:00
Paul Davis 275756e96a remove leftover cruft related to wrap buffers from DiskIOProcessor 2017-10-02 12:43:34 -04:00
Robin Gareus 05ab7a46b5 Fix recording MIDI
- 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)
2017-10-01 03:03:44 +02:00
Robin Gareus 94cce9e06e Fix changing playlist (Track is responsible for signal emission) 2017-09-23 02:31:00 +02:00
Paul Davis 30b087ab3d globally change all use of "frame" to refer to audio into "sample".
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
2017-09-18 12:39:17 -04:00
Paul Davis ece52d3278 move _file_frame from DiskIOProcessor into DiskReader (only place where it is needed); split into by-type array to deal with different rate of audio & MIDI i/o 2017-09-18 11:40:53 -04:00
Paul Davis 302d15d2c0 drop route shared_ptr when Route::GoingAway is emitted 2017-09-18 11:40:53 -04:00
Paul Davis e24ca13394 remove all remaining vestiges of per-track varispeed from libardour 2017-09-18 11:40:53 -04:00
Paul Davis 2a1dccabc9 get diskreader working, and remove per-track varispeed API and mechanism 2017-09-18 11:40:53 -04:00
Paul Davis 35c7274cc9 remove Diskstream from Track and derivatives; get ardour to actually startup 2017-09-18 11:40:53 -04:00
Paul Davis a4a87f56e9 mega-commit to save state of first "it compilesand links" state for separated disk i/o changes.
THIS WILL NOT RUN. THIS REQUIRES MANY CHANGES
2017-09-18 11:40:52 -04:00
Paul Davis 94604c6979 merge almost all audio & midi diskstream code, redistribute between DiskIOProcessor, DiskReader,DiskWriter; compile and link 2017-09-18 11:40:52 -04:00
Paul Davis c6dd3045d1 move need-butler from DiskReader to DiskIOProcessor 2017-09-18 11:40:52 -04:00
Paul Davis bcd7a21510 move ChannelInfo structure from DiskReader into DiskIOProcessor 2017-09-18 11:40:52 -04:00
Paul Davis c05cfe3328 merge AudioDiskstream playback code into DiskReader 2017-09-18 11:40:52 -04:00
Paul Davis 934f1a0476 totally crude mockup of new disk_io.h header 2017-09-18 11:40:52 -04:00