[beast: 2/14] BSE: use Bse diagnostics and BSE_CONVENIENCE
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 2/14] BSE: use Bse diagnostics and BSE_CONVENIENCE
- Date: Thu, 23 Mar 2017 17:13:31 +0000 (UTC)
commit a6372c1d1549492ff59f04d316f6edd9d604d415
Author: Tim Janik <timj gnu org>
Date: Tue Mar 14 00:44:31 2017 +0100
BSE: use Bse diagnostics and BSE_CONVENIENCE
Signed-off-by: Tim Janik <timj gnu org>
bse/Makefile.am | 6 +++---
bse/bseblockutils.cc | 2 +-
bse/bsecategories.cc | 18 +++++++++---------
bse/bsecategories.hh | 6 +++---
bse/bsecontainer.cc | 4 ++--
bse/bsedevice.cc | 18 +++++++++---------
bse/bseenginemaster.cc | 18 +++++++++---------
bse/bseengineschedule.cc | 34 +++++++++++++++++-----------------
bse/bsefilter-ellf.cc | 8 ++++----
bse/bseglue.cc | 8 ++++----
bse/bseladspamodule.cc | 6 +++---
bse/bsemain.cc | 2 +-
bse/bsemidinotifier.cc | 2 +-
bse/bsenote.cc | 6 +++---
bse/bsenote.hh | 2 +-
bse/bseobject.cc | 2 +-
bse/bseprocedure.cc | 4 ++--
bse/bsesnooper.cc | 22 +++++++++++-----------
bse/bsestorage.cc | 24 ++++++++++++------------
bse/bseutils.cc | 2 +-
bse/bseutils.hh | 3 +--
bse/bsewave.cc | 10 +++++-----
bse/gslcommon.cc | 6 +++---
bse/gslcommon.hh | 2 +-
bse/gsldatacache.cc | 22 +++++++++++-----------
bse/gsldatahandle-vorbis.cc | 20 ++++++++++----------
bse/gsldatautils.cc | 10 +++++-----
bse/gslvorbis-enc.cc | 4 ++--
bse/gslvorbis-enc.hh | 2 +-
bse/gslwavechunk.cc | 38 +++++++++++++++++++-------------------
bse/pybse/Makefile.am | 2 +-
bse/tests/Makefile.am | 2 +-
bse/tests/blocktests.cc | 2 ++
bse/tests/firhandle.cc | 3 ++-
bse/tests/misctests.cc | 2 ++
bse/tests/resamplehandle.cc | 2 ++
bse/tests/subnormals.cc | 2 ++
37 files changed, 167 insertions(+), 159 deletions(-)
---
diff --git a/bse/Makefile.am b/bse/Makefile.am
index 65d32f3..947bef7 100644
--- a/bse/Makefile.am
+++ b/bse/Makefile.am
@@ -143,7 +143,7 @@ libbse_@MAJOR@include_HEADERS = $(bse_public_headers) bse.idl $(bse_idl_s
nodist_libbse_@MAJOR@include_HEADERS = bsebasics.genidl.hh bseserverapi.hh bsehack.idl bseclientapi.hh
bsegentypes.h
libbse_@MAJOR@_la_SOURCES = $(bse_sources)
nodist_libbse_@MAJOR@_la_SOURCES = $(bse_proc_gen_sources) gslfft.cc
-libbse_@MAJOR@_la_CXXFLAGS = $(AM_CXXFLAGS) $(LIBBSE_CFLAGS) -DRAPICORN_CONVENIENCE
+libbse_@MAJOR@_la_CXXFLAGS = $(AM_CXXFLAGS) $(LIBBSE_CFLAGS) -DBSE_CONVENIENCE
libbse_@MAJOR@_la_LIBADD = $(top_builddir)/sfi/libsfi-@MAJOR@.la $(LIBBSE_LIBS)
libbse_@MAJOR@_la_LDFLAGS = $(strip \
$(AM_LDFLAGS) \
@@ -356,13 +356,13 @@ progs_LDADD = libbse-@MAJOR@.la $(LIBBSE_LIBS)
noinst_PROGRAMS += bseprocidl
bseprocidl_SOURCES = bseprocidl.cc
bseprocidl_LDADD = $(progs_LDADD)
-bseprocidl_CXXFLAGS = $(AM_CXXFLAGS) $(LIBBSE_CFLAGS)
+bseprocidl_CXXFLAGS = $(AM_CXXFLAGS) $(LIBBSE_CFLAGS) -DBSE_CONVENIENCE
# == bsetool ==
noinst_PROGRAMS += bsetool
bsetool_SOURCES = bsetool.cc
bsetool_LDADD = $(progs_LDADD)
-bsetool_CXXFLAGS = $(AM_CXXFLAGS) $(LIBBSE_CFLAGS)
+bsetool_CXXFLAGS = $(AM_CXXFLAGS) $(LIBBSE_CFLAGS) -DBSE_CONVENIENCE
# == Tests ==
EXTRA_DIST += oldidl.idl
diff --git a/bse/bseblockutils.cc b/bse/bseblockutils.cc
index f8b1d69..7e7a761 100644
--- a/bse/bseblockutils.cc
+++ b/bse/bseblockutils.cc
@@ -153,7 +153,7 @@ class BlockImpl : virtual public Bse::Block::Impl {
/* there is currently only a test for the SSE filter code, so in the
* non-SSE-case we simply always return true
*/
- printout ("SSE filter implementation not tested: no SSE support available\n");
+ Bse::printout ("SSE filter implementation not tested: no SSE support available\n");
return true;
}
};
diff --git a/bse/bsecategories.cc b/bse/bsecategories.cc
index c1e5672..c901c9b 100644
--- a/bse/bsecategories.cc
+++ b/bse/bsecategories.cc
@@ -23,7 +23,7 @@ category_entries()
}
static inline const Bse::Category*
-centry_find (const String &category)
+centry_find (const std::string &category)
{
for (const auto ¢ry : category_entries())
if (centry.category == category)
@@ -32,7 +32,7 @@ centry_find (const String &category)
}
static inline uint
-category_strip_toplevels (const String &category, GType type)
+category_strip_toplevels (const std::string &category, GType type)
{
static const struct { uint length; const char *prefix; } scripts[] = {
{ 9, "/Project/", },
@@ -76,7 +76,7 @@ category_strip_toplevels (const String &category, GType type)
}
static uint
-leaf_index (const String &string)
+leaf_index (const std::string &string)
{
bool in_quote = false;
uint pos = 0;
@@ -91,7 +91,7 @@ leaf_index (const String &string)
}
static inline Bse::Category*
-centry_new (const char *caller, const String &category, GType type)
+centry_new (const char *caller, const std::string &category, GType type)
{
const uint mindex = category_strip_toplevels (category, type);
if (!mindex)
@@ -130,7 +130,7 @@ check_type (GType type)
}
void
-bse_categories_register (const String &category, const char *i18n_category, GType type, const uint8
*pixstream)
+bse_categories_register (const std::string &category, const char *i18n_category, GType type, const uint8
*pixstream)
{
assert_return (!category.empty());
Bse::Category *centry = centry_new (RAPICORN_SIMPLE_FUNCTION, category, type);
@@ -155,7 +155,7 @@ bse_categories_register (const String &category, const char *i18n_category, GTyp
--end;
Rapicorn::StringVector tags;
if (name < end)
- tags = Rapicorn::string_split (String (name, end - name), "/");
+ tags = Rapicorn::string_split (std::string (name, end - name), "/");
Bse::ServerImpl::register_source_module (centry->otype, title,
Rapicorn::string_join (";", tags),
pixstream);
@@ -186,7 +186,7 @@ cats_sort (void)
}
static inline Bse::CategorySeq
-categories_match (const String &pattern, GType base_type, BseCategoryCheck check, gpointer data)
+categories_match (const std::string &pattern, GType base_type, BseCategoryCheck check, gpointer data)
{
Bse::CategorySeq cseq;
GPatternSpec *pspec = g_pattern_spec_new (pattern.c_str());
@@ -204,14 +204,14 @@ categories_match (const String &pattern, GType base_type, BseCategoryCheck check
}
Bse::CategorySeq
-bse_categories_match (const String &pattern, GType base_type, BseCategoryCheck check, void *data)
+bse_categories_match (const std::string &pattern, GType base_type, BseCategoryCheck check, void *data)
{
cats_sort ();
return categories_match (pattern, 0, check, data);
}
Bse::CategorySeq
-bse_categories_match_typed (const String &pattern, GType base_type)
+bse_categories_match_typed (const std::string &pattern, GType base_type)
{
cats_sort ();
return categories_match (pattern, base_type, NULL, NULL);
diff --git a/bse/bsecategories.hh b/bse/bsecategories.hh
index dbe8fcf..596b743 100644
--- a/bse/bsecategories.hh
+++ b/bse/bsecategories.hh
@@ -10,9 +10,9 @@
typedef gboolean (BseCategoryCheck) (const Bse::Category *category, void *data);
/* --- prototypes --- */
-void bse_categories_register (const String &category, const char *i18n_category,
GType type, const uint8 *pixstream);
-Bse::CategorySeq bse_categories_match (const String &pattern, GType base_type,
BseCategoryCheck check, void *data);
-Bse::CategorySeq bse_categories_match_typed (const String &pattern, GType base_type);
+void bse_categories_register (const std::string &category, const char
*i18n_category, GType type, const uint8 *pixstream);
+Bse::CategorySeq bse_categories_match (const std::string &pattern, GType base_type,
BseCategoryCheck check, void *data);
+Bse::CategorySeq bse_categories_match_typed (const std::string &pattern, GType base_type);
Bse::CategorySeq bse_categories_from_type (GType type);
void bse_categories_register_stock_module (const char *untranslated_category_trunk, GType type,
const guint8 *pixstream);
diff --git a/bse/bsecontainer.cc b/bse/bsecontainer.cc
index 7405086..e263697 100644
--- a/bse/bsecontainer.cc
+++ b/bse/bsecontainer.cc
@@ -243,10 +243,10 @@ bse_container_add_item (BseContainer *container,
uname += 3; /* strip Bse namespace for convenient naming */
}
- String next_name;
+ std::string next_name;
uint i = 0;
do
- next_name = string_format ("%s-%u", uname, ++i);
+ next_name = Bse::string_format ("%s-%u", uname, ++i);
while (bse_container_lookup_item (container, next_name.c_str()));
g_object_set (item, "uname", next_name.c_str(), NULL); /* no undo */
diff --git a/bse/bsedevice.cc b/bse/bsedevice.cc
index 9f6784a..6398b05 100644
--- a/bse/bsedevice.cc
+++ b/bse/bsedevice.cc
@@ -283,16 +283,16 @@ bse_device_dump_list (GType base_type,
if (klass != last_klass)
{
if (klass->driver_syntax)
- printerr ("%s%s %s=%s\n", indent, klass->driver_name, klass->driver_name, klass->driver_syntax);
+ Bse::printerr ("%s%s %s=%s\n", indent, klass->driver_name, klass->driver_name,
klass->driver_syntax);
else
- printerr ("%s%s\n", indent, klass->driver_name);
+ Bse::printerr ("%s%s\n", indent, klass->driver_name);
if (klass->driver_blurb)
{
GString *gstring = g_string_new (klass->driver_blurb);
while (gstring->len && gstring->str[gstring->len - 1] == '\n')
gstring->str[--gstring->len] = 0;
g_string_prefix_lines (gstring, indent2);
- printerr ("%s\n", gstring->str);
+ Bse::printerr ("%s\n", gstring->str);
g_string_free (gstring, TRUE);
}
last_klass = klass;
@@ -300,7 +300,7 @@ bse_device_dump_list (GType base_type,
}
if (entry->device_error)
{
- printerr ("%sError: %s\n", indent2, entry->device_error);
+ Bse::printerr ("%sError: %s\n", indent2, entry->device_error);
last_topic = NULL;
}
else if (entry->device_blurb)
@@ -309,24 +309,24 @@ bse_device_dump_list (GType base_type,
if (!last_topic || strcmp (last_topic, topic) != 0)
{
if (topic[0])
- printerr ("%sDevices (%s):\n", indent2, topic);
+ Bse::printerr ("%sDevices (%s):\n", indent2, topic);
else
- printerr ("%sDevices:\n", indent2);
+ Bse::printerr ("%sDevices:\n", indent2);
last_topic = topic;
}
- printerr ("%s > %s\n", indent, entry->device_blurb);
+ Bse::printerr ("%s > %s\n", indent, entry->device_blurb);
}
}
if (with_auto)
{
- printerr ("%sauto\n", indent);
+ Bse::printerr ("%sauto\n", indent);
GString *gstring = g_string_new (/* TRANSLATORS: keep this text to 70 chars in width */
_("Auto is a special driver, it acts as a placeholder for\n"
"automatic driver selection."));
while (gstring->len && gstring->str[gstring->len - 1] == '\n')
gstring->str[--gstring->len] = 0;
g_string_prefix_lines (gstring, indent2);
- printerr ("%s\n", gstring->str);
+ Bse::printerr ("%s\n", gstring->str);
g_string_free (gstring, TRUE);
}
bse_device_entry_list_free (ring);
diff --git a/bse/bseenginemaster.cc b/bse/bseenginemaster.cc
index 666476e..7e05b18 100644
--- a/bse/bseenginemaster.cc
+++ b/bse/bseenginemaster.cc
@@ -559,7 +559,7 @@ master_process_job (BseJob *job)
if (job->data.message)
{
JOB_DEBUG ("debug");
- printerr ("BSE-ENGINE: %s\n", job->data.message);
+ Bse::printerr ("BSE-ENGINE: %s\n", job->data.message);
}
else
JOB_DEBUG ("nop");
@@ -940,7 +940,7 @@ engine_wakeup_slaves()
void
engine_run_slave ()
{
- String myid = string_format ("DSP #%u", ++slave_counter);
+ std::string myid = Bse::string_format ("DSP #%u", ++slave_counter);
Bse::TaskRegistry::add (myid, Rapicorn::ThisThread::process_pid(), Rapicorn::ThisThread::thread_pid());
while (slaves_running)
{
@@ -1010,13 +1010,13 @@ master_process_flow (void)
if (profile->profile_node)
{
if (profile->profile_maxtime > uint64 (bse_profile_modules))
- printout ("Excess Node: %p Duration: %llu usecs ((void(*)())%p) \n",
- profile->profile_node, (long long unsigned int) profile->profile_maxtime,
- profile->profile_node->module.klass->process);
+ Bse::printout ("Excess Node: %p Duration: %llu usecs ((void(*)())%p) \n",
+ profile->profile_node, (long long unsigned int) profile->profile_maxtime,
+ profile->profile_node->module.klass->process);
else
- printout ("Slowest Node: %p Duration: %llu usecs ((void(*)())%p) \r",
- profile->profile_node, (long long unsigned int) profile->profile_maxtime,
- profile->profile_node->module.klass->process);
+ Bse::printout ("Slowest Node: %p Duration: %llu usecs ((void(*)())%p) \r",
+ profile->profile_node, (long long unsigned int) profile->profile_maxtime,
+ profile->profile_node->module.klass->process);
}
}
@@ -1235,7 +1235,7 @@ MasterThread::master_thread()
if (err >= 0)
loop.revents_filled = TRUE;
else if (errno != EINTR)
- printerr ("%s: poll() error: %s\n", __func__, g_strerror (errno));
+ Bse::printerr ("%s: poll() error: %s\n", __func__, g_strerror (errno));
if (loop.revents_filled)
need_dispatch = _engine_master_check (&loop);
}
diff --git a/bse/bseengineschedule.cc b/bse/bseengineschedule.cc
index 136b5c2..1217f2f 100644
--- a/bse/bseengineschedule.cc
+++ b/bse/bseengineschedule.cc
@@ -3,7 +3,7 @@
#include "bseengineutils.hh"
#define SCHED_DEBUG(...) BSE_KEY_DEBUG ("sched", __VA_ARGS__)
-#define CHECK_DEBUG() Bse::bse_debug_enabled ("sched")
+#define CHECK_DEBUG() Bse::debug_enabled ("sched")
/* --- prototypes --- */
static void schedule_node (EngineSchedule *schedule,
@@ -98,37 +98,37 @@ unschedule_cycle (EngineSchedule *sched,
static void
_engine_schedule_debug_dump (EngineSchedule *sched)
{
- printerr ("sched(%p) = {\n", sched);
+ Bse::printerr ("sched(%p) = {\n", sched);
if (sched)
{
guint i;
- printerr (" n_items=%u, n_vnodes=%u, leaf_levels=%u, secured=%u,\n",
- sched->n_items, sfi_ring_length (sched->vnodes), sched->leaf_levels, sched->secured);
- printerr (" in_pqueue=%u, cur_leaf_level=%u,\n",
- sched->in_pqueue, sched->cur_leaf_level);
- printerr (" cur_node=%p, cur_cycle=%p,\n",
- sched->cur_node, sched->cur_cycle);
+ Bse::printerr (" n_items=%u, n_vnodes=%u, leaf_levels=%u, secured=%u,\n",
+ sched->n_items, sfi_ring_length (sched->vnodes), sched->leaf_levels, sched->secured);
+ Bse::printerr (" in_pqueue=%u, cur_leaf_level=%u,\n",
+ sched->in_pqueue, sched->cur_leaf_level);
+ Bse::printerr (" cur_node=%p, cur_cycle=%p,\n",
+ sched->cur_node, sched->cur_cycle);
for (i = 0; i < sched->leaf_levels; i++)
{
SfiRing *ring, *head = sched->nodes[i];
if (!head)
continue;
- printerr (" { leaf_level=%u:", i);
+ Bse::printerr (" { leaf_level=%u:", i);
for (ring = head; ring; ring = sfi_ring_walk (ring, head))
- printerr (" node(%p(i:%u,s:%u))", ring->data,
- ((EngineNode*) ring->data)->integrated,
- ((EngineNode*) ring->data)->sched_tag);
- printerr (" },\n");
+ Bse::printerr (" node(%p(i:%u,s:%u))", ring->data,
+ ((EngineNode*) ring->data)->integrated,
+ ((EngineNode*) ring->data)->sched_tag);
+ Bse::printerr (" },\n");
}
SfiRing *ring;
- printerr (" { vnodes:");
+ Bse::printerr (" { vnodes:");
for (ring = sched->vnodes; ring; ring = sfi_ring_walk (ring, sched->vnodes))
- printerr (" vnode(%p(pj:%u))", ring->data, ((EngineNode*) ring->data)->probe_jobs != 0);
- printerr (" },\n");
+ Bse::printerr (" vnode(%p(pj:%u))", ring->data, ((EngineNode*) ring->data)->probe_jobs != 0);
+ Bse::printerr (" },\n");
}
- printerr ("};\n");
+ Bse::printerr ("};\n");
}
diff --git a/bse/bsefilter-ellf.cc b/bse/bsefilter-ellf.cc
index d844342..9191384 100644
--- a/bse/bsefilter-ellf.cc
+++ b/bse/bsefilter-ellf.cc
@@ -51,10 +51,10 @@ typedef struct {
#define ellf_outputf(...) printout (__VA_ARGS__)
#define ellf_inputf(...) printout (__VA_ARGS__)
#else
-#define error_printf(...) while (0) { printerr (__VA_ARGS__); }
-#define ellf_debugf(...) while (0) { printerr (__VA_ARGS__); }
-#define ellf_outputf(...) while (0) { printout (__VA_ARGS__); }
-#define ellf_inputf(...) while (0) { printout (__VA_ARGS__); }
+#define error_printf(...) while (0) { Bse::printerr (__VA_ARGS__); }
+#define ellf_debugf(...) while (0) { Bse::printerr (__VA_ARGS__); }
+#define ellf_outputf(...) while (0) { Bse::printout (__VA_ARGS__); }
+#define ellf_inputf(...) while (0) { Bse::printout (__VA_ARGS__); }
#endif
static const char* ellf_filter_design (const BseIIRFilterRequest *ifr,
diff --git a/bse/bseglue.cc b/bse/bseglue.cc
index 133107f..f1fe806 100644
--- a/bse/bseglue.cc
+++ b/bse/bseglue.cc
@@ -284,10 +284,10 @@ bglue_value_from_serializable (const GValue *svalue,
if (!dtype || !sfi_value_transform (svalue, value))
{
if (0)
- printerr ("from=%s to=%s, transformable=%u\n",
- g_type_name (G_VALUE_TYPE (svalue)),
- g_type_name (dtype),
- g_value_type_transformable (G_VALUE_TYPE (svalue), dtype));
+ Bse::printerr ("from=%s to=%s, transformable=%u\n",
+ g_type_name (G_VALUE_TYPE (svalue)),
+ g_type_name (dtype),
+ g_value_type_transformable (G_VALUE_TYPE (svalue), dtype));
g_warning ("unable to convert to value type `%s' from serializable (`%s')",
g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)),
g_type_name (stype));
diff --git a/bse/bseladspamodule.cc b/bse/bseladspamodule.cc
index 9d84933..7b6c08f 100644
--- a/bse/bseladspamodule.cc
+++ b/bse/bseladspamodule.cc
@@ -113,7 +113,7 @@ bse_ladspa_module_class_init_from_info (BseLadspaModuleClass *ladspa_module_clas
BseObjectClass *object_class = BSE_OBJECT_CLASS (ladspa_module_class);
BseSourceClass *source_class = BSE_SOURCE_CLASS (ladspa_module_class);
BseLadspaInfo *bli = ladspa_module_class->bli;
- uint ochannel, ichannel, i;
+ uint ochannel, ichannel;
assert (ladspa_module_class->bli != NULL &&
gobject_class->set_property == NULL &&
@@ -122,7 +122,7 @@ bse_ladspa_module_class_init_from_info (BseLadspaModuleClass *ladspa_module_clas
gobject_class->set_property = ladspa_derived_set_property;
gobject_class->get_property = ladspa_derived_get_property;
- for (i = 0; i < bli->n_cports; i++)
+ for (size_t i = 0; i < bli->n_cports; i++)
{
BseLadspaPort *port = bli->cports + i;
GParamSpec *pspec, *pspec2 = NULL;
@@ -215,7 +215,7 @@ bse_ladspa_module_class_init_from_info (BseLadspaModuleClass *ladspa_module_clas
}
}
- for (i = 0; i < bli->n_aports; i++)
+ for (size_t i = 0; i < bli->n_aports; i++)
{
BseLadspaPort *port = bli->aports + i;
if (port->input)
diff --git a/bse/bsemain.cc b/bse/bsemain.cc
index f014be1..ac218be 100644
--- a/bse/bsemain.cc
+++ b/bse/bsemain.cc
@@ -272,7 +272,7 @@ _bse_init_async (int *argc, char **argv, const char *app_name, const Bse::String
// start main BSE thread
if (std::atexit (reap_main_loop_thread) != 0)
- fatal ("BSE: failed to install main thread reaper");
+ Bse::fatal ("BSE: failed to install main thread reaper");
auto *init_queue = new Rapicorn::AsyncBlockingQueue<int>();
async_bse_thread = std::thread (bse_main_loop_thread, init_queue); // calls bse_init_intern
// wait for initialization completion of the core thread
diff --git a/bse/bsemidinotifier.cc b/bse/bsemidinotifier.cc
index 797ea5b..e2c86b9 100644
--- a/bse/bsemidinotifier.cc
+++ b/bse/bsemidinotifier.cc
@@ -52,7 +52,7 @@ bse_midi_notifier_class_init (BseMidiNotifierClass *klass)
gobject_class->finalize = bse_midi_notifier_finalize;
for (i = 0; i < BSE_MIDI_MAX_CHANNELS; i++)
- number_quarks[i] = g_quark_from_string (string_format ("%u", i).c_str());
+ number_quarks[i] = g_quark_from_string (Bse::string_format ("%u", i).c_str());
signal_midi_event = bse_object_class_add_dsignal (object_class, "midi-event",
G_TYPE_NONE, 1,
diff --git a/bse/bsenote.cc b/bse/bsenote.cc
index cf422aa..3c91841 100644
--- a/bse/bsenote.cc
+++ b/bse/bsenote.cc
@@ -9,7 +9,7 @@
/* --- functions --- */
int
-bse_note_from_string (const String ¬e_string)
+bse_note_from_string (const std::string ¬e_string)
{
return sfi_note_from_string (note_string.c_str());
}
@@ -77,8 +77,8 @@ bse_note_from_freq (Bse::MusicalTuning musical_tuning, double freq)
#endif
/* transform to note */
if (0)
- printerr ("freqlookup: %.9f < %.9f < %.9f : key = %.9f diffs = %+.9f %+.9f %+.9f\n", m[-1], m[0], m[1],
freq,
- freq - m[-1], freq - m[0], m[1] - freq);
+ Bse::printerr ("freqlookup: %.9f < %.9f < %.9f : key = %.9f diffs = %+.9f %+.9f %+.9f\n", m[-1], m[0],
m[1], freq,
+ freq - m[-1], freq - m[0], m[1] - freq);
int note = m - table + BSE_KAMMER_NOTE;
/* yield VOID when exceeding corner cases */
if (note + 1 < BSE_MIN_NOTE || note > BSE_MAX_NOTE + 1)
diff --git a/bse/bsenote.hh b/bse/bsenote.hh
index 1211d22..42eceda 100644
--- a/bse/bsenote.hh
+++ b/bse/bsenote.hh
@@ -53,7 +53,7 @@ double bse_note_to_freq (Bse::MusicalTuning musical_tuning, int
double bse_note_to_tuned_freq (Bse::MusicalTuning musical_tuning, int note, int fine_tune);
Bse::NoteDescription bse_note_description (Bse::MusicalTuning musical_tuning, int note, int finetune);
-int bse_note_from_string (const String ¬e_string);
+int bse_note_from_string (const std::string ¬e_string);
/* --- freq array --- */
diff --git a/bse/bseobject.cc b/bse/bseobject.cc
index dbf60ac..f8c567a 100644
--- a/bse/bseobject.cc
+++ b/bse/bseobject.cc
@@ -51,7 +51,7 @@ ObjectImpl::changed (const String &what)
void
objects_debug_leaks ()
{
- if (Bse::bse_debug_enabled ("leaks"))
+ if (Bse::debug_enabled ("leaks"))
{
GList *list, *objects = bse_objects_list (BSE_TYPE_OBJECT);
for (list = objects; list; list = list->next)
diff --git a/bse/bseprocedure.cc b/bse/bseprocedure.cc
index 7ea6fc4..647cd06 100644
--- a/bse/bseprocedure.cc
+++ b/bse/bseprocedure.cc
@@ -9,8 +9,8 @@
#include <string.h>
#define PDEBUG(...) BSE_KEY_DEBUG ("procs", __VA_ARGS__)
-#define CHECK_DEBUG() Bse::bse_debug_enabled ("procs")
-#define HACK_DEBUG /* very slow and leaks memory */ while (0) printerr
+#define CHECK_DEBUG() Bse::debug_enabled ("procs")
+#define HACK_DEBUG /* very slow and leaks memory */ while (0) Bse::printerr
/* --- macros --- */
#define parse_or_return bse_storage_scanner_parse_or_return
diff --git a/bse/bsesnooper.cc b/bse/bsesnooper.cc
index 3f17d1d..7356457 100644
--- a/bse/bsesnooper.cc
+++ b/bse/bsesnooper.cc
@@ -176,19 +176,19 @@ snooper_process (BseModule *module,
seen_ninf |= BSE_FLOAT_IS_INF_POSITIVE (v);
}
else if (UNLIKELY (BSE_FLOAT_IS_SUBNORMAL (v)))
- seen_subn = TRUE;
+ seen_subn = TRUE;
}
avg /= (gdouble) n_values;
- printout ("C%2u: max=%+1.5f min=%+1.5f avg=%+1.5f %u[%+1.5f,..,%+1.5f] freq=%+1.2f %s%s%s%s\r",
- data->context_id,
- max, min, avg,
- n_values,
- first, last,
- BSE_FREQ_FROM_VALUE (avg),
- seen_nan ? " +NAN" : "",
- seen_pinf ? " +PINF" : "",
- seen_ninf ? " +NINF" : "",
- seen_subn ? " +SUBNORM" : "");
+ Bse::printout ("C%2u: max=%+1.5f min=%+1.5f avg=%+1.5f %u[%+1.5f,..,%+1.5f] freq=%+1.2f %s%s%s%s\r",
+ data->context_id,
+ max, min, avg,
+ n_values,
+ first, last,
+ BSE_FREQ_FROM_VALUE (avg),
+ seen_nan ? " +NAN" : "",
+ seen_pinf ? " +PINF" : "",
+ seen_ninf ? " +NINF" : "",
+ seen_subn ? " +SUBNORM" : "");
}
}
diff --git a/bse/bsestorage.cc b/bse/bsestorage.cc
index 4f5f134..9e52137 100644
--- a/bse/bsestorage.cc
+++ b/bse/bsestorage.cc
@@ -595,14 +595,14 @@ item_link_resolved (gpointer data,
}
/// Retrive the value of @a field.key through aux_vector_find() and convert the value to @a ValueType.
-template<typename ValueType = String> ValueType
-aux_vector_get (const std::vector<String> &auxvector, const String &field, const String &key, const String
&fallback = "")
+template<typename ValueType = std::string> ValueType
+aux_vector_get (const std::vector<std::string> &auxvector, const std::string &field, const std::string &key,
const std::string &fallback = "")
{
return Rapicorn::string_to_type<ValueType> (Rapicorn::Aida::aux_vector_find (auxvector, field, key,
fallback));
}
static bool
-any_set_from_string (BseStorage *self, Any &any, const String &string)
+any_set_from_string (BseStorage *self, Bse::Any &any, const std::string &string)
{
using namespace Rapicorn;
switch (any.kind())
@@ -631,13 +631,13 @@ any_set_from_string (BseStorage *self, Any &any, const String &string)
any.set_enum (einfo, v);
break;
}
- default: fatal ("unhandled Any: %s; string=%s", any.repr(), string);
+ default: Bse::fatal ("unhandled Any: %s; string=%s", any.repr(), string);
}
return true;
}
static GTokenType
-scanner_parse_paren_rest (GScanner *scanner, String *result)
+scanner_parse_paren_rest (GScanner *scanner, std::string *result)
{
// configure scanner to pass through most characters, so we can delay parsing
const GScannerConfig saved_config = *scanner->config;
@@ -654,7 +654,7 @@ scanner_parse_paren_rest (GScanner *scanner, String *result)
scanner->config->char_2_token = false;
GTokenType expected_token = G_TOKEN_NONE, token = g_scanner_get_next_token (scanner);
uint level = 1; // need one ')' to terminate
- String rest;
+ std::string rest;
while (token && expected_token == G_TOKEN_NONE)
{
if (token == G_TOKEN_CHAR)
@@ -702,7 +702,7 @@ scanner_parse_paren_rest (GScanner *scanner, String *result)
}
static GTokenType
-storage_parse_property_value (BseStorage *self, const String &name, Any &any, const std::vector<std::string>
&aux_data)
+storage_parse_property_value (BseStorage *self, const std::string &name, Bse::Any &any, const
std::vector<std::string> &aux_data)
{
using namespace Rapicorn;
assert_return (BSE_IS_STORAGE (self), G_TOKEN_ERROR);
@@ -1141,7 +1141,7 @@ bse_storage_warn_str (BseStorage *self, const std::string &string)
if (self->rstore)
sfi_rstore_warn (self->rstore, string);
else
- printerr ("BseStorage: while storing: %s", string.c_str());
+ Bse::printerr ("BseStorage: while storing: %s", string.c_str());
}
GTokenType
@@ -1161,7 +1161,7 @@ bse_storage_error_str (BseStorage *self, const std::string &string)
if (self->rstore)
sfi_rstore_error (self->rstore, string);
else
- printerr ("BseStorage: ERROR: while storing: %s\n", string.c_str());
+ Bse::printerr ("BseStorage: ERROR: while storing: %s\n", string.c_str());
}
static void
@@ -1231,7 +1231,7 @@ store_item_properties (BseItem *item,
}
static void
-storage_store_property_value (BseStorage *self, const String &property_name, Any any, const
std::vector<std::string> &aux_data)
+storage_store_property_value (BseStorage *self, const std::string &property_name, Bse::Any any, const
std::vector<std::string> &aux_data)
{
using namespace Rapicorn;
if (Rapicorn::Aida::aux_vector_check_options (aux_data, property_name, "hints", "skip-default"))
@@ -1274,8 +1274,8 @@ static void
store_cxx_item_properties (BseItem *bitem, BseStorage *self)
{
Bse::ItemImpl *item = bitem->as<Bse::ItemImpl*>();
- const std::vector<String> auxvector = item->__aida_aux_data__();
- for (const String &pname : item->__aida_dir__())
+ const std::vector<std::string> auxvector = item->__aida_aux_data__();
+ for (const std::string &pname : item->__aida_dir__())
if (Rapicorn::Aida::aux_vector_check_options (auxvector, pname, "hints", "r:w:S")) // readable,
writable, storage
storage_store_property_value (self, pname, item->__aida_get__ (pname), auxvector);
}
diff --git a/bse/bseutils.cc b/bse/bseutils.cc
index ad00356..7356863 100644
--- a/bse/bseutils.cc
+++ b/bse/bseutils.cc
@@ -460,7 +460,7 @@ bse_xinfos_add_num (gchar **xinfos,
const gchar *key,
SfiNum num)
{
- return bse_xinfos_add_value (xinfos, key, string_format ("%d", num).c_str());
+ return bse_xinfos_add_value (xinfos, key, Bse::string_format ("%d", num).c_str());
}
const gchar*
diff --git a/bse/bseutils.hh b/bse/bseutils.hh
index ffb293e..ae16985 100644
--- a/bse/bseutils.hh
+++ b/bse/bseutils.hh
@@ -2,8 +2,7 @@
#ifndef __BSE_UTILS_H__
#define __BSE_UTILS_H__
-#include <rapicorn-core.hh>
-
+#include <bse/bsedefs.hh>
#include <bse/bseenums.hh>
#include <bse/bseglobals.hh>
#include <bse/bsecompat.hh>
diff --git a/bse/bsewave.cc b/bse/bsewave.cc
index be118eb..f65a383 100644
--- a/bse/bsewave.cc
+++ b/bse/bsewave.cc
@@ -263,7 +263,7 @@ bse_wave_load_wave_file (BseWave *self,
if (!g_path_is_absolute (file_name)) /* resolve relative path using search dir */
{
- String sample_path;
+ std::string sample_path;
SfiRing *files, *walk;
if (bse_main_args->override_sample_path)
sample_path = bse_main_args->override_sample_path;
@@ -629,10 +629,10 @@ bse_wave_restore_private (BseObject *object,
if (expected_token == G_TOKEN_NONE && parsed_wchunk.data_handle)
{
if (0)
- printerr ("restore-wave-chunk: nch=%u of=%f mf=%f dh=%p\n",
- parsed_wchunk.wh_n_channels,
- parsed_wchunk.wh_osc_freq, parsed_wchunk.wh_mix_freq,
- parsed_wchunk.data_handle);
+ Bse::printerr ("restore-wave-chunk: nch=%u of=%f mf=%f dh=%p\n",
+ parsed_wchunk.wh_n_channels,
+ parsed_wchunk.wh_osc_freq, parsed_wchunk.wh_mix_freq,
+ parsed_wchunk.data_handle);
if (parsed_wchunk.data_handle && parsed_wchunk.xinfos)
{
GslDataHandle *tmp_handle = parsed_wchunk.data_handle;
diff --git a/bse/gslcommon.cc b/bse/gslcommon.cc
index db904a5..f1f2b2c 100644
--- a/bse/gslcommon.cc
+++ b/bse/gslcommon.cc
@@ -195,7 +195,7 @@ gsl_byte_order_from_string (const gchar *string)
}
Bse::Error
-gsl_file_check (const String &file_name, const String &mode)
+gsl_file_check (const std::string &file_name, const std::string &mode)
{
if (Rapicorn::Path::check (file_name, mode))
return Bse::Error::NONE;
@@ -363,7 +363,7 @@ gsl_progress_wipe (GslProgressState *pstate)
memset (wstr, ' ', pstate->wipe_length);
wstr[pstate->wipe_length] = '\r';
wstr[pstate->wipe_length + 1] = 0;
- printerr ("%s", wstr);
+ Bse::printerr ("%s", wstr);
g_free (wstr);
pstate->wipe_length = 0;
}
@@ -387,7 +387,7 @@ gsl_progress_printerr (gpointer message,
detail ? detail : "",
detail ? ")" : "");
l = strlen (str);
- printerr ("%s \r", str);
+ Bse::printerr ("%s \r", str);
g_free (str);
return l;
}
diff --git a/bse/gslcommon.hh b/bse/gslcommon.hh
index 539a7fd..44a1216 100644
--- a/bse/gslcommon.hh
+++ b/bse/gslcommon.hh
@@ -14,7 +14,7 @@ Bse::Error gsl_error_from_errno (gint sys_errno,
Bse::Error gsl_error_select (guint n_errors,
Bse::Error first_error,
...);
-Bse::Error gsl_file_check (const String &file_name, const String &mode);
+Bse::Error gsl_file_check (const std::string &file_name, const std::string &mode);
/* --- progress notification --- */
diff --git a/bse/gsldatacache.cc b/bse/gsldatacache.cc
index b404ff9..f11116b 100644
--- a/bse/gsldatacache.cc
+++ b/bse/gsldatacache.cc
@@ -414,8 +414,8 @@ data_cache_free_olders_Lunlock (GslDataCache *dcache,
rejuvenate = dcache->max_age - max_lru;
if (0)
- printout ("start sweep: dcache (%p) with %u nodes, max_age: %u, rejuvenate: %u (max_lru: %u)\n",
- dcache, dcache->n_nodes, dcache->max_age, rejuvenate, max_lru);
+ Bse::printout ("start sweep: dcache (%p) with %u nodes, max_age: %u, rejuvenate: %u (max_lru: %u)\n",
+ dcache, dcache->n_nodes, dcache->max_age, rejuvenate, max_lru);
size = dcache->node_size + (dcache->padding << 1);
slot_p = NULL;
for (i = 0; i < dcache->n_nodes; i++)
@@ -451,10 +451,10 @@ data_cache_free_olders_Lunlock (GslDataCache *dcache,
global_dcache_spinlock.unlock();
}
if (0)
- printerr ("freed %u nodes (%u bytes) remaining %u bytes (this dcache: n_nodes=%u)\n",
- n_freed, n_freed * CONFIG_NODE_SIZE (),
- global_dcache_n_aged_nodes * CONFIG_NODE_SIZE (),
- dcache->n_nodes);
+ Bse::printerr ("freed %u nodes (%u bytes) remaining %u bytes (this dcache: n_nodes=%u)\n",
+ n_freed, n_freed * CONFIG_NODE_SIZE (),
+ global_dcache_n_aged_nodes * CONFIG_NODE_SIZE (),
+ dcache->n_nodes);
return FALSE;
}
void
@@ -523,11 +523,11 @@ gsl_data_cache_unref_node (GslDataCache *dcache,
}
#if DEBUG_TRASHING
if (dcache->dhandle->open_count)
- printerr ("shrunk dcache by: dhandle=%p - %s - highp=%d: %d bytes (kept: %d)\n",
- dcache->dhandle, gsl_data_handle_name (dcache->dhandle),
- dcache->high_persistency,
- -(gint) node_size * (debug_gnaged - global_dcache_n_aged_nodes),
- node_size * dcache->n_nodes);
+ Bse::printerr ("shrunk dcache by: dhandle=%p - %s - highp=%d: %d bytes (kept: %d)\n",
+ dcache->dhandle, gsl_data_handle_name (dcache->dhandle),
+ dcache->high_persistency,
+ -(gint) node_size * (debug_gnaged - global_dcache_n_aged_nodes),
+ node_size * dcache->n_nodes);
#endif
if (needs_unlock)
dcache->mutex.unlock();
diff --git a/bse/gsldatahandle-vorbis.cc b/bse/gsldatahandle-vorbis.cc
index 3fe9c61..76a7d6c 100644
--- a/bse/gsldatahandle-vorbis.cc
+++ b/bse/gsldatahandle-vorbis.cc
@@ -145,11 +145,11 @@ dh_vorbis_page_seek (VorbisHandle *vhandle, int64 pos)
// so ov_pcm_seek and ov_pcm_seek_page cannot be used reliably, this is a crude workaround
err = ov_raw_seek (&vhandle->ofile, 0);
if (err != 0)
- printerr ("%s: %s: %d\n", __func__, "ov_raw_seek", err);
+ Bse::printerr ("%s: %s: %d\n", __func__, "ov_raw_seek", err);
#endif
err = ov_pcm_seek_page (&vhandle->ofile, pos);
if (err != 0)
- printerr ("%s: %s: %d\n", __func__, "ov_pcm_seek_page", err);
+ Bse::printerr ("%s: %s: %d\n", __func__, "ov_pcm_seek_page", err);
return err;
}
@@ -189,11 +189,11 @@ dh_vorbis_open (GslDataHandle *dhandle,
if (err < 0)
{
if (0)
- printerr ("failed to open ogg at offset %d (real offset=%lld) (add-zoffset=%d): %s\n",
- vhandle->rfile_byte_offset,
- vfile->byte_offset,
- vhandle->rfile_add_zoffset,
- bse_error_blurb (ov_errno_to_error (err, Bse::Error::FILE_OPEN_FAILED)));
+ Bse::printerr ("failed to open ogg at offset %d (real offset=%lld) (add-zoffset=%d): %s\n",
+ vhandle->rfile_byte_offset,
+ vfile->byte_offset,
+ vhandle->rfile_add_zoffset,
+ bse_error_blurb (ov_errno_to_error (err, Bse::Error::FILE_OPEN_FAILED)));
vfile_close (vfile);
return ov_errno_to_error (err, Bse::Error::FILE_OPEN_FAILED);
}
@@ -204,7 +204,7 @@ dh_vorbis_open (GslDataHandle *dhandle,
vhandle->bitstream_serialno = ov_serialnumber (&vhandle->ofile, vhandle->bitstream);
vhandle->n_bitstreams = n;
if (0)
- printerr ("Ogg/Vorbis: opening ogg: bitstream=%d/%d serialno=%d\n", vhandle->bitstream,
vhandle->n_bitstreams, vhandle->bitstream_serialno);
+ Bse::printerr ("Ogg/Vorbis: opening ogg: bitstream=%d/%d serialno=%d\n", vhandle->bitstream,
vhandle->n_bitstreams, vhandle->bitstream_serialno);
}
else
{
@@ -265,8 +265,8 @@ dh_vorbis_coarse_seek (GslDataHandle *dhandle, GslLong voffset)
vhandle->pcm_length = 0;
}
if (0)
- printerr ("OggS-SEEK: at %llu want %llu got %llu (diff-requested %lld)\n",
- opos, pos, vhandle->pcm_pos, pos - opos);
+ Bse::printerr ("OggS-SEEK: at %llu want %llu got %llu (diff-requested %lld)\n",
+ opos, pos, vhandle->pcm_pos, pos - opos);
return vhandle->pcm_pos * dhandle->setup.n_channels;
}
diff --git a/bse/gsldatautils.cc b/bse/gsldatautils.cc
index 5333766..7d61b26 100644
--- a/bse/gsldatautils.cc
+++ b/bse/gsldatautils.cc
@@ -426,8 +426,8 @@ gsl_data_detect_signal (GslDataHandle *handle,
*/
}
if (xcheck - minsamp > 0)
- printerr("###################");
- printerr ("active area %lld .. %lld, signal>16 at: %lld\t diff: %lld\n",minsamp,maxsamp,xcheck,
xcheck-minsamp);
+ Bse::printerr("###################");
+ Bse::printerr ("active area %lld .. %lld, signal>16 at: %lld\t diff: %lld\n",minsamp,maxsamp,xcheck,
xcheck-minsamp);
/* release open reference */
gsl_data_handle_close (handle);
@@ -615,7 +615,7 @@ gsl_data_find_tailmatch (GslDataHandle *dhandle,
{
start = offset + l;
end = offset + l + lsize - 1;
- printout ("\nimproved: %f < %f: [0x%llx..0x%llx] (%llu)\n", score, best_score, start, end,
lsize);
+ Bse::printout ("\nimproved: %f < %f: [0x%llx..0x%llx] (%llu)\n", score, best_score, start, end,
lsize);
best_score = score;
}
else
@@ -626,12 +626,12 @@ gsl_data_find_tailmatch (GslDataHandle *dhandle,
pcount = 100;
pval = lsize - lspec->min_loop;
pbound = (lspec->max_loop - lspec->min_loop + 1.);
- printout ("\rprocessed: %f%% \r", pval / pbound);
+ Bse::printout ("\rprocessed: %f%% \r", pval / pbound);
}
}
gsl_data_handle_close (shandle);
- printout ("\nhalted: %f: [0x%llx..0x%llx] (%llu)\n", best_score, start, end, end - start + 1);
+ Bse::printout ("\nhalted: %f: [0x%llx..0x%llx] (%llu)\n", best_score, start, end, end - start + 1);
*loop_start_p = start;
*loop_end_p = end;
diff --git a/bse/gslvorbis-enc.cc b/bse/gslvorbis-enc.cc
index 2bad5f2..0b5c901 100644
--- a/bse/gslvorbis-enc.cc
+++ b/bse/gslvorbis-enc.cc
@@ -454,10 +454,10 @@ gsl_vorbis_encoder_ogg_eos (GslVorbisEncoder *self)
return self->eos && !self->dblocks;
}
-String
+std::string
gsl_vorbis_encoder_version ()
{
- String version = "unknown";
+ std::string version = "unknown";
/* encode the first 3 header packets */
vorbis_info vinfo = { 0 };
vorbis_info_init (&vinfo);
diff --git a/bse/gslvorbis-enc.hh b/bse/gslvorbis-enc.hh
index be5be5f..86ff621 100644
--- a/bse/gslvorbis-enc.hh
+++ b/bse/gslvorbis-enc.hh
@@ -56,7 +56,7 @@ gboolean gsl_vorbis_encoder_ogg_eos (GslVorbisEncoder
void gsl_vorbis_encoder_destroy (GslVorbisEncoder *self);
/* retrive vendor version string */
-String gsl_vorbis_encoder_version ();
+std::string gsl_vorbis_encoder_version ();
#endif /* __GSL_VORBIS_ENC_H__ */
diff --git a/bse/gslwavechunk.cc b/bse/gslwavechunk.cc
index eab0580..8ddc68e 100644
--- a/bse/gslwavechunk.cc
+++ b/bse/gslwavechunk.cc
@@ -139,7 +139,7 @@ create_block_for_offset (GslWaveChunk *wchunk,
if (j >= 0)
{
k = j / loop_width;
- /* printout ("endoffset-setup: j=%ld %%=%ld, k=%ld, k&1=%ld\n", j, j % loop_width, k, k & 1); */
+ /* Bse::printout ("endoffset-setup: j=%ld %%=%ld, k=%ld, k&1=%ld\n", j, j % loop_width, k, k & 1); */
j %= loop_width;
if (wchunk->loop_type == GSL_WAVE_LOOP_PINGPONG)
{
@@ -277,7 +277,7 @@ wave_identify_offset (GslWaveChunk *wchunk,
iter->rel_pos = wchunk->n_pad_values;
iter->ubound = iter->rel_pos + MIN (STATIC_ZERO_SIZE - 2 * wchunk->n_pad_values, wchunk->head.first -
pos);
if (PRINT_DEBUG_INFO)
- printout ("PHASE_UNDEF, pre-head %lld %lld %lld\n", iter->lbound, iter->rel_pos, iter->ubound);
+ Bse::printout ("PHASE_UNDEF, pre-head %lld %lld %lld\n", iter->lbound, iter->rel_pos, iter->ubound);
return PHASE_UNDEF (wchunk);
}
if (UNLIKELY (pos > wchunk->tail.last)) /* outside wave boundaries */
@@ -286,14 +286,14 @@ wave_identify_offset (GslWaveChunk *wchunk,
iter->rel_pos = wchunk->n_pad_values;
iter->ubound = iter->rel_pos + MIN (STATIC_ZERO_SIZE - 2 * wchunk->n_pad_values, pos -
wchunk->tail.last);
if (PRINT_DEBUG_INFO)
- printout ("PHASE_UNDEF, post-tail %lld %lld %lld\n", iter->lbound, iter->rel_pos, iter->ubound);
+ Bse::printout ("PHASE_UNDEF, post-tail %lld %lld %lld\n", iter->lbound, iter->rel_pos, iter->ubound);
return PHASE_UNDEF (wchunk);
}
if (pos <= wchunk->head.last)
{
iter->rel_pos = pos - wchunk->head.first;
if (PRINT_DEBUG_INFO)
- printout ("PHASE_HEAD %lld %lld %lld\n", wchunk->head.first, iter->rel_pos, wchunk->head.last);
+ Bse::printout ("PHASE_HEAD %lld %lld %lld\n", wchunk->head.first, iter->rel_pos, wchunk->head.last);
return PHASE_HEAD (wchunk);
}
else if (pos <= wchunk->enter.last) /* before loop */
@@ -302,21 +302,21 @@ wave_identify_offset (GslWaveChunk *wchunk,
{
iter->rel_pos = pos - wchunk->enter.first;
if (PRINT_DEBUG_INFO)
- printout ("PHASE_ENTER %lld %lld %lld\n", wchunk->enter.first, iter->rel_pos, wchunk->enter.last);
+ Bse::printout ("PHASE_ENTER %lld %lld %lld\n", wchunk->enter.first, iter->rel_pos,
wchunk->enter.last);
return PHASE_ENTER (wchunk);
}
iter->rel_pos = pos - wchunk->head.last;
iter->lbound = wchunk->head.last;
iter->ubound = wchunk->enter.first;
if (PRINT_DEBUG_INFO)
- printout ("PHASE_NORM, pre-enter %lld %lld %lld\n", iter->lbound, iter->rel_pos, iter->ubound);
+ Bse::printout ("PHASE_NORM, pre-enter %lld %lld %lld\n", iter->lbound, iter->rel_pos, iter->ubound);
return PHASE_NORM (wchunk);
}
else if (pos >= wchunk->tail.first)
{
iter->rel_pos = pos - wchunk->tail.first;
if (PRINT_DEBUG_INFO)
- printout ("PHASE_TAIL %lld %lld %lld\n", wchunk->tail.first, iter->rel_pos, wchunk->tail.last);
+ Bse::printout ("PHASE_TAIL %lld %lld %lld\n", wchunk->tail.first, iter->rel_pos, wchunk->tail.last);
return PHASE_TAIL (wchunk);
}
else if (pos >= wchunk->leave.first) /* after loop */
@@ -325,7 +325,7 @@ wave_identify_offset (GslWaveChunk *wchunk,
{
iter->rel_pos = pos - wchunk->leave.first;
if (PRINT_DEBUG_INFO)
- printout ("PHASE_LEAVE %lld %lld %lld\n", wchunk->leave.first, iter->rel_pos, wchunk->leave.last);
+ Bse::printout ("PHASE_LEAVE %lld %lld %lld\n", wchunk->leave.first, iter->rel_pos,
wchunk->leave.last);
return PHASE_LEAVE (wchunk);
}
iter->rel_pos = pos - wchunk->leave.last;
@@ -334,7 +334,7 @@ wave_identify_offset (GslWaveChunk *wchunk,
iter->lbound = wchunk->tail_start_norm;
iter->ubound = wchunk->leave_end_norm;
if (PRINT_DEBUG_INFO)
- printout ("PHASE_NORM_BACKWARD, post-leave %lld %lld %lld\n", iter->lbound, iter->rel_pos,
iter->ubound);
+ Bse::printout ("PHASE_NORM_BACKWARD, post-leave %lld %lld %lld\n", iter->lbound, iter->rel_pos,
iter->ubound);
return PHASE_NORM_BACKWARD (wchunk);
}
else
@@ -342,7 +342,7 @@ wave_identify_offset (GslWaveChunk *wchunk,
iter->lbound = wchunk->leave_end_norm;
iter->ubound = wchunk->tail_start_norm;
if (PRINT_DEBUG_INFO)
- printout ("PHASE_NORM, post-leave %lld %lld %lld\n", iter->lbound, iter->rel_pos, iter->ubound);
+ Bse::printout ("PHASE_NORM, post-leave %lld %lld %lld\n", iter->lbound, iter->rel_pos,
iter->ubound);
return PHASE_NORM (wchunk);
}
}
@@ -358,35 +358,35 @@ wave_identify_offset (GslWaveChunk *wchunk,
{
iter->rel_pos = wchunk->wrap.length - one - wchunk->wrap.last + pos;
if (PRINT_DEBUG_INFO)
- printout ("PHASE_WRAP %lld %lld %lld\n", wchunk->wrap.first, iter->rel_pos,
wchunk->wrap.last);
+ Bse::printout ("PHASE_WRAP %lld %lld %lld\n", wchunk->wrap.first, iter->rel_pos,
wchunk->wrap.last);
return PHASE_WRAP (wchunk);
}
if (pos >= wchunk->ppwrap.first)
{
iter->rel_pos = pos - wchunk->ppwrap.first;
if (PRINT_DEBUG_INFO)
- printout ("PHASE_PPWRAP %lld %lld %lld\n", wchunk->ppwrap.first, iter->rel_pos,
wchunk->ppwrap.last);
+ Bse::printout ("PHASE_PPWRAP %lld %lld %lld\n", wchunk->ppwrap.first, iter->rel_pos,
wchunk->ppwrap.last);
return PHASE_PPWRAP (wchunk);
}
iter->ubound = wchunk->loop_last - one - wchunk->wrap.last;
iter->lbound = wchunk->loop_last - one - wchunk->ppwrap.first;
iter->rel_pos = pos - wchunk->wrap.last;
if (PRINT_DEBUG_INFO)
- printout ("PHASE_NORM_BACKWARD, pploop %lld %lld %lld\n", iter->lbound, iter->rel_pos,
iter->ubound);
+ Bse::printout ("PHASE_NORM_BACKWARD, pploop %lld %lld %lld\n", iter->lbound, iter->rel_pos,
iter->ubound);
return PHASE_NORM_BACKWARD (wchunk);
}
if (pos >= wchunk->wrap.first)
{
iter->rel_pos = pos - wchunk->wrap.first;
if (PRINT_DEBUG_INFO)
- printout ("PHASE_WRAP %lld %lld %lld\n", wchunk->wrap.first, iter->rel_pos, wchunk->wrap.last);
+ Bse::printout ("PHASE_WRAP %lld %lld %lld\n", wchunk->wrap.first, iter->rel_pos,
wchunk->wrap.last);
return PHASE_WRAP (wchunk);
}
iter->rel_pos = pos - wchunk->ppwrap.last;
iter->ubound = wchunk->loop_first + one + wchunk->wrap.first - loop_width;
iter->lbound = wchunk->loop_first + one + wchunk->ppwrap.last - loop_width;
if (PRINT_DEBUG_INFO)
- printout ("PHASE_NORM, pploop %lld %lld %lld\n", iter->lbound, iter->rel_pos, iter->ubound);
+ Bse::printout ("PHASE_NORM, pploop %lld %lld %lld\n", iter->lbound, iter->rel_pos, iter->ubound);
return PHASE_NORM (wchunk);
}
else if (wchunk->loop_type == GSL_WAVE_LOOP_JUMP) /* in jump loop */
@@ -399,28 +399,28 @@ wave_identify_offset (GslWaveChunk *wchunk,
{
iter->rel_pos = pos - wchunk->wrap.first;
if (PRINT_DEBUG_INFO)
- printout ("PHASE_WRAP %lld %lld %lld\n", wchunk->wrap.first, iter->rel_pos, wchunk->wrap.last);
+ Bse::printout ("PHASE_WRAP %lld %lld %lld\n", wchunk->wrap.first, iter->rel_pos,
wchunk->wrap.last);
return PHASE_WRAP (wchunk);
}
if (pos <= wchunk->wrap.last)
{
iter->rel_pos = wchunk->wrap.length - one - wchunk->wrap.last + pos;
if (PRINT_DEBUG_INFO)
- printout ("PHASE_WRAP %lld %lld %lld\n", wchunk->wrap.first, iter->rel_pos, wchunk->wrap.last);
+ Bse::printout ("PHASE_WRAP %lld %lld %lld\n", wchunk->wrap.first, iter->rel_pos,
wchunk->wrap.last);
return PHASE_WRAP (wchunk);
}
iter->rel_pos = pos - wchunk->wrap.last;
iter->lbound = wchunk->loop_first + wchunk->wrap.last;
iter->ubound = wchunk->loop_first + wchunk->wrap.first;
if (PRINT_DEBUG_INFO)
- printout ("PHASE_NORM, jloop %lld %lld %lld\n", iter->lbound, iter->rel_pos, iter->ubound);
+ Bse::printout ("PHASE_NORM, jloop %lld %lld %lld\n", iter->lbound, iter->rel_pos, iter->ubound);
return PHASE_NORM (wchunk);
}
iter->rel_pos = pos - wchunk->head.last;
iter->lbound = wchunk->head.last;
iter->ubound = wchunk->enter.first;
if (PRINT_DEBUG_INFO)
- printout ("PHASE_NORM, noloop %lld %lld %lld\n", iter->lbound, iter->rel_pos, iter->ubound);
+ Bse::printout ("PHASE_NORM, noloop %lld %lld %lld\n", iter->lbound, iter->rel_pos, iter->ubound);
return PHASE_NORM (wchunk);
}
diff --git a/bse/pybse/Makefile.am b/bse/pybse/Makefile.am
index a71e0bc..4c6a15a 100644
--- a/bse/pybse/Makefile.am
+++ b/bse/pybse/Makefile.am
@@ -8,7 +8,7 @@ include $(top_srcdir)/Makefile.decl
AM_CPPFLAGS += -I$(top_srcdir) -I$(top_builddir) -I$(srcdir) -I.
DEFS += @DEFINE__FILE_DIR__@ $(patsubst %, -DG_LOG_DOMAIN=\"BSE\" -DBSE_COMPILATION, $(filter $(<F),
$(bse_sources) $(bse_sources))) \
-DRAPICORN_AIDA_ENABLE_ENUM_ARITHMETIC
-AM_CXXFLAGS += $(BSE_CFLAGS) $(RAPICORN_CFLAGS) -DRAPICORN_CONVENIENCE -DG_DISABLE_DEPRECATED
-DG_DISABLE_CONST_RETURNS
+AM_CXXFLAGS += $(BSE_CFLAGS) $(RAPICORN_CFLAGS) -DBSE_CONVENIENCE -DG_DISABLE_DEPRECATED
-DG_DISABLE_CONST_RETURNS
AIDACC_VDEBUG = $(AIDACC) $(if $(findstring 1, $(V)), --aida-debug)
# == Pyx ==
diff --git a/bse/tests/Makefile.am b/bse/tests/Makefile.am
index e28c2cf..933d4ab 100644
--- a/bse/tests/Makefile.am
+++ b/bse/tests/Makefile.am
@@ -5,7 +5,7 @@ SUBDIRS =
AM_CPPFLAGS += -I$(top_srcdir) -I$(top_builddir)
DEFS += @DEFINE__FILE_DIR__@ -DG_LOG_DOMAIN=\"BSE-TEST\" # -DG_DISABLE_CONST_RETURNS
-AM_CXXFLAGS += $(BSE_CFLAGS) $(SFI_CPPFLAGS) $(RAPICORN_CFLAGS) -DRAPICORN_CONVENIENCE
+AM_CXXFLAGS += $(BSE_CFLAGS) $(SFI_CPPFLAGS) $(RAPICORN_CFLAGS) -DBSE_CONVENIENCE
EXTRA_DIST += arrows.gp filter-defs.gp
diff --git a/bse/tests/blocktests.cc b/bse/tests/blocktests.cc
index 460fa77..92d88de 100644
--- a/bse/tests/blocktests.cc
+++ b/bse/tests/blocktests.cc
@@ -3,6 +3,8 @@
#include <sfi/sfitests.hh>
#include <bse/bsemain.hh>
+using namespace Bse;
+
template<typename T> static bool
block_check (guint n,
const T *block,
diff --git a/bse/tests/firhandle.cc b/bse/tests/firhandle.cc
index 289f878..289432d 100644
--- a/bse/tests/firhandle.cc
+++ b/bse/tests/firhandle.cc
@@ -10,8 +10,9 @@
#include <complex>
#include <vector>
+using namespace Bse;
+
using namespace Rapicorn::Test;
-using Rapicorn::string_format;
using std::vector;
using std::min;
using std::max;
diff --git a/bse/tests/misctests.cc b/bse/tests/misctests.cc
index 31f3d0e..c76c78e 100644
--- a/bse/tests/misctests.cc
+++ b/bse/tests/misctests.cc
@@ -5,6 +5,8 @@
#include <bse/bsemathsignal.hh>
#include <bse/bsecxxplugin.hh> // for generated types
+using namespace Bse;
+
#define FLF "26.20"
static void
diff --git a/bse/tests/resamplehandle.cc b/bse/tests/resamplehandle.cc
index 138e88d..64ea808 100644
--- a/bse/tests/resamplehandle.cc
+++ b/bse/tests/resamplehandle.cc
@@ -9,6 +9,8 @@
#include <string>
#include <map>
+using namespace Bse;
+
using std::vector;
using std::string;
using std::max;
diff --git a/bse/tests/subnormals.cc b/bse/tests/subnormals.cc
index ca8df41..9eaa1fa 100644
--- a/bse/tests/subnormals.cc
+++ b/bse/tests/subnormals.cc
@@ -9,6 +9,8 @@
#endif
#include "subnormals.hh"
+using namespace Bse;
+
#if 1
inline float test1f (float v) { return v; }
inline float test2f (float v) { return bse_float_zap_denormal (v); }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]