summaryrefslogtreecommitdiff
path: root/libs/ardour/audiosource.cc
AgeCommit message (Collapse)Author
2018-03-08Safeguard against possibly invalid peak-requestsRobin Gareus
It may happen that WaveView requests a range that is larger than the data on disk. If start > _length, cnt becomes negative and the function will throw or segfault.
2018-01-26Fix some clang warnings (argument with 'nonnull' attribute passed null)Robin Gareus
2017-09-18globally change all use of "frame" to refer to audio into "sample".Paul Davis
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-04-19Use XMLNode::get/set_property API in ARDOUR::AudioSource classTim Mayberry
2016-12-12Fix a potential deadlock/crash (here tape-track peak-file)Robin Gareus
read_peaks_with_fpp() already holds _lock, build_peaks_from_scratch() takes the _lock again. Depending on glib[mm] and the threading lib it may either result in a deadlock, or with EDEADLK in undefined behavior when a non-recursive lock is released twice.
2016-07-14enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.hPaul Davis
2016-05-04OMNIBUS COMMIT: prefer const XMLNode::property method (and provide a real one)Paul Davis
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-10-05use quotes for in-tree pbd/glib wrapper includeRobin Gareus
2015-10-05remove unused fstream includesRobin Gareus
2015-10-05NOOP, remove trailing tabs/whitespace.Robin Gareus
2015-10-04globally remove all trailing whitespace from ardour code base.Paul Davis
Paul Davis was responsible for introducing almost all of this.
2015-09-17use pbd's gstdio compatibility wrapperRobin Gareus
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-06terminate peak-file creation on session-closeRobin Gareus
2015-09-05create peak files in background when loading sessionRobin Gareus
2015-09-03Fixes case where audiofiles used wrong peakfilesMathias Buhr
2015-09-03Use const reference and renames variableMathias Buhr
2015-07-25Use g_open instead of ::open in AudioSource for portabilityTim Mayberry
This is only really for Windows as g_open and ::open are the same thing on other platforms
2015-07-25Use GStatBuf in AudioSource::initialize_peakfile for portabilityTim Mayberry
This was initially part of f89a976f that got reverted
2015-07-25Revert "When peakfiles get opened using a non-glib function (in a ↵Tim Mayberry
non-English locale) make sure that we pass locale-specific paths" This reverts commit f89a976f1a0477fba30bd7117310e6d04b370d68.
2015-07-23When peakfiles get opened using a non-glib function (in a non-English ↵John Emmas
locale) make sure that we pass locale-specific paths
2015-07-17do not carry out a size check on peakfiles for files still being recorded.Paul Davis
The size check (and possible rebuild) causes a crash with MSVC. It would be nice to know more about why.
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-06-11comment tweakPaul Davis
2015-06-03check size of peak file before attempting to use it. Rebuild from scratch if ↵Paul Davis
necessary.
2015-06-03when AudioSource::read_peaks() provides start+cnt too close to the end, be ↵Paul Davis
sure to reset expected_peaks and scale to match the corrected values
2015-04-15fix for memory overrun during read_peaks(), from sebastian reicheltPaul Davis
2015-03-21Don't open peakfiles O_NONBLOCK or O_NOATIME.nick_m
O_NOATIME removed due to what appears to be a bug in fuse where open fails. O_NONBLOCK was basically unjustifiable.
2015-03-11Fix windows compilation for merged waveview branch.nick_m
2015-03-11Fix compilation for osx.nick_m
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-14move ScopedFileDescriptor into libpbd and use itPaul Davis
2014-12-14Only attempt to close our peakfile '_fd' if we have a valid handleJohn Emmas
(yesterday's fix was needed in a 2nd place)
2014-12-13Only attempt to close '_peakfile_fd' if we have a valid handleJohn Emmas
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.
2014-09-15fix compiler warningPaul Davis
2014-04-04fix typo in commentPaul Davis
2013-09-21Merge remote-tracking branch 'remotes/origin/cairocanvas' into windowsJohn Emmas
Conflicts (hopefully resolved): gtk2_ardour/marker.cc gtk2_ardour/midi_region_view.h gtk2_ardour/region_gain_line.h gtk2_ardour/utils.cc gtk2_ardour/video_image_frame.cc gtk2_ardour/wscript libs/backends/jack/wscript
2013-08-08Cast param for std::time to a pointer of time_tMichael Fisher
- bleeding clang (trunk 186535 v3.4) fails here
2013-08-08Revert "Remove non-portable and unnused header includes"Paul Davis
This reverts commit 7ef79d3f4b02e3d2e71d6888fbedd9b3f9c325c7.
2013-08-08Remove non-portable and unnused header includesPaul Davis
2013-08-04'libs/ardour' - Compiler specific includes and includesJohn Emmas
2013-08-04'libs/ardour' - Main body of changes required for building with MSVCJohn Emmas
2013-07-31fix merge conflict from masterPaul Davis
2013-07-29Cast param for std::time to a pointer of time_tMichael Fisher
- bleeding clang (trunk 186535 v3.4) fails here