13
0
Commit Graph

119 Commits

Author SHA1 Message Date
fe01666475 Normalize audio when archiving to fixed-point format. 2016-12-27 18:33:41 +01:00
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
8ba7e8f4ef Hide/remove per-track record-mode in favor of global setting. 2016-12-17 02:43:42 +01:00
6298246a00 fix detecting .flac format 2016-09-25 22:20:08 +02:00
22e16b7904 add a SndFileSource c'tor to create .flac encoded file for archiving 2016-09-21 03:40:48 +02:00
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
1c8ad40339 touch peakfile after closing a SndFileSource
libsndfile (can|may) update the headers at close, which can lead to the file being marked newer than the peakfile,
thus causing a rebuild of the peakfile at session (re)load.

Originally detected by Grygorii
2015-12-08 09:07:51 -05:00
6d08797297 update configure time tests and code to use libsndfile 1.0.26's version of the R64 auto-downgrade-to-WAV code 2015-11-24 08:45:10 -05:00
2397429e99 use quotes for in-tree pbd/glib wrapper include 2015-10-05 22:15:18 +02:00
22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
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
ac078fd93f fix sndfilesource::open return value typo. 2015-09-20 18:38:52 +02:00
7ac691ec82 use pbd's gstdio compatibility wrapper 2015-09-17 14:37:57 +02:00
bbfb53e881 RF64, RF64 (WAV) and MBWF native file header formats 2015-09-08 17:40:28 -04:00
ad6c71e1fd Fix invalid error message when selecting directories/folders in Import dialog
On linux SndFileSource::get_soundfile_info was being called with an empty path
value when clicking on a folder in the left side part of the file browser which
resulted in an unnecessary error message.

On Windows every time a directory was selected in the Import dialog,
SndFileSource::get_soundfile_info would fail to open the directory in read only
mode and produce an error, but as we don't want to query/open soundfile info
for directories anyway just test and return if the path is a directory.
2015-09-04 11:50:08 +10:00
949a45b748 fixes/updates for move to ::open() 2015-07-27 00:41:28 +02:00
d91efa7f54 Use g_open and sf_open_fd in SndFileSource for portability 2015-07-25 23:14:52 +10:00
9da934ff29 reworked variant of john’s soundfile locale fix
see 87b89a6

IMPORTANT NOTE: In theory, the correct glibmm function should have been Glib::filename_from_utf8() but I couldn't make that work on Windows and 
ended up using Glib::locale_from_utf8() instead. sfdb import will therefore
need to get re-tested on the other platforms (especially in a non-English locale).


If this fix doesn't work we should probably revert to the previous strategy
but using the global specifier "::g_open()" explicitly…
… and only on PLATFORM_WINDOWS  (POSIX #define g_open open) fails regardless.
2015-07-17 16:03:24 +02:00
87b89a605f Revert "Possible fix for http://tracker.ardour.org/view.php?id=6332"
This reverts commit 1a619472ca.

On Unix systems "#define g_open open" interferes with class member function
IMHO this is the wrong approach, the filename should be converted using
glib::filename_from_utf8().
2015-07-16 19:29:45 +02:00
1a619472ca Possible fix for http://tracker.ardour.org/view.php?id=6332
For sfdb stuff, use glib file functions in preference to ANSI or libsndfile handling. On Windows, we need functions which understand UTF-8 (so that we'll be able to import sound files, even in a non-English locale).
2015-07-16 18:27:52 +02:00
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
ac23461ed9 remove duplicate code
set_header_timeline_position() does exactly that. Also doing it
twice may have lead to a NULL-pointer dereference.
2015-03-11 12:28:47 +01:00
10e183f518 fix two other potential issues with leftover 32 bit integers when reading from sndfilesource.
It is less likely that these would cause issues because the
variables involved define the size of the data read, which
is almost certainly less than the 32 bit limit (i.e. they are
not positional). But to keep things clean and to keep questions
at bay, make them 64 bit values.
2015-02-22 11:12:11 -05:00
b40a305b5a fix incorrect use of int32_t for current position in file while writing to non-destructive sndfilesources 2015-02-22 11:12:11 -05:00
e90a784fb5 force complete peak compute.
Do not skip peaks when creating peak files while recording.
Fixes missing peaks in #6127

(TODO: after double-check and sign-off, remove ‘force’
parameter from ::compute_and_write_peaks API)
2015-01-12 18:19:05 +01:00
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
26f6f80a53 Fix incredibly unlikely NULL pointer dereference. 2014-11-18 02:53:28 -05:00
6b3a8915f3 add abort() to non-reached code
This cleans up a lot of false-positives in static analysis
and also helps compilers to optimize code paths in general.
(tagging the fatal stingstream operator as ‘noreturn’ is
far less trivial)
2014-11-14 11:30:08 +01:00
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
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
5764970709 more work on linking file existence and removability 2014-04-14 03:03:35 -04:00
f7396fd462 clarify comments for SndFileSource constructors 2014-04-04 15:17:14 -04:00
5f703f25a9 'libs/ardour' - If the platform is Windows, prevent lengthy caching by flushing imported files on completion of the import 2013-08-09 17:56:14 +01:00
0dc8806ee4 'libs/ardour' - Platform specific changes and includes 2013-08-04 19:03:32 +01:00
07d94b9b48 'libs/ardour' - Use 'std::vector' instead of dynamically sized arrays (required to be buildable with MSVC) 2013-08-04 15:17:19 +01:00
23bec25bf5 Remove non-portable and unnused header includes 2013-07-11 11:34:37 -04:00
e51cc06133 minor translation fixes/typos from edogawa
git-svn-id: svn://localhost/ardour2/branches/3.0@13812 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-09 14:33:10 +00:00
076542f317 fix "import at file position" when copying or channel-splitting files on import.
git-svn-id: svn://localhost/ardour2/branches/3.0@13711 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-12-23 04:37:36 +00:00
760ccbabfb add -Wpointer-arith -Wcast-qual -Wcast-align and others to compile flags, and fix const cast warnings generated by new flags
git-svn-id: svn://localhost/ardour2/branches/3.0@13124 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-08-10 15:57:09 +00:00
6fa6514cfd Remove over 500 unnecessary includes (including 54 of session.h).
It's slightly possible that this causes trivial build failures on different
configurations, but otherwise shouldn't cause any problems (i.e. no actual
changes other than include/naming/namespace stuff).  I deliberately avoided
removing libardour-config.h since this can mysteriously break things, though a
few of those do seem to be unnecessary.

This commit only targets includes of ardour/*.h.  There is also a very large
number of unnecessary includes of stuff in gtk2_ardour; tackling that should
also give a big improvement in build time when things are modified.


git-svn-id: svn://localhost/ardour2/branches/3.0@12420 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-24 06:09:29 +00:00
23ad8b9f94 remove debugging
git-svn-id: svn://localhost/ardour2/branches/3.0@12380 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-22 13:05:43 +00:00
451a03d68a more 64bit VM debugging nonsense (svn in the fastest route between my system and the VM :)
git-svn-id: svn://localhost/ardour2/branches/3.0@12368 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-21 20:44:04 +00:00
a6c3508bd3 ugly debugging code to try to track down what is going on the 64 bit build VM
git-svn-id: svn://localhost/ardour2/branches/3.0@12366 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-21 18:40:36 +00:00
c7e9102437 a bit more debug on info when we fail to read from a SndFileSource
git-svn-id: svn://localhost/ardour2/branches/3.0@12357 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-21 11:07:41 +00:00
Carl Hetherington
3f647a9dcd Simplify slightly odd update_length() signature.
git-svn-id: svn://localhost/ardour2/branches/3.0@11900 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-11 15:47:33 +00:00
Carl Hetherington
e960ebeebb Add comment.
git-svn-id: svn://localhost/ardour2/branches/3.0@11778 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-01 23:47:37 +00:00
27747a6ee2 fix #4443 - tape track files need to be created when opened, not when written to
git-svn-id: svn://localhost/ardour2/branches/3.0@11363 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-27 17:08:39 +00:00
Carl Hetherington
75e6adcf03 Remove unused read/write data count code.
git-svn-id: svn://localhost/ardour2/branches/3.0@10300 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-10-24 20:45:29 +00:00
Carl Hetherington
7aac277ce1 Add a few asserts.
git-svn-id: svn://localhost/ardour2/branches/3.0@9966 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-08-09 12:53:24 +00:00
Carl Hetherington
cd17e05e3a Fix some set-but-not-used variable warnings from gcc 4.6
git-svn-id: svn://localhost/ardour2/branches/3.0@9783 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-07-02 17:16:46 +00:00