Move Windows timer utility functions from PA backend into libpbd

This commit is contained in:
Tim Mayberry 2015-09-12 21:41:00 +10:00
parent 4ffe8ffc0f
commit 3f5c01e4eb
10 changed files with 13 additions and 10 deletions

View file

@ -32,12 +32,12 @@
#include "pbd/compose.h" #include "pbd/compose.h"
#include "pbd/error.h" #include "pbd/error.h"
#include "pbd/file_utils.h" #include "pbd/file_utils.h"
#include "pbd/windows_timer_utils.h"
#include "ardour/filesystem_paths.h" #include "ardour/filesystem_paths.h"
#include "ardour/port_manager.h" #include "ardour/port_manager.h"
#include "i18n.h" #include "i18n.h"
#include "win_utils.h"
#include "mmcss.h" #include "mmcss.h"
#include "audio_utils.h" #include "audio_utils.h"

View file

@ -22,8 +22,8 @@
#include <cmath> #include <cmath>
#include "pbd/compose.h" #include "pbd/compose.h"
#include "pbd/windows_timer_utils.h"
#include "win_utils.h"
#include "midi_util.h" #include "midi_util.h"
#include "mmcss.h" #include "mmcss.h"

View file

@ -23,9 +23,9 @@
#include "pbd/error.h" #include "pbd/error.h"
#include "pbd/compose.h" #include "pbd/compose.h"
#include "pbd/windows_timer_utils.h"
#include "winmmemidi_io.h" #include "winmmemidi_io.h"
#include "win_utils.h"
#include "debug.h" #include "debug.h"
#include "i18n.h" #include "i18n.h"

View file

@ -22,9 +22,9 @@
#include "pbd/debug.h" #include "pbd/debug.h"
#include "pbd/compose.h" #include "pbd/compose.h"
#include "pbd/windows_timer_utils.h"
#include "rt_thread.h" #include "rt_thread.h"
#include "win_utils.h"
#include "midi_util.h" #include "midi_util.h"
#include "mmcss.h" #include "mmcss.h"

View file

@ -26,7 +26,6 @@ def build(bld):
'winmmemidi_io.cc', 'winmmemidi_io.cc',
'winmmemidi_input_device.cc', 'winmmemidi_input_device.cc',
'winmmemidi_output_device.cc', 'winmmemidi_output_device.cc',
'win_utils.cc',
'midi_util.cc', 'midi_util.cc',
'mmcss.cc' 'mmcss.cc'
] ]

View file

@ -54,6 +54,7 @@ DebugBits PBD::DEBUG::AbstractUI = PBD::new_debug_bit ("abstractui");
DebugBits PBD::DEBUG::FileUtils = PBD::new_debug_bit ("fileutils"); DebugBits PBD::DEBUG::FileUtils = PBD::new_debug_bit ("fileutils");
DebugBits PBD::DEBUG::Configuration = PBD::new_debug_bit ("configuration"); DebugBits PBD::DEBUG::Configuration = PBD::new_debug_bit ("configuration");
DebugBits PBD::DEBUG::UndoHistory = PBD::new_debug_bit ("undohistory"); DebugBits PBD::DEBUG::UndoHistory = PBD::new_debug_bit ("undohistory");
DebugBits PBD::DEBUG::Timing = PBD::new_debug_bit ("timing");
/* These are debug bits that are used by backends. Since these are loaded dynamically, /* These are debug bits that are used by backends. Since these are loaded dynamically,
after command-line parsing, defining them in code that is part of the backend after command-line parsing, defining them in code that is part of the backend

View file

@ -56,6 +56,7 @@ namespace PBD {
LIBPBD_API extern DebugBits Configuration; LIBPBD_API extern DebugBits Configuration;
LIBPBD_API extern DebugBits FileUtils; LIBPBD_API extern DebugBits FileUtils;
LIBPBD_API extern DebugBits UndoHistory; LIBPBD_API extern DebugBits UndoHistory;
LIBPBD_API extern DebugBits Timing;
/* See notes in ../debug.cc on why these are defined here */ /* See notes in ../debug.cc on why these are defined here */

View file

@ -16,8 +16,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#ifndef WIN_UTILS_H #ifndef PBD_WINDOWS_TIMER_UTILS_H
#define WIN_UTILS_H #define PBD_WINDOWS_TIMER_UTILS_H
#include <stdint.h> #include <stdint.h>
@ -83,4 +83,4 @@ int64_t get_microseconds ();
} // namespace PBD } // namespace PBD
#endif // WIN_UTILS_H #endif // PBD_WINDOWS_TIMER_UTILS_H

View file

@ -16,14 +16,15 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#include "win_utils.h" #include "pbd/windows_timer_utils.h"
#include <windows.h> #include <windows.h>
#include <mmsystem.h> #include <mmsystem.h>
#include "pbd/compose.h" #include "pbd/compose.h"
#include "pbd/debug.h"
#include "debug.h" #define DEBUG_TIMING(msg) DEBUG_TRACE (PBD::DEBUG::Timing, msg);
namespace { namespace {

View file

@ -148,6 +148,7 @@ def build(bld):
if bld.env['build_target'] == 'mingw': if bld.env['build_target'] == 'mingw':
obj.defines += [ 'NO_POSIX_MEMALIGN' ] obj.defines += [ 'NO_POSIX_MEMALIGN' ]
obj.source += [ 'windows_special_dirs.cc' ] obj.source += [ 'windows_special_dirs.cc' ]
obj.source += [ 'windows_timer_utils.cc' ]
obj.uselib += ' OLE' obj.uselib += ' OLE'
if bld.env['BUILD_TESTS'] and bld.is_defined('HAVE_CPPUNIT'): if bld.env['BUILD_TESTS'] and bld.is_defined('HAVE_CPPUNIT'):