13
0
Commit Graph

1173 Commits

Author SHA1 Message Date
14932d1b86 allow to load huge VST plugin states -fixes #6623
by default libxml has a XML_MAX_TEXT_LENGTH of 10M
with base64 encoding that allows at most 2.5MB state.

set XML_PARSE_HUGE to read large sessions
2015-10-07 14:36:32 +02: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
4178db5f63 globally remove all trailing whitespace from .cpp and .hpp files missed by previous commit 2015-10-04 15:11:15 -04: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
e344d379d2 update semantics of PBD::remove_directory()
Remove the directory recursively including itself. The function
is used in two places only:

* LV2Plugin::add_state() -- no change, remove tmp. state
* Session::save_as()  -- on error, remove target

In both cases removing the folder itself is correct.
2015-09-27 12:44:54 +02:00
f5b3ad18cf PBD::Debug to stdout
fixes debug output on windows. std::cerr is lost,
only std::cout, printf() and fprintf(stderr, ..) work.
2015-09-21 23:08:45 +02:00
2e9e8d3b33 Fix windows test to also pass under wine
It looks as if the default timer resolution for applications running under wine
is different than Windows so just test that the minimum timer resolution is
below a certain amount rather than checking before and after calling
timeBeginPeriod
2015-09-19 10:59:39 +10:00
d609217c55 Make sure that those recently moved functions will be visible if they're needed outside of libpbd 2015-09-18 10:27:27 +01:00
44ea59495c MSVC projects - accommodate some modules that recently got moved or removed
(mostly these got moved out of the PortAudio backend and into libpbd)
2015-09-18 10:25:11 +01:00
c1d6a2fd92 add string_compose argument specializations so that empty std::string and empty C strings are handled as intended 2015-09-17 17:16:23 -04:00
e44212321e Add test to libpbd to check PBD::touch_file and pbd/gstdio_compat.h
GStatBuf is not usable on 32 bit Windows without the redefinition in
pbd/gstdio_compat.h so add a test to check for the correct behavior of
g_stat and g_utime on all platforms now that the issue is fixed.
2015-09-17 23:26:38 +10:00
95b55c7346 fix g_lstat() 2015-09-17 15:01:26 +02:00
7ac691ec82 use pbd's gstdio compatibility wrapper 2015-09-17 14:37:57 +02:00
c90bab4d4e add glib/stdio compat wrapper for mingw64-w32 2015-09-17 14:36:47 +02:00
119e56e7eb Add PBD::QPC::initialize to initialize timer and call it from PBD::init
Check timer for invalid frequency
Precalculate timer tick rate to save a few instructions
Don't use static variables inside functions to avoid checking for initialization
Use static functions inside anonymous namespace for internal linkage
2015-09-16 23:59:38 +10:00
9bd893a6a2 Make sure the QPC frequency is cached so the timer can be used 2015-09-16 22:50:37 +10:00
35a1c3b6a5 Put functions inside anonymous namespace and use static for internal linkage 2015-09-16 11:22:17 +10:00
5d9144173b Mark strings intended for developers/debugging as not for translation 2015-09-16 11:22:17 +10:00
d007fc05b1 De/Initialize MMCSS on windows in PBD::init/cleanup instead of in PA Backend 2015-09-16 11:22:16 +10:00
091c4ed3a7 Move Windows MMCSS related utility functions into libpbd 2015-09-16 11:22:16 +10:00
76a0c823ca Add PBD::DebugBit for debugging thread related debugging output 2015-09-16 11:22:16 +10:00
f58e3abdbe Perform QPC timer check on windows in PBD::init when PBD_TEST_TIMERS env is defined 2015-09-16 11:22:16 +10:00
f4cb4e479d Rename PBD::QPC::get_timer_valid to check_timer_valid and perform timer test
I'm not sure if this test is going to be effective as I don't have hardware to
test on at the moment. As noted in the documentation, Windows XP should be the
only OS where QPC uses a timer source that is non-monotonic(multi-core with
non-syncronized TSC).
2015-09-16 11:22:16 +10:00
cd05d46c00 Add windows specific test for pbd/windows_timer_utils.h API 2015-09-16 11:22:16 +10:00
a88b2da6a9 Fix PBD::MMTIMER::reset_resolution and add some documentation
timeEndPeriod must be called with the same timer resolution value used in
timeBeginPeriod. When the process exits the timer resolution is restored anyway
so this is not very important.
2015-09-16 11:22:16 +10:00
62f75b8b16 Remove glib timer test from pbd testsuite
There are no test assertions and it takes a long time to execute the test so
just leave it disabled for now.
2015-09-16 11:22:16 +10:00
3f5c01e4eb Move Windows timer utility functions from PA backend into libpbd 2015-09-16 11:22:16 +10:00
8e8f8d92c2 allow to run unit-test under wine from srcdir. 2015-09-13 15:30:00 +02:00
eb998b3264 plug some memory leaks in libs 2015-09-12 20:05:25 +02:00
a5e3371b80 Event Pool usage debugging, see also 6ade16b38 2015-09-12 02:18:38 +02:00
ebfd0782e1 add missing include 2015-09-05 11:36:16 +02:00
b66bf67030 fix bitwise enum parsing 2015-09-05 00:00:16 +02:00
a272c50597 Move AudioBackend related debug bits into libardour
I put these in libpbd as that is where the debug bits are for the Waves backend
but I think it makes more sense for them to be in libardour as that is where
the AudioBackend class is defined

I left the Waves debug bits in libpbd for now.
2015-09-02 12:07:14 +10:00
463cf1cf9c Add PBD::DebugBit for debugging issues with undo history 2015-08-19 13:56:06 +10:00
a2fbce0e7f Change return type and name of get_win_special_folder
Rename it get_win_special_folder_path to indicate what it is returning

