Paul Davis
5188f02cfe
hide issues with g_close() not being available in somewhat older versions of glib
2015-03-16 13:34:35 -05:00
Paul Davis
8ff477ab1a
add PBD::toggle_file_existence()
2015-03-16 13:00:28 -05:00
Tim Mayberry
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
Tim Mayberry
0f8da2d4cd
Define DEBUG_THREAD_SELF when debug is enabled
2015-03-12 23:04:25 +10:00
Robin Gareus
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
John Emmas
523f703b3b
Move 'poor_mans_glob()' into libpbd
2015-03-09 18:32:55 +00:00
Tim Mayberry
3b57d246d7
Reduce run time/output of PBD::Timer unit test
2015-03-08 22:46:38 +10:00
Tim Mayberry
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
Robin Gareus
cf7d5dbc2d
recursive regexp file search.
2015-03-03 19:54:27 +01:00
Robin Gareus
d7727a77e0
Xthread: blocking read + non-blocking write mode.
...
Needed for switching the butler to use Crossthreads.
2015-03-01 20:49:55 +01:00
John Emmas
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
David Robillard
933e9c2919
Fix unnecessary const violation.
2015-02-27 14:21:45 -05:00
Robin Gareus
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
Tim Mayberry
180b705643
Fix whitespace in pbd/debug.h
2015-02-12 22:10:51 +10:00
Tim Mayberry
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
Tim Mayberry
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
Paul Davis
e8b6f852f6
make two obvously const methods actually be const
2015-02-05 16:36:09 -05:00
Paul Davis
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
John Emmas
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
Ben Loftis
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
John Emmas
8900d7d9ea
On Windows, #include <shellapi.h> so we can use ShellExecute()
2015-01-18 18:52:24 +00:00
Ben Loftis
a994dbaa0c
fix open_uri for windows
2015-01-18 11:16:28 -06:00
Ben Loftis
d3227ac0d0
Dramatically improve windows session-save-time by avoiding recursive calls to set_locale.
2015-01-18 09:43:21 -06:00
John Emmas
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
Robin Gareus
0367aa5825
remove cruft (old unused pre-git version files)
2015-01-09 06:11:57 +01:00
John Emmas
7f486e146d
Accommodate some newly introduced source files for building with MSVC (libpbd)
2015-01-02 15:31:39 +00:00
Tim Mayberry
d606a37204
Add PBD debug macros for recording timing data
2015-01-01 19:04:14 +07:00
Tim Mayberry
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
Tim Mayberry
b959b3fb87
Add PBD::Timer/StandardTimer/BlinkTimer classes for convenient timeouts
2015-01-01 18:59:01 +07:00
Tim Mayberry
770c190ccf
Add Timing, TimingData and Timed classes for time measurement to pbd/timing.h
2015-01-01 18:58:57 +07:00
John Emmas
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
John Emmas
8eba7c5c0a
Add some newly introduced source files to our MSVC project (libpbd)
2014-12-26 09:15:17 +00:00
Robin Gareus
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
Paul Davis
280910fd53
new file, derived from old libs/ardour/configuration.cc
2014-12-22 19:48:30 -05:00
Paul Davis
d854c5d93c
move ARDOUR::Configuration and ARDOUR::ConfigVariable into libpbd
2014-12-22 19:48:30 -05:00
David Robillard
64490e88e4
No need to yell.
2014-12-18 02:26:34 -05:00
John Emmas
9a454ab3d4
Add a newly introduced header file to our MSVC project (libpbd)
2014-12-15 10:26:06 +00:00
Paul Davis
0fa5643d20
move ScopedFileDescriptor into libpbd and use it
2014-12-14 12:26:00 -05:00
John Emmas
ec0a74276a
Remove (no longer needed) sources from our MSVC project (libpbd)
2014-12-12 09:08:16 +00: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
Paul Davis
635578b30b
use correct conditional to choose between different DEBUG_THREAD_SELF macros
2014-12-10 11:07:18 -05:00
Paul Davis
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
Paul Davis
246a4f3018
correct install location for .mo files (i18n) and cleanup LOCALEDIR use a bit
2014-12-09 08:19:11 -05:00
John Emmas
17ad6a5078
Add 'pbd/crossthread.cc' to the MSVC build
2014-12-05 08:40:47 +00:00
Robin Gareus
55c4889c9a
fix windows compilation
2014-12-04 17:13:43 +01:00
Paul Davis
b996f07122
add required header
2014-12-04 11:05:33 -05:00
Paul Davis
697c397f37
move WSAStartup() and WSACleanup() out of per-object methods into per-library init/cleanup methods
2014-12-04 10:07:11 -05:00