summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/audiosource.h
AgeCommit message (Collapse)Author
2015-11-24prevent concurrent peak-file init.Robin Gareus
When embedding external files. the same file is queued twice for peak-file generation. Since there are two peak_thread_work threas in SourceFactory, this can lead to inconsistent/missing peaks. TODO: fix the actual cause, duplicate call to setup_peakfile(): #0 ARDOUR::SourceFactory::setup_peakfile (s=..., async=true) at ../libs/ardour/source_factory.cc:116 #1 0x00007ffff6c2552f in ARDOUR::SourceFactory::createExternal (type=..., s=..., path="/tmp/CB_bass_Track08.wav", chn=0, flags=(unknown: 0), announce=true, defer_peaks=true) at ../libs/ardour/source_factory.cc:254 #2 0x0000000000886f50 in Editor::embed_sndfiles (this=0x3810340, paths=std::vector of length 1, capacity 1 = {...}, multifile=false, check_sample_rate=@0x7fffffffc2df: true, disposition=Editing::ImportDistinctFiles, mode=Editing::ImportAsTrack, pos=@0x7fffffffc458: -1, target_regions=1, target_tracks=-1, track=..., instrument=...) at ../gtk2_ardour/editor_audio_import.cc:630 #3 0x0000000000885c7c in Editor::do_embed (this=0x3810340, paths=std::vector of length 1, capacity 1 = {...}, import_as=Editing::ImportDistinctFiles, mode=Editing::ImportAsTrack, pos=@0x7fffffffc458: -1, instrument=...) at ../gtk2_ardour/editor_audio_import.cc:414 #4 0x0000000000e93aeb in SoundFileOmega::do_something (this=0x490f530, action=-5) at ../gtk2_ardour/sfdb_ui.cc:1983 #0 ARDOUR::SourceFactory::setup_peakfile (s=..., async=true) at ../libs/ardour/source_factory.cc:116 #1 0x0000000000888954 in Editor::add_sources (this=0x3810340, paths=std::vector of length 1, capacity 1 = {...}, sources=std::vector of length 1, capacity 1 = {...}, pos=@0x7fffffffc458: 0, disposition=Editing::ImportDistinctFiles, mode=Editing::ImportAsTrack, target_regions=1, target_tracks=-1, track=..., instrument=...) at ../gtk2_ardour/editor_audio_import.cc:883 #2 0x0000000000887131 in Editor::embed_sndfiles (this=0x3810340, paths=std::vector of length 1, capacity 1 = {...}, multifile=false, check_sample_rate=@0x7fffffffc2df: true, disposition=Editing::ImportDistinctFiles, mode=Editing::ImportAsTrack, pos=@0x7fffffffc458: 0, target_regions=1, target_tracks=-1, track=..., instrument=...) at ../gtk2_ardour/editor_audio_import.cc:653 #3 0x0000000000885c7c in Editor::do_embed (this=0x3810340, paths=std::vector of length 1, capacity 1 = {...}, import_as=Editing::ImportDistinctFiles, mode=Editing::ImportAsTrack, pos=@0x7fffffffc458: 0, instrument=...) at ../gtk2_ardour/editor_audio_import.cc:414 #4 0x0000000000e93aeb in SoundFileOmega::do_something (this=0x490f530, action=-5) at ../gtk2_ardour/sfdb_ui.cc:1983
2015-09-15prepare peak-file cleanup/recreate.Robin Gareus
2015-09-10use FileSource::within_session() for peak-filesRobin Gareus
2015-09-10rework peakfile handling:Robin Gareus
- copy old peak-files to new (do not require re-calc) - keep old peak-files (for now, backwards compat) - fix cleanup-sources to remove *new* peak-file - include channel-number in hash (like it was done before) see also 624f76b TODO: add Session > Cleanup > remove/re-create peaks
2015-09-10remove Ardour broken peak-file supportRobin Gareus
Ardour-2.0 put peak-files in a "broken" location for several months. Since then Ardour renamed those files. No more. When loading ancient sessions peak-files are now re-created (in the background).
2015-09-03Review changesMathias Buhr
2015-09-03Fixes case where audiofiles used wrong peakfilesMathias Buhr
2015-09-03Use const reference and renames variableMathias Buhr
2015-06-29ensure that working buffers (for gain + mixing) are large enough.Paul Davis
Remove AudioDiskstream and AudioSource _working_buffers_size members, since they are no longer used
2015-03-11Manual merge of the backend (peakfile reading) part of waveview branch.nick_m
Summary: * use mmap() for the whole peakfile instead of lots of small seek/reads * cache the computed peaks * where possible, open files with O_NOATIME.
2014-12-17Fix various MIDI locking issues.David Robillard
Attempt to make mistakes much less likely in the future by statically requiring caller to pass scoped locks where necessary.
2014-12-10remove file manager LRU cache from code.Paul Davis
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.
2013-10-17add export visibility macros across libardourPaul Davis
2013-03-31more work on the suprisingly ongoing filename/path/origin issuePaul Davis
2013-03-21fix nasty crash when using double-nested compound (consolidated) regions ↵Paul Davis
caused by not (re)allocating enough mixdown buffers; fix up various warnings from valgrind about mismatching operator delete[] by using shared_array<T> rather than shared_ptr<T>, as should have been the case all along
2012-07-25convert from Glib:: to Glib::Threads for all thread-related APIPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@13084 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-11Simplify slightly odd update_length() signature.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11900 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-10-24Remove unused read/write data count code.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@10300 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-09-30fixes for 98% of all the warnings/errors reported by OS X gcc on tigerPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@10179 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-06-01Fix broken whitespace. I'd apologize for the compile times if it was my ↵David Robillard
fault :D git-svn-id: svn://localhost/ardour2/branches/3.0@9654 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-05-28clean up memory leaks with nested source read buffersPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@9621 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-05-28putative fix for crashes related to diskstream playback buffer refills with ↵Paul Davis
compound regions git-svn-id: svn://localhost/ardour2/branches/3.0@9620 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-05-16very basic Join (regions) editing operation. not finished yet, no undoable, ↵Paul Davis
no sensible name for new region, etc. etc git-svn-id: svn://localhost/ardour2/branches/3.0@9518 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-05-13initial volley of work for AudioPlaylistSource, the basic prototype for ↵Paul Davis
sources-that-are-nested git-svn-id: svn://localhost/ardour2/branches/3.0@9507 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-03Remove all use of nframes_t.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@8166 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-11-14Create a new layer if required on record to a track in stacked mode. Fixes ↵Carl Hetherington
#3391. git-svn-id: svn://localhost/ardour2/branches/3.0@8026 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-09-14Tidy up PeaksReady locking slightly and emit it during ↵Carl Hetherington
done_with_peakfile_writes. Fixes some non-appearing peaks after record. git-svn-id: svn://localhost/ardour2/branches/3.0@7776 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-09-14remove Glib::ustring from libardour; allow any characters except '/' and '\' ↵Paul Davis
in paths (may cause issues when loading creatively named 2.X sessions; fix a couple of details of name collection and usage from the startup dialog git-svn-id: svn://localhost/ardour2/branches/3.0@7772 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-08-17forward port 2.X various changes (not all, but i have a list) ending with 6928Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@7643 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-24add and use Source::empty() since it can be done more efficiently than ↵Paul Davis
length(pos) == 0 git-svn-id: svn://localhost/ardour2/branches/3.0@7300 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-05-16Move FileManager code into libpbd. Use it for SMF read/write.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@7108 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-05-14Keep to a quota of open files by closing least recently used ones as ↵Carl Hetherington
required. Should fix #2341. git-svn-id: svn://localhost/ardour2/branches/3.0@7101 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-04-22Allow more than one peaks_ready callback to be pending for an AudioRegionViewCarl Hetherington
at any one time. Prevents problems when there is more than 1 channel for which peaks are not ready; before, the first peaks_ready callback would be forgotten when the second one was requested. Should fix #3074. git-svn-id: svn://localhost/ardour2/branches/3.0@6951 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-04-09Prevent clipping during the import of files from sources that haveCarl Hetherington
amplitudes greater than 1 when data is being stored in files that are clamped. e.g. when importing hot sources and resampling them when the session file format is integer. git-svn-id: svn://localhost/ardour2/branches/3.0@6879 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-04-02remove PBD::Connection (replace use with PBD::ScopedConnection); remove ↵Paul Davis
limitation on transport roll after session end git-svn-id: svn://localhost/ardour2/branches/3.0@6834 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-02-18the Properties & 64bit region commitPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@6695 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-21fully implement and deploy explicit x-thread signal connection syntax ↵Paul Davis
(testing comes next) git-svn-id: svn://localhost/ardour2/branches/3.0@6379 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-19use new syntax for connecting to backend signals that enforces explicit ↵Paul Davis
connection scope, plus a few other related matters git-svn-id: svn://localhost/ardour2/branches/3.0@6376 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-17switch to using boost::signals2 instead of sigc++, at least for libardour. ↵Paul Davis
not finished yet, but compiles, loads sessions, records and can close a session without a crash git-svn-id: svn://localhost/ardour2/branches/3.0@6372 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-25Remove unused source file_changed methods.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@5917 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-15rework Stateful::set_state() patch to avoid default version argumentPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@5787 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-15Part 1 of loading 2.X sessions; some things work, some things don't, hacks ↵Carl Hetherington
a-plenty. LOADING 2.X SESSIONS WITH THIS COMMIT IN PLACE WILL (PROBABLY) CORRUPT THE .ardour FILE, MAKING THE SESSION UNLOADABLE ON 2.X AND LOSING INFORMATION. So don't do that unless you make a backup of the session file first. git-svn-id: svn://localhost/ardour2/branches/3.0@5786 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-14Strip trailing whitespace and fix other whitespace errors (e.g. space/tab ↵David Robillard
mixing). Whitespace changes only. Vimmers, try let c_space_errors = 1 in your .vimrc to highlight this kind of stuff in red. I don't know the emacs equivalent... git-svn-id: svn://localhost/ardour2/branches/3.0@5773 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-12Remove most using declarations from header files.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@5069 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-25*** NEW CODING POLICY ***David Robillard
All #include statements that include a header that is a part of a library bundled with ardour MUST use quotes, not angle brackets. Do this: #include "ardour/types.h" NOT this: #include <ardour/types.h> Rationale: This is best practice in general, to ensure we include the local version and not the system version. That quotes mean "local" (in some sense) and angle brackets mean "system" (in some sense) is a ubiquitous convention and IIRC right in the C spec somewhere. More pragmatically, this is required by (my) waf (stuff) for dependencies to work correctly. That is: !!! FAILURE TO DO THIS CAN RESULT IN BROKEN BUILDS !!! Failure to comply is punishable by death by torture. :) P.S. It's not that dramatic in all cases, but this (in combination with some GCC flags specific to the include type) is the best way I have found to be absolutely 100% positive the local ones are being used (and we definitely want to be absolutely 100% positive on that one). git-svn-id: svn://localhost/ardour2/branches/3.0@4655 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-20Make source length a dynamic thing.David Robillard
Update MIDI region length (actually and visually) when position changes. git-svn-id: svn://localhost/ardour2/branches/3.0@4644 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-19Clean up Region interface, remove Readable stub kludge.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@4643 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-19Introduce new time for session-relative frame time, and make source ↵David Robillard
interface capable of handling 64-bit long sessions. sframes_t is "session frames". The rules for time stamps are: - Anything relative to transport time, session position, etc, should be sframes_t - Anything relative to jack cycles, including the length thereof, should be nframes_t To support sessions which exceed UINT32_MAX frames, we need to replace all the uses of nframes_t for session time with sframes_t, and make sure the conversions are sound. This does not depend on jack's nframes_t; that we are using the same type at all right now was an oops. This is also be kinda nice for readability since the two different time bases have different types... git-svn-id: svn://localhost/ardour2/branches/3.0@4636 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-19Readable is not as generic as its name implies ;)David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@4634 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-17Fix the horrible mess that was anything related to sources and paths.David Robillard
Most significant changes: - Factor out FileSource from AudioFileSource, use for SMFSource too - Explicitly pass embedded rather than mysterious name mangling or whatever - Destroy a ton of duplicated or very-nearly-duplicated code - Clean up and document all that weird source stuff in session.cc git-svn-id: svn://localhost/ardour2/branches/3.0@4609 d708f5d6-7413-0410-9779-e7cbd77b26cf