summaryrefslogtreecommitdiff
path: root/libs/ardour/globals.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-10-28 21:36:40 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-10-28 21:36:40 +0000
commitc4ac43749048c4c0e0ab3656d39384112a628742 (patch)
tree72d3452034c1a0a661587611a63d00509684ca27 /libs/ardour/globals.cc
parentee4493301a8247fb8032dd949f4c44cd4c641221 (diff)
* libardour uses ARDOUR::nframes_t and ARDOUR::nframes64_t explicitly in headers
* use explicit operator<< and operator>> that in turn use PBD::EnumWriter when serializing and deserializing to/from rc files * adds scrolling in mixer window (from 2.X) * BBT math stuff - untested, but basically operational * move LocaleGuard into its own file(s) in libs/pbd * Tempo now uses nframes64_t everywhere (except for sample rate values) * as in 2.X, use mkstemp and hack to avoid temp file nonsense, and remove erroneous free() from disk stats output git-svn-id: svn://localhost/ardour2/branches/3.0@5961 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/globals.cc')
-rw-r--r--libs/ardour/globals.cc50
1 files changed, 1 insertions, 49 deletions
diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc
index 05894d8377..4d75c30a0d 100644
--- a/libs/ardour/globals.cc
+++ b/libs/ardour/globals.cc
@@ -28,7 +28,6 @@
#include <sys/resource.h>
#include <unistd.h>
#include <fcntl.h>
-#include <locale.h>
#include <errno.h>
#ifdef VST_SUPPORT
@@ -53,6 +52,7 @@
#include "pbd/strsplit.h"
#include "pbd/fpu.h"
#include "pbd/file_utils.h"
+#include "pbd/enumwriter.h"
#include "midi++/port.h"
#include "midi++/manager.h"
@@ -401,13 +401,6 @@ ARDOUR::cleanup ()
return 0;
}
-
-microseconds_t
-ARDOUR::get_microseconds ()
-{
- return (microseconds_t) jack_get_time ();
-}
-
ARDOUR::Change
ARDOUR::new_change ()
{
@@ -468,20 +461,6 @@ ARDOUR::no_auto_connect()
return getenv ("ARDOUR_NO_AUTOCONNECT") != 0;
}
-ARDOUR::LocaleGuard::LocaleGuard (const char* str)
-{
- old = strdup (setlocale (LC_NUMERIC, NULL));
- if (strcmp (old, str)) {
- setlocale (LC_NUMERIC, str);
- }
-}
-
-ARDOUR::LocaleGuard::~LocaleGuard ()
-{
- setlocale (LC_NUMERIC, old);
- free ((char*)old);
-}
-
void
ARDOUR::setup_fpu ()
{
@@ -620,30 +599,3 @@ ARDOUR::coverage (nframes_t sa, nframes_t ea,
return OverlapNone;
}
-/* not sure where to put these */
-
-template<class T>
-std::istream& int_to_type (std::istream& o, T& hf) {
- int val;
- o >> val;
- hf = (T) val;
- return o;
-}
-
-std::istream& operator>>(std::istream& o, HeaderFormat& var) { return int_to_type<HeaderFormat> (o, var); }
-std::istream& operator>>(std::istream& o, SampleFormat& var) { return int_to_type<SampleFormat> (o, var); }
-std::istream& operator>>(std::istream& o, AutoConnectOption& var) { return int_to_type<AutoConnectOption> (o, var); }
-std::istream& operator>>(std::istream& o, MonitorModel& var) { return int_to_type<MonitorModel> (o, var); }
-std::istream& operator>>(std::istream& o, RemoteModel& var) { return int_to_type<RemoteModel> (o, var); }
-std::istream& operator>>(std::istream& o, EditMode& var) { return int_to_type<EditMode> (o, var); }
-std::istream& operator>>(std::istream& o, ListenPosition& var) { return int_to_type<ListenPosition> (o, var); }
-std::istream& operator>>(std::istream& o, LayerModel& var) { return int_to_type<LayerModel> (o, var); }
-std::istream& operator>>(std::istream& o, CrossfadeModel& var) { return int_to_type<CrossfadeModel> (o, var); }
-std::istream& operator>>(std::istream& o, SlaveSource& var) { return int_to_type<SlaveSource> (o, var); }
-std::istream& operator>>(std::istream& o, ShuttleBehaviour& var) { return int_to_type<ShuttleBehaviour> (o, var); }
-std::istream& operator>>(std::istream& o, ShuttleUnits& var) { return int_to_type<ShuttleUnits> (o, var); }
-std::istream& operator>>(std::istream& o, TimecodeFormat& var) { return int_to_type<TimecodeFormat> (o, var); }
-std::istream& operator>>(std::istream& o, DenormalModel& var) { return int_to_type<DenormalModel> (o, var); }
-std::istream& operator>>(std::istream& o, WaveformScale& var) { return int_to_type<WaveformScale> (o, var); }
-std::istream& operator>>(std::istream& o, WaveformShape& var) { return int_to_type<WaveformShape> (o, var); }
-