Move documentation for the function into the header and use doxygen style
comments.

Fixes a couple of memory leaks in ArdourVideoToolPaths class although it looks
as if there are more.
2015-08-18 15:33:03 +10:00
ea32eecf3d Fix Searchpath::operator+ to return by value rather than reference and not modify *this
ladspa_search_path was the only function using this API and it is unaffected by
the change
2015-08-18 15:09:44 +10:00
1d2938b162 Add '_xgetbv()' for MSVC-9 and earlier 2015-08-16 13:14:54 +01:00
f77a409b0c tweaks for AVX detection 2015-08-14 08:53:06 -04:00
5a304e9e33 fix PPC builds 2015-08-12 19:16:01 +02:00
c86b82aa8a comment tweak to show that the __cpuid() intrinsic belongs to MSVC and mingw 2015-08-11 23:45:52 -04:00
94b6e7ffe4 fix mingw compilation 2015-08-12 05:25:29 +02:00
b6f9bbeb2f can't use xgetbv instruction with apple gcc under OS X Lion 2015-08-11 23:06:47 -04:00
41ccfee7a4 clean up FPU code with some ideas from Chromium and the web 2015-08-11 23:00:13 -04:00
bb399c8787 fix stupid logic error in testing separate bits required for AVX support 2015-08-11 20:18:38 -04:00
bb5c969ac0 improved solution for xgetbv() on windows and linux with all compilers 2015-08-11 17:45:41 -04:00
53bc2ba2c1 #ifdef out AVX detection on APPLE 2015-08-11 17:30:33 -04:00
c0ad97c179 add required test of OS support for AVX register use 2015-08-11 17:23:11 -04:00
4079855507 add test for CPU/FPU AVX capabilities 2015-08-11 16:36:46 -04:00
9e918563df remove cruft 2015-08-07 21:10:47 +02:00
e057b873b5 amend e09c620; now with semicolon :) 2015-08-03 23:09:51 +02:00
e09c62052d fix backslashes in quotes (windows), fixes VST scan 2015-08-03 23:06:08 +02:00
e258c827e2 WinMME based midi input/output for portaudio backend
TODO:

Use MMCSS to elevate thread priorities
Enable/test and fix SYSEX related code
2015-07-31 09:59:54 +10:00
009a06a773 Move ARDOUR::touch_file to pbd/file_utils.h 2015-07-26 12:15:19 +10:00
44cba53219 Revert "When saving a session (in a non-English locale) make sure that we use a locale-specific path"
This reverts commit cf5a8651d8.
2015-07-25 23:14:50 +10:00
b2ff1e1734 Add unit test to check that libxml2 expects utf-8 encoded file paths on Windows 2015-07-25 23:14:50 +10:00
226087d06a Only create one test output directory in file copy test
Rather than one directory for each file
2015-07-25 23:14:50 +10:00
dfe2ac1d38 Add unit test to assert that using locale_from_utf8/::open will fail for some file paths on Windows 2015-07-25 23:14:45 +10:00
cf5a8651d8 When saving a session (in a non-English locale) make sure that we use a locale-specific path 2015-07-23 17:55:13 +01:00
7742d07b3a fix compilation w/o posix_malign 2015-07-19 23:24:19 +02:00
2f10fb5b96 OSX 10.5/PPC compat
posix_memalign is 10.6 or later
2015-07-19 23:02:24 +02:00
e29fd9a2fd Minor changes to ensure that MSVC knows about 'CaptureStackBackTrace()' 2015-07-18 15:22:43 +01:00
f1aa1a0a11 fix headers for case-sensitive FS. 2015-06-30 08:18:52 +02:00
3392c05779 volatile should not be used to describe non-hardware lvalues, and fix const cast warning (which removes need for mutable) 2015-06-29 14:18:16 -04:00
2e29e7ee62 increase debug bitset size to accomodate additional debug bits imported from Tracks 2015-06-29 14:18:15 -04:00
943394a49a add PBD::DEBUG bits for WavesAudio and WavesMIDI 2015-06-29 14:18:14 -04:00
Greg Zharun
320da29922 [Summary] AudioPort buffer does not need 64 byte alignment which cache_aligned_malloc provides.
Added new function which accepts argument to specify required alignment.

AudioPort buffer requires 32 byte alignment

[Review Required] YPosdnyakov
2015-06-29 14:18:14 -04:00
480f1e4082 noop: fix indentation/whitespace 2015-06-29 14:18:14 -04:00
6410aa896f Added optimized AVX function for sample processing
Added AVX versions of existing 5 SSE functions. Added 6th AVX function to copy vectors which is 1.5 times faster then memcpy.
Data consistency and validness  is fully tested after processing with new AVX functions on aligned and non aligned buffers.
2015-06-29 14:18:13 -04:00
7fae6bcd87 copy all XCode project files from Tracks.
Rationale: the Waves team maintains the XCode project files, the Ardour crew doesn't. Thus, the Waves'
version is more canonical
2015-06-29 14:18:10 -04:00
Greg Zharun
92e4f227de [Summary] Added correct memory alignment for Windows in ../pbd/malign.h
[Reviewed by] YPozdnyakov
2015-06-29 14:16:43 -04:00
GZharun
ef59fbffa1 [Summary] Added possibility to identify IO thread which does not have required resources initialized during process callback handling
Conflicts:
	libs/ardour/ardour/audioengine.h
	libs/backends/wavesaudio/waves_audiobackend.cc
	libs/pbd/pbd/pool.h
2015-06-29 14:16:42 -04:00
017e580c9f add stacktrace() support for Windows (Grygorii Zharun) 2015-06-29 14:16:42 -04:00
cc543280d9 We were 2 more debug "bits" away from overflow, so recast PBD::DEBUG mechanism away from a 64bit integer and toward std::bitset.
Clean up a few minor related PBD::DEBUG issues along the way
2015-06-12 18:14:09 -04:00
801af5df9e Add the new (UINTSDEFINED) preprocessor directive to all out MSVC projects (just to be on the safe side) 2015-06-09 13:18:42 +01:00
2b294f0b43 add a sanity check 2015-04-30 21:15:35 +02:00
a3209b9b91 Correctly dereference 'fxbuf' when building with MSVC 2015-04-30 18:17:24 +01:00
fe3aafec1c When testing for x86 / x64 architecture, don't forget the symbols that MSVC can understand 2015-04-30 18:17:23 +01:00
d75b27f6dc allow to compile PBD::Signals w/o connection debugging 2015-04-27 17:19:58 +02:00
9687c756a6 const iterators 2015-04-27 17:19:57 +02:00
27dac7c31f Expose “/route/trim” midi binding. 2015-04-26 19:07:45 +02:00
6cb742c289 windows 32bit asm/fpu support.
This still leaves cache_aligned_malloc() in
libs/pbd/malign.cc pending _aligned_free (windows crashes when using
free() on memory allocated with _aligned_malloc()).

So far however there seems to be no issue with default malloc
for audio+midi buffers on win32…
2015-04-24 02:43:52 +02:00
63b3d06fd7 add missing regexp support to pbd/wscript 2015-04-24 00:41:23 +02:00
91b9d6c063 separate build host & target (fix win32 asm) 2015-04-24 00:33:34 +02:00
27b64e481a Remove a 'no longer needed' source from our MSVC project (libpbd)
(FPU functionality was recently merged into a single source file)
2015-04-22 10:44:23 +01:00
e015c57663 <intrin.h> is for windows only 2015-04-21 12:31:02 -04:00
e3156c2cc4 add required header for windows compile of FPU code 2015-04-21 12:25:21 -04:00
9241f58188 fix build of FPU code on OS X by reverting to use of _LP64 to identify 32/64 bit situation 2015-04-21 12:13:00 -04:00
a5d7e8446b merge all mingw and msvc specific code for FPU information into libs/pbd/fpu.cc and remove msvc-specific version 2015-04-21 11:39:31 -04:00
Greg Zharun
8af992c449 [Summary] Added SSE sound processing functions support for Windows. Version 1.
Conflicts:
	wscript
2015-04-21 10:49:00 -04:00
5188f02cfe hide issues with g_close() not being available in somewhat older versions of glib 2015-03-16 13:34:35 -05:00
8ff477ab1a add PBD::toggle_file_existence() 2015-03-16 13:00:28 -05:00
831f2989ac Revert commit 635578b3 relating to pthread debugging
This breaks the build for windows builds that don't use the pthreads_win32
library. Using the opaque pthread_t type like this is probably not a great
idea. Using PBD::pthread_name is another option that I've used elsewhere
that seems more useful.
2015-03-12 23:05:31 +10:00
0f8da2d4cd Define DEBUG_THREAD_SELF when debug is enabled 2015-03-12 23:04:25 +10:00
fe85575a12 fix “no per-thread pool” abort
For some backends the process thread can change (e.g.
switch coreaudio headphone + internal speakers)

If there are existing x-thread event calls this can lead to
the following situation:

1) SessionEvent::operator new
2) audioengine process thread change
3) SessionEvent::operator delete  -> crash, wrong thread

SessionEvent::operator delete can safely push the event back to
the pool for later cleanup..
2015-03-11 00:25:10 +01:00
523f703b3b Move 'poor_mans_glob()' into libpbd 2015-03-09 18:32:55 +00:00
3b57d246d7 Reduce run time/output of PBD::Timer unit test 2015-03-08 22:46:38 +10:00
f694b867c1 Fix PBD::copy_file on windows to work with non-ascii paths
This breakage was indicated by the filesystem unit tests.
2015-03-08 22:46:26 +10:00
cf7d5dbc2d recursive regexp file search. 2015-03-03 19:54:27 +01:00
d7727a77e0 Xthread: blocking read + non-blocking write mode.
Needed for switching the butler to use Crossthreads.
2015-03-01 20:49:55 +01:00
32e23db665 In libpbd the sources 'localeguard.cc/.h' and 'locale_guard.cc/.h' are essentially identical now - so let's remove the former pair which were only ever needed when building with MSVC
(should hopefully avoid future confusion !!)
2015-02-28 12:59:00 +00:00
933e9c2919 Fix unnecessary const violation. 2015-02-27 14:21:45 -05:00
deb4687d5d fix testPathIsWithin unit-test:
* use absolute path
* fix copy/paste typo: bar->jim for symlink test
2015-02-14 05:50:40 +01:00
180b705643 Fix whitespace in pbd/debug.h 2015-02-12 22:10:51 +10:00
0550ec31bc Add local PwdReset class to reset pwd in event of test failure
This fixes subsequent tests that rely on pwd but not PBD::path_is_within
breakage caused by commit 2689848e
2015-02-12 20:06:47 +10:00
9a7ae1ad99 Add some more test assertions so that tests fail when they should 2015-02-12 20:06:47 +10:00
nick_m
b1dafe9a31 Properly deallocate memory when clearing selection_op_history and
before XMLNode*s.
Improve some comments.
2015-02-07 23:33:09 +11:00
nick_m
6b9415aedb Make undo/redo work for:
undo (n) where n > 1
redo (m) where m < n
new transaction.

Previously the redo list was left untouched.
This would lead to utter nonsense in the redo list.

AFAICT this never worked.
2015-02-06 21:54:27 +11:00
e8b6f852f6 make two obvously const methods actually be const 2015-02-05 16:36:09 -05:00
4010884a5b expand PBD::Pool API and add additional DEBUG_TRACE output.
Expanded API splits apart some CrossThreadPool functionality, and provides
access to current pool status information (available(), total(), used(), pending_size())
2015-02-05 16:32:10 -05:00
2689848ed7 Add an extra test to prevent 'PBD::path_is_within()' from looping infinitely on Windows
The infinite loop would happen if the 2 supplied paths were on different Windows drives - for example if one was on drive C:\ and the other on drive E:\

I don't think this new test will be detrimental to the other platforms but if it is, we could easily separate it out with a '#ifdef PLATFORM_WINDOWS' directive.
2015-02-03 11:57:38 +00:00
d2fa2450aa use C locale, because POSIX locale is not supported on windows, and operation is undefined. C works on all platforms 2015-01-19 07:29:25 -06:00
8900d7d9ea On Windows, #include <shellapi.h> so we can use ShellExecute() 2015-01-18 18:52:24 +00:00
a994dbaa0c fix open_uri for windows 2015-01-18 11:16:28 -06:00
d3227ac0d0 Dramatically improve windows session-save-time by avoiding recursive calls to set_locale. 2015-01-18 09:43:21 -06:00
f598105966 Add support for the C99 function 'log2()' which is newly needed by 'gtk2_ardour/tempo_lines.cc' (but isn't available from MSVC).
These changes are MSVC specific and shouldn't affect the other builds.

(incidentally, libpbd already offers a function called 'fast_log2()'. Not sure if that could have been used instead...)
2015-01-10 11:56:24 +00:00
0367aa5825 remove cruft (old unused pre-git version files) 2015-01-09 06:11:57 +01:00
7f486e146d Accommodate some newly introduced source files for building with MSVC (libpbd) 2015-01-02 15:31:39 +00:00
d606a37204 Add PBD debug macros for recording timing data 2015-01-01 19:04:14 +07:00
1da30faf7f Add tests that show the timing differences between the Glib/mm based timeouts
This shows that PBD::Timer is pretty much identical in terms of timing and CPU
usage as Glib TimeoutSources.

They also show the differences on Windows when setting the minimum Multimedia Timer
resolution using timeBeginPeriod
2015-01-01 19:04:09 +07:00
b959b3fb87 Add PBD::Timer/StandardTimer/BlinkTimer classes for convenient timeouts 2015-01-01 18:59:01 +07:00
770c190ccf Add Timing, TimingData and Timed classes for time measurement to pbd/timing.h 2015-01-01 18:58:57 +07:00
46d08595ff class 'PBD::Configuration' doesn't actually get exported from libpbd - so make sure we don't decorate it with LIBPBD_API 2014-12-26 09:16:58 +00:00
8eba7c5c0a Add some newly introduced source files to our MSVC project (libpbd) 2014-12-26 09:15:17 +00:00
f5f89d8c7e fix for case-sensitive FS - aa80515f3 2014-12-23 23:43:25 +01:00
Greg Zharun
aa80515f3f [Summary] Fixed audio export on Windows. Added support of windows platform for the function that calculated hardware concurrency.
Because there was no implementation for this function on windows it used to return 0. This meant that no thread was created to process the data.
2014-12-23 12:55:35 -05:00
280910fd53 new file, derived from old libs/ardour/configuration.cc 2014-12-22 19:48:30 -05:00
d854c5d93c move ARDOUR::Configuration and ARDOUR::ConfigVariable into libpbd 2014-12-22 19:48:30 -05:00
64490e88e4 No need to yell. 2014-12-18 02:26:34 -05:00
9a454ab3d4 Add a newly introduced header file to our MSVC project (libpbd) 2014-12-15 10:26:06 +00:00
0fa5643d20 move ScopedFileDescriptor into libpbd and use it 2014-12-14 12:26:00 -05:00
ec0a74276a Remove (no longer needed) sources from our MSVC project (libpbd) 2014-12-12 09:08:16 +00: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
635578b30b use correct conditional to choose between different DEBUG_THREAD_SELF macros 2014-12-10 11:07:18 -05:00
c06c15596b add DEBUG_THREAD_SELF to allow use of DEBUG_TRACE with thread IDs on both normal pthreads platforms and PTW32 2014-12-10 09:34:32 -05:00
246a4f3018 correct install location for .mo files (i18n) and cleanup LOCALEDIR use a bit 2014-12-09 08:19:11 -05:00
17ad6a5078 Add 'pbd/crossthread.cc' to the MSVC build 2014-12-05 08:40:47 +00:00
55c4889c9a fix windows compilation 2014-12-04 17:13:43 +01:00
b996f07122 add required header 2014-12-04 11:05:33 -05:00
697c397f37 move WSAStartup() and WSACleanup() out of per-object methods into per-library init/cleanup methods 2014-12-04 10:07:11 -05:00
4e8dfda880 clean up whitespace 2014-12-04 09:11:46 -05:00
5f9e81b105 Include pbd/crossthread.cc in the mingw build 2014-12-04 16:16:06 +07:00
12acce0d0e Use correct name for windows.h 2014-12-04 16:15:07 +07:00
7ab3da66b5 fix up BaseUI to use crossthreadchannel on all platforms 2014-12-03 21:11:02 -05:00
f72b87b448 new platform specific crossthreadchannel files 2014-12-03 20:47:59 -05:00
5c51b302ce manually merge new CrossThreadChannel implementation for windows from Tracks 2014-12-03 20:47:27 -05:00
0ec85a4164 Fix running libpbd unit tests when $TOP(in test scripts) is set as relative path
Add test for PBD::canonical_path that was used to track down silly mistake
in test code
2014-12-03 17:44:48 +07:00
dd976d8c7a Add DEBUG_TRACE output to PBD::canonical_path 2014-12-03 17:31:05 +07:00
d360bc3906 Add ability to set libpbd debug options via PBD_DEBUG environment var 2014-12-03 17:31:05 +07:00
4b751f9e87 Move setting _fmode flag on windows into PBD::init
This moves setting of _fmode slightly later in the initialization
of the application via Ardour::init.
2014-12-03 17:31:05 +07:00
dc4d76b1d4 Remove references in pbd test script to libs no longer in source tree 2014-12-03 17:31:04 +07:00
01a17f296f Make pbd test script consistant with other test scripts
remove running script from pwd limitation
2014-12-03 17:31:04 +07:00
aed58d6f39 Use test_output_directory() in pbd filesystem test
This prevents directory being created in pwd and means deletion of
directory is unnecessary
2014-12-03 17:31:04 +07:00
376340a29f Remove unnecessary comma in pbd wscript file 2014-12-03 17:31:04 +07:00
1c1eff8845 Use PBD::tmp_writable_directory in test_output_directory 2014-12-03 17:31:04 +07:00
1abe8f4e42 Add PBD::tmp_writable_directory utility function to pbd/file_utils.h/cc 2014-12-03 17:31:04 +07:00
2996e677c4 Process 'default_ui_config.in' when building with MSVC 2014-11-30 17:57:44 +00:00
ea5876b836 Remove dead code. 2014-11-25 02:11:44 -05:00
78218e8c07 fix OSX open URL in browser 2014-11-24 20:35:38 +01:00
c7ddedc5b8 Simulate 'trunc()' which isn't available in MSVC
(needed by 'gtk2_ardour/editor.cc')
2014-11-24 12:56:07 +00:00
018f559aad Remove a commented out line in 'pbd/stacktrace.h'
(was probably just needed for testing at some stage)
2014-11-24 12:53:24 +00:00
c0e8647806 amend c4533939b9 2014-11-24 00:04:45 +01:00
5aba4df252 fix/silence various compiler warnings.
* ifdef unused static functions
* brackets around assignment and comparision
* no return statement in function returning non-void
* boost concept_checks.hpp unused-local-typedefs
2014-11-23 23:57:55 +01:00
ec01682714 -Wunused-function on windows 2014-11-23 21:01:39 +01: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
973d40e3ac Add support for USE_CAIRO_IMAGE_SURFACE when building with MSVC
(new preprocessor directive - greatly improves CPU loading)
2014-10-29 17:36:30 +00:00
ffde2fb5f9 OS 10.10 compile fixes
* fix clang pickiness regarding boolean
 * ignore ‘verify’ macro
 * tested with Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn)
2014-10-19 23:15:13 +02:00
50ab3db0ca When building 'libs/pbd/cpus.cc' (with MSVC) make sure we know what 'PTW32_VERSION' is 2014-10-08 15:11:26 +01:00
8fe3360c35 fix clock_gettime detection
fixes compilation with mingw64 gcc-4.9.1
2014-10-02 02:53:35 +02:00
822b5443fe add missing header include (for snprintf) 2014-09-30 19:08:16 +02:00
6fbd0a62e4 recursive file copy function 2014-09-28 18:24:08 +02:00
56f4e1513e provide compile-time-enabled/disabled debugging of connections being made to PBD::Signal via PBD::SignalBase::set_debug_connection() 2014-09-11 12:04:14 -04:00
2967226317 Add 'libs/pbd/pbd/pthread_utils.h' to our pbd project (msvc) 2014-09-09 12:06:47 +01:00
61e0705a94 Re-introduce our pthread macros (after fixing an earlier typo)
these are so we can differentiate between 'libpthread' and 'libpthread-win32' (whose implementation is subtlely - though annoyingly! - different)
2014-09-09 12:03:52 +01:00
83b6825bd0 Revert "Add a couple of pthread helper macros"
This reverts commit 8d0ec2403f.
2014-09-09 08:26:26 +01:00
65715dd298 Make sure all our VC projects agree that the product is called 'Mixbus3' (as opposed to just 'Mixbus')
It'd be nice if we could use 'ARDOUR::config_dir_name' for this purpose (or perhaps 'PROGRAM_VERSION'). However, neither is implemented widely enough at present to make this practical. Keep an eye on them though, as possible future strategies.
2014-08-28 07:57:20 +01:00
45afed5e9a Modify our VC project files to work with msvc32-fixup.pl 2014-08-04 09:02:17 +01:00
59822e8dd2 Minor change to 'pbd/controllable.h'
(in MSVC, 'min' & 'max' are not in namespace std)
2014-07-27 11:28:23 +01:00
fdaa6a151a 3 monitor tweaks for the_CLA. shift+click to default, and new preset vals 2014-07-22 16:05:51 -05:00
b2b736d596 tweaks for the monitor section. refactoring of some buttons, using new ArdourKnob instead of VolumeController. New ArdourDisplay shows a controllables user value, and provides support for preset values (hardcoded at present). Further refactoring to come, so that ArdourWidgets are derived from a common class. Controllable now has more responsibility for scaling between internal, user, and interface (knob percent) values. This also needs more refactoring and might have some unintended consequences. tested with audio and nothing seems amiss, yet. 2014-07-18 08:47:45 -05:00
928881b24a Update vcproj files for changed LILV config define. 2014-07-15 15:50:12 -04:00
12025d4ffa possible fix for win SystemExec::wait()
if it does not help, use CREATE_NO_WINDOW and/or peek/pump messages :(
2014-07-11 17:03:55 +02:00
6990c31ed5 Merge branch 'cairocanvas' of git.ardour.org:ardour/ardour into cairocanvas 2014-07-11 09:59:59 -04:00
94e0841625 catch null vfork_exec_wrapper before it is too late 2014-07-11 09:58:45 -04:00
c81604bc18 Add newly introduced (MD5) sources to our MSVC project (also, add visibility stuff to the new MD5 class) 2014-07-11 12:56:17 +01:00
66684c6690 Add PBD::get_suffix() for ripping file suffixes from paths 2014-07-08 12:24:56 -04:00
d3e3f5f005 add operator-= variants for PBD::Searchpath 2014-07-08 00:53:13 -04:00
f4a84a0272 add MD5 implementation to wscript 2014-07-08 00:53:13 -04:00
6b9ef29597 add cleaned up MD5 C++ implementation for general use 2014-07-08 00:53:13 -04:00
4b0933938f optimize SystemExec::output_interposer() 2014-07-06 23:44:48 +02:00
c03034b7d6 Make $PATH search in SystemExec actually work
Make searching of $PATH work when a SystemExec  is created from a
command-line, by making sure that argv[0] is set to the discovered path.
2014-07-05 21:47:49 +01:00
c9b0f0fcb7 debug info to trace down "cannot rename temp session file" errors
..but actually, the real error may be concurrent
calls to Session::save_state()
2014-07-05 20:53:22 +02:00
190542c1d0 splice mode is undefined, undocumented, and buggy. ripple does most of what we want. remove splice for now. leave code because it may be revived later 2014-07-01 16:43:00 -05:00
02e38bab16 search-path: filter out duplicates
Note: this does not yet take care of filtering dups
when directly combining two search-paths.
2014-06-28 22:02:20 +02:00
dcca72dabd Use 'GStatBuf' in preference to 'struct stat' (which isn't necessarily the same thing) 2014-06-28 13:33:28 +01:00
ef78ad0d83 Remove (no longer needed) sources from our MSVC projects 2014-06-28 11:48:08 +01:00
3d0e36f579 Add unit tests for PBD::clear_directory and PBD::remove_directory 2014-06-25 12:40:11 -04:00
2ef5cefa6b Rename internal class to stop the wrong destructor from being called 2014-06-25 12:40:11 -04:00
7262e16216 Add a PBD::TextReceiver in pbd testrunner 2014-06-25 12:40:11 -04:00
24c40c0e88 Add simple test for PBD::find_files_matching_pattern
This helped fix a silly cut and paste error in pbd/file_utils.cc so
might as well included it.
2014-06-25 12:40:11 -04:00
31bceb7570 Use PBD::FdFileDescriptor in PBD::copy_file 2014-06-25 12:40:11 -04:00
8da304be09 Fix PBD::copy_file so it works with non-ASCII filenames on windows 2014-06-25 12:40:11 -04:00
4ced10bfe5 Add test utility function to PBD tests to return some utf-8 strings
This is currently unused
2014-06-25 12:40:11 -04:00
53c959ad8f Add a test for PBD::copy_file using test files with utf-8 encoded filenames 2014-06-25 12:40:11 -04:00
de4fc4843b Fix PBD::copy_files so that it uses O_BINARY on windows and doesn't add line endings to copied files 2014-06-25 12:40:11 -04:00
3000399ce1 Use PLATFORM_WINDOWS define instead of WIN32 in PBD::FileManager 2014-06-25 12:40:11 -04:00
7bf392060e Call PBD::init and PBD::cleanup in pbd test executable 2014-06-25 12:40:11 -04:00
7338c4e242 Add test for PBD::copy_file
From this I can see that PBD::copy_file is not working correctly on windows
as it is adding windows style line endings. Adding O_BINARY to ::open flags
would fix it, but perhaps there is a better way...
2014-06-25 12:40:11 -04:00
94d8dfa256 Add utility function to test lib to create a test directory
There is an identical function in libardour test support lib so we
should probably find a better place to put this at some point
2014-06-25 12:40:11 -04:00
3b1a98f0ec Change PBD::get_files and PBD::get_paths to take a Searchpath instead of directory path
Both these functions use the internal function run_functor_for_paths
which takes a Searchpath so this avoids a temporary variable in cases
where a Searchpath is passed directly.

The usage is the same as the compiler will generate a temporary Searchpath
from a string(directory path) if necessary.
2014-06-25 12:40:11 -04:00
6d0cce528e Add/Update docs in pbd/file_utils.h 2014-06-25 12:40:11 -04:00
851db83fc4 Use run_functor_for_paths in PBD::get_paths 2014-06-25 12:40:10 -04:00
04434f2b88 Rename PBD::get_files_in_directory to just PBD::get_files, change parameter order and fix docs 2014-06-25 12:40:10 -04:00
84d190b7cc Rename PBD::get_directory_contents to PBD::get_paths
shorter name and change order of parameters to match other functions
2014-06-25 12:40:10 -04:00
26ec4038af Use run_functor_for_paths in PBD::find_files_matching_pattern 2014-06-25 12:40:10 -04:00
24599c552d Add function PBD::find_paths_matching_filter 2014-06-25 12:40:10 -04:00
54c0a0144c Use run_functor_for_paths in PBD::find_files_matching_filter 2014-06-25 12:40:10 -04:00
e7141d2b80 Add function to file_utils intended to be used internally 2014-06-25 12:40:10 -04:00
ab6837665f Add some debug output in file_utils.cc 2014-06-25 12:40:10 -04:00
e6c4b0e9e4 Remove reference to strtok_r now that it isn't used 2014-06-25 12:40:10 -04:00
a226068959 Change formatting of DEBUG_TRACE calls to match style guide 2014-06-25 12:40:10 -04:00
cb3a604936 Move functions in pbd/clear_dir.h/cc into pbd/file_utils.h/cc 2014-06-25 12:40:10 -04:00
257897392a Add remove_directory_internal function and use it in PBD::clear_directory and PBD::remove_directory 2014-06-25 12:40:10 -04:00
64856a5862 Reimplement PBD::clear_dir using PBD::get_directory_contents 2014-06-25 12:40:10 -04:00
cd12698b9c Rename PBD::find_file_in_search_path to just PBD::find_file
saves a bit of typing and not necessary if you look at how it is used.
2014-06-25 12:40:10 -04:00
8d0cba3384 Use PBD::find_files_matching_pattern instead of other variations 2014-06-25 12:40:10 -04:00
36fd67ab72 Add a variation of PBD::find_files_matching_pattern for convenience 2014-06-25 12:40:10 -04:00
077c09b105 Add new function PBD::find_files_matching_pattern
This new function is intended to replace the three existing
PBD::find_matching_files_* functions.

The order of parameters matches find_files_matching_regex and
find_files_matching_filter
2014-06-25 12:40:10 -04:00
d9a7d419b2 Change PBD::find_files_matching_regex and PBD::find_files_matching_filter to take a Searchpath 2014-06-25 12:40:10 -04:00
613162df6b Reimplement PBD::find_files_matching_filter using SearchPath and get_directory_contents 2014-06-25 12:40:10 -04:00
56337eade4 Remove limit parameter from PBD::find_files_matching_regex
This limit was not used or documented. The same functionality can be
performed when iterating through the results.
2014-06-25 12:40:10 -04:00
0189ad7e29 Remove parameters from PBD::find_files_matching_regex
The only users of this API always used the same options so just remove
them.
2014-06-25 12:40:09 -04:00
769ee5c1f2 Change PBD::get_files_in_directory to return full paths in result
get_files_in_directory uses get_directory_contents internally now
2014-06-25 12:40:09 -04:00
d1dd5d3ee7 Add PBD::get_directory_contents to pbd/file_utils.h 2014-06-25 12:40:09 -04:00
592654936e Remove (no longer needed) sources from an MSVC project 2014-06-19 11:49:51 +01:00
126ef72d05 Move the definition for 'strtok_r' (to avoid clashing with a different definition in pthread_win32) 2014-06-19 11:47:49 +01:00
3aa2a4ac8c Remove PathScanner class from libpbd 2014-06-17 21:43:30 +10:00
547689a055 Replace all use of PathScanner with equivalent functions from pbd/file_utils.h 2014-06-17 21:41:29 +10:00
26285a3bc0 Add default arguments to match those in PathScanner::operator() 2014-06-17 21:29:41 +10:00
dc81ab8640 Move member functions from PathScanner to functions in pbd/file_utils.h
This allows us to remove PathScanner source file and keep PathScanner class
as header only until it is removed
2014-06-17 21:19:02 +10:00
ea5f9a8ea6 Move PathScanner::operator() into header 2014-06-17 21:14:13 +10:00
b457c938cd Remove unused methods in PathScanner
Now that these methods are only a few lines it doesn't make much sense
to keep them seeing as they are unused. There are also functions with
near identical functionality in pbd/file_utils.h
2014-06-17 21:14:03 +10:00
cde8776e80 Rename PathScanner::run_scan_internal to PathScanner::find_files_matching_filter 2014-06-17 21:13:50 +10:00
3066bd48da Remove PathScanner::run_scan and use PathScanner::run_scan_internal directly 2014-06-17 21:13:41 +10:00
f54092dada Add PathScanner::find_files_matching_regex and move regexp usage to one place 2014-06-17 21:13:32 +10:00
f220d01132 Remove member filter argument from PathScanner methods and use normal filter for regex
Also use regfree to free memory of compiled patterns
2014-06-17 21:13:16 +10:00
0e96d84079 Change PBD::PathScanner API to return results by value to avoid inadvertent memory leaks 2014-06-17 21:13:05 +10:00
36be1a3a9b plug some leaks 2014-06-15 13:24:41 +02:00
12cf9d5be8 fix pathscanner / stl_vector related memory leaks 2014-06-15 13:24:39 +02:00
62ba8d23e3 tracking down concurrency issus is fun. 2014-06-14 16:38:47 +02:00
f0dbd6c085 Export dialog: tidy code, & remove some superfluous debug output
Remove some debug output, tidy up a few whitespace inconsistencies, use
DEBUG::Soundcloud in one more place, and zap a couple of unused variables.
2014-06-12 23:20:05 +01:00
724a69a8d5 Search $PATH for command when creating SystemExec from command line
When creating a SystemExec from a command-line, search $PATH for the
command to execute, so that post-export hooks don't need to specify a full
path.
2014-06-12 23:20:05 +01:00
915bb2f641 close dir opened with opendir() - fixes accumulated fd for plugin state saves 2014-06-10 02:21:22 +02:00
3813c7afae increase system-exec timeouts for kill. 2014-06-05 02:22:13 +02:00
7f18913e6d fix errors in manual conflict resolution 2014-06-02 11:42:35 -04:00
8c9749e42f merge with master and fix 4 conflicts by hand 2014-06-02 11:32:13 -04:00
bc8ccea212 remove debug output from system_exec
remove the debug output from pbd/system_exec: it's of no further use, and
also breaks optimised builds.
2014-05-19 22:49:22 +01:00
0de7c8920b Merge branch 'mingw-updates' of https://github.com/mojofunk/ardour into cairocanvas 2014-05-19 17:19:43 -04:00
5399425f53 Merge branch 'export-dialog' into cairocanvas
Fix merge conflicts in:
	gtk2_ardour/export_range_markers_dialog.cc
	gtk2_ardour/wscript
	libs/ardour/ardour/export_handler.h
	libs/ardour/system_exec.cc
	libs/pbd/pbd/system_exec.h
	libs/pbd/system_exec.cc
2014-05-19 20:54:36 +01:00
7c4259133d SystemExec: copy last argument from command line to argv[]
Make sure to copy any part of the command line after the last delimiter
to argv[] when creating a SystemExec with an escaped command line.
2014-05-18 20:49:58 +01:00
e4442b45cf Use COMPILER_MINGW define rather than __MINGW64__
This is necessary to build with win32 target using mingw-w64 version
on Fedora 19
2014-05-14 09:47:40 +10:00
86a0f10ac7 Reinstate code removed that allows building with mingw and the pthreads-win32 library
Newer versions of mingw-w64 can be built with an included pthread implementation
called winpthreads which uses an integer type for pthread_t but pthreads-win32 does
not.
2014-05-14 09:47:40 +10:00
b895a8f631 Always link to ole32 when building with mingw for get_win_special_folder
needed for CoTaskMemFree in get_win_special_folder
2014-05-14 09:47:40 +10:00
8d0ec2403f Add a couple of pthread helper macros
(to accommodate the fact that in ptw-win32, 'pthread_t' is subtlely different from its non-Windows counterparts)
2014-05-06 09:31:11 +01:00
058986f77b finish unfinished work at basing all install paths on the program name 2014-04-28 21:11:08 -04:00
f31c84a742 close stdin as first attempt to terminate process cleanly. 2014-04-20 23:02:32 +02:00
3552c17b91 fix SystemExec for windows 2014-04-20 02:51:27 +02:00
396fae31a9 Make sure that the input string doesn't go out of scope when using boost::tokenizer 2014-04-14 20:26:48 +01:00
99bf5d9eed backport 1d85ab27a7 and ba128eea from cairocanvas branch to remove GIO (possible hotfix release) 2014-04-14 12:53:30 -04:00
5d9c2104d2 Oops - correct some typos in my previous commit
(accidentally used G_DIR_SEPARATOR instead of G_SEARCHPATH_SEPARATOR)
2014-04-11 15:36:04 +01:00
d95de39339 Make sure we use the correct style of filepath separator on Windows
('libs/ardour/file_source.cc' still to be investigated)
2014-04-11 13:03:48 +01:00
c046b7c9d3 Remove 'pipex' from my pbd.vcproj as it's not needed for Ardour3 2014-04-11 12:59:03 +01:00
077a194430 Add the main VC project files for building Ardour3 with Microsoft Visual Studio
Note that there's no 'VS Solution' file at present and some targets haven't been built yet (e.g. 'fst')
2014-04-08 09:49:35 +01:00
3e7fad52f5 fix conceptual error/thinko in EnvironmentalProtectionAgency when using unsetenv() while iterating over char** environ 2014-04-04 15:25:56 -04:00
6f3ebba3b6 comment tweak 2014-03-24 19:46:07 -04:00
87184ab80d fix a race condition between the death of a thread that communicates with an UI event loop and the event loop itself.
The comment tries to explain it all. There may be a better solution, but I believe that this one is
(a) safe (b) better than the old approach.
2014-03-24 17:47:56 -04:00
ba128eea50 replace use of Gio:: for plugin state 2014-03-22 17:42:26 +01:00
1d85ab27a7 replace use of Gio:: with primitives (fix for #5889 part 1) 2014-03-22 17:42:26 +01:00
543099afba rework SystemExec - use vfork wrapper (and lots of related stuff) 2014-03-13 16:58:07 +01:00
f15932a5c2 fix #ifdef in localtime_r header (from Valeriy) 2014-03-12 09:39:16 -04:00
d52eb5bf23 A few days ago a #define got changed because the relevant section of code was no longer needed when building with mingw. However, it's not needed for msvc either (in fact, msvc won't compile it) so hopefully, the code fragment can be safely removed 2014-03-12 13:22:25 +00:00
f6129ed0f4 prototype vfork exec-wrapper. 2014-03-11 15:48:41 +01:00
495c0de4ac fix up waf build in wake of search path changes earlier today 2014-03-10 17:30:12 -04:00
b6a9bf5d04 add PBD::downcase() functions to libpbd 2014-03-10 17:30:12 -04:00
07d5a389fa add missing include to define LIBPBD_API (mingw build) 2014-03-09 21:05:17 +01:00
944c32346b Add a couple of visibility specifiers that were missing 2014-03-08 11:29:52 +00:00
c7bc009b30 Use LIBPBD_TEMPLATE_API and LIBPBD_TEMPLATE_MEMBER_API where appropriate 2014-03-08 11:28:54 +00:00
912f07b919 mingw build fixes (tested with i686-w64-mingw32 on linux-x86_64) 2014-03-04 15:25:58 +01:00
43421f0b46 minor fix for libpbd wscript on windows 2014-03-03 10:31:53 -05:00
8040df1897 move export_search_path(), previously in gtk2_ardour/main.cc, into libs/pbd 2014-03-02 11:25:54 -05:00
b8419ae7cd use "new" VST search path code and adjust build system to reflect new source files 2014-03-02 10:53:25 -05:00
8ba449bc4e remove fallback_folders code, add simpler more focused get_vst_search_path() and breakout get_win_special_folder() into its own file 2014-03-02 10:52:52 -05:00
c10e11eca5 for windows build, add fallback_folders.cc to libpbd source list 2014-03-01 22:47:19 -05:00
fc88eaf392 add likely stub code for adding linkage to libole when building libpbd on windows.
I may have gotten the precise linkflags string incorrect, but this my best guess.
2014-03-01 22:44:56 -05:00
fd64bba1de add -DPROGRAM_NAME to libpbd compile flags 2014-03-01 22:43:46 -05:00
08c89809ee REALLY REALLY CORRECT template export macros for libpbd 2014-03-01 22:31:47 -05:00
dbd89ed49d REALLY CORRECT template export macros for libpbd 2014-03-01 18:59:44 -05:00
c1a540f34e use template export forms for MemementoCommand 2014-03-01 18:59:37 -05:00
9526fef902 CORRECT template export macros for libpbd 2014-03-01 18:58:41 -05:00
9f121fac81 add template export macros for libpbd 2014-03-01 18:57:36 -05:00