Commit Graph

91 Commits

Author SHA1 Message Date
Robin Gareus
2d7cce44f1 Replace PBD::Signals (1/2) 2024-10-18 20:41:08 +02:00
Robin Gareus
3fbc89e4ee Remove unused overloaded method 2023-06-10 03:33:51 +02:00
Paul Davis
bc38f8d424 MidiSource: change thread mutual exclusion object from Mutex to a RWLock
This allows two reader threads to proceed without blocking each other, as can
happen when the butler renders a MIDI track into an RT-safe buffer while the
GUI reads the same MidiModel/Source for visual display.
2022-04-05 20:52:09 -06:00
Paul Davis
a4d7b45fe0 remove destructive/tape mode tracks 2020-03-17 16:31:49 -06:00
Robin Gareus
d4ecfc7d85 Use new boost::optional API
get_value_or() has been deprecated since boost 1.56
2019-11-21 17:48:56 +01:00
Robin Gareus
a22f918d9d Update libardour GPL boilerplate and (C) from git log 2019-08-03 15:53:16 +02:00
Ben Loftis
edde5d64a2 (Source List) Clean up the natural_position implementation (libardour part). 2019-08-01 12:11:31 -05:00
Robin Gareus
197a1e4446 Close files at rec-stop (re-open as needed)
This is in preparation to allow recording .flac files which are either
read or write not cannot be in read/write mode
2018-11-07 19:13:03 +01:00
Tim Mayberry
27bb420c34 Use XMLNode::get_property() in FileSource class 2017-04-19 09:36:50 +10:00
Robin Gareus
54a79639df Allow gain factor for audio sources.
In preparation for archiving files as .flac (fixed point),
normalized with gain factor.
2016-12-27 18:20:02 +01:00
Paul Davis
69cbcb84a6 spelling corrections from Jaromír Mikeš <mira.mikes@seznam.cz>
Corresponds to https://anonscm.debian.org/cgit/pkg-multimedia/ardour.git/tree/debian/patches/0070-spelling.patch
2016-10-17 17:57:39 -04:00
Robin Gareus
ad0aef7dce add API to change FileSource path in-place
This allows to retain IDs and References of a FileSource, while
changing the actual file under the hood (e.g. from .wav to .flac)
2016-09-21 03:42:06 +02:00
Tim Mayberry
d36c41f128 Use g_strerror instead of strerror in ARDOUR::FileSource
For consistency when calling glib functions and to get UTF-8 strings for
display.
2016-09-15 21:27:55 +10:00
Tim Mayberry
331bfef416 Use ::g_rename instead of ::rename in ARDOUR::FileSource class
The path is in UTF-8 encoding so use Glib functions to properly support paths
containing characters that aren't in the system codepage.

This fixes Clean-up Unused Sources on Windows where paths contain characters
that aren't in the system codepage(usually most non-ascii characters).
2016-09-15 21:27:55 +10:00
Paul Davis
9faf3e5556 correct comment for FileSource::find() 2016-09-07 12:22:15 -04:00
Paul Davis
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
Paul Davis
17ace643e4 OMNIBUS COMMIT: prefer const XMLNode::property method (and provide a real one) 2016-05-04 23:09:45 -04:00
Robin Gareus
22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
Paul Davis
4dc63966f0 globally remove all trailing whitespace from ardour code base.
Paul Davis was responsible for introducing almost all of this.
2015-10-04 14:51:05 -04:00
Mathias Buhr
624f76b229 Fixes case where audiofiles used wrong peakfiles 2015-09-03 09:54:23 +02:00
Paul Davis
d5be54080f add a pure virtual FileSource::close() method so that FileSource::set_path() can ensure we no longer have a handle open 2015-04-20 16:31:06 -04:00
Paul Davis
140778641c get Session::save_as() working much more correctly, and cleaner 2015-01-14 17:53:23 -05:00
Paul Davis
294b99aabf remove file manager LRU cache from code.
This was a very clever attempt to fix a non-problem. If the platform doesn't have enough file descriptors available
then the platform is broken and we're not going to hack around trying to fix it.
2014-12-10 18:28:55 -05:00
David Robillard
82be2325d9 Fix uninitialized members. 2014-12-06 12:06:48 -05:00
Paul Davis
596a9247bd FileSource should not generate its own error message when a file is missing 2014-09-15 14:09:12 -04:00
Paul Davis
fcabd5d8ee initial implementation of "bring all media into session folder". Incomplete but basically functional for audio files 2014-07-08 00:53:13 -04:00
Paul Davis
23e7cf1019 merge with master.
Manually resolved conflicts in import.cc and session.cc
2014-07-01 09:46:18 -04:00
Paul Davis
b660bc8ae9 fix crash recovery: add new constructors to SndFileSource, AudioFileSource, add a new SourceFactory method and finally tweak
AudioDiskstream::use_pending_capture_data() to create both the required whole-file and the in-playlist regions
2014-06-10 10:09:26 -04:00
Paul Davis
107e0d6d02 fix crash recovery: add new constructors to SndFileSource, AudioFileSource, add a new SourceFactory method and finally tweak
AudioDiskstream::use_pending_capture_data() to create both the required whole-file and the in-playlist regions
2014-06-10 10:07:04 -04:00
Paul Davis
74bc0c8468 substantive changes to the logic and safety for naming of (audio/MIDI) sources, especially when created via import 2014-06-02 11:20:37 -04:00
Paul Davis
be0da8ff5c merge 5764970709 from cairocanvas as final(?) change related to data loss 2014-04-14 13:07:07 -04:00
Paul Davis
b49bb451d2 further code simplification and rationalization related to MIDI source/file renaming 2014-04-14 13:05:21 -04:00
Paul Davis
0d5f4c553a dramatic change in logic and naming for operations related to adding a MIDI region on demand and cloning/unlinking
Existing code would cause data loss due to creation of two Source objects referring the same path, one with removable flags and one without. Careful code review suggested a variety of thinkos, function naming problems and other confusion that caused this. I have tried ot extensively comment what is going on with these operations, because it is one key area in which MIDI differs from audio: with audio, capture is the only way to add a new audio region, but for MIDI there are GUI input events that can add a new region.
2014-04-14 13:05:08 -04:00
Paul Davis
384c0a9fac redesign technique for naming/creating regions for MIDI clone (or other non-capture driven MIDI region creation operations).
See comments in Session::new_midi_source_name() for details.
2014-04-14 13:04:14 -04:00
Paul Davis
5764970709 more work on linking file existence and removability 2014-04-14 03:03:35 -04:00
Paul Davis
b81d57f049 further code simplification and rationalization related to MIDI source/file renaming 2014-04-14 02:17:30 -04:00
Paul Davis
343b06d8d3 dramatic change in logic and naming for operations related to adding a MIDI region on demand and cloning/unlinking
Existing code would cause data loss due to creation of two Source objects referring the same path, one with removable flags and one without. Careful code review suggested a variety of thinkos, function naming problems and other confusion that caused this. I have tried ot extensively comment what is going on with these operations, because it is one key area in which MIDI differs from audio: with audio, capture is the only way to add a new audio region, but for MIDI there are GUI input events that can add a new region.
2014-04-14 02:17:30 -04:00
Paul Davis
c52f7957a9 redesign technique for naming/creating regions for MIDI clone (or other non-capture driven MIDI region creation operations).
See comments in Session::new_midi_source_name() for details.
2014-04-10 08:58:04 -04:00
Paul Davis
d2f8f3808b string fix up, II 2014-02-10 11:51:22 -05:00
Paul Davis
456fb789d3 string fix up 2014-02-10 11:47:04 -05:00
Paul Davis
2a7ed69c28 merge with master, with minor conflict fixes 2014-02-07 19:00:44 -05:00
Paul Davis
2c67913245 Fix egregious logic bug in FileSource::removable() and introduce FileSource::is_stub() to hide logic for deciding if a source (file) is a stub 2014-02-07 17:17:30 -05:00
John Emmas
0dc8806ee4 'libs/ardour' - Platform specific changes and includes 2013-08-04 19:03:32 +01:00
Paul Davis
43f7813b24 Fix portability of Session::source_search_path 2013-07-15 08:05:37 -04:00
Paul Davis
542c4b024e Don't use errno after g_file_test on windows 2013-07-15 07:55:01 -04:00
Paul Davis
de8e003289 remove debug output 2013-03-31 09:41:51 -04:00
Paul Davis
8388e82fd3 more work on the suprisingly ongoing filename/path/origin issue 2013-03-31 09:35:06 -04:00
Paul Davis
b691d4bf04 fix up some confusion with filesources' _origin and _file_is_new members. if _origin is set, it means that the file is "external" to the session (aka "embedded") and for some purposes this is more significant than _file_is_new. rename SourceFactory::createReadable() to ::createExternal() to more clearly indicate its purpose; remove never-supplied "origin" argument from SourceFactor::createWritable(). Fixes problems caused by 864ce8f0 2013-03-30 14:02:26 -04:00
Paul Davis
864ce8f0d1 if a filesource is supposed to be new, don't waste time looking for it. if it has its _origin member set, search for that, not its name (affects embedded files) 2013-03-30 10:06:08 -04:00
Paul Davis
3cd8138a41 convert from Glib:: to Glib::Threads for all thread-related API
git-svn-id: svn://localhost/ardour2/branches/3.0@13084 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-07-25 17:48:55 +00:00