[beast: 26/49] BSE: replace BseErrorType with Bse::ErrorType



commit 5f8329f5ec68883a86f1a42b4d273a6d850a4d2a
Author: Tim Janik <timj gnu org>
Date:   Tue Jun 23 03:49:54 2015 +0200

    BSE: replace BseErrorType with Bse::ErrorType
    
    We keep a BSE_TYPE_ERROR_TYPE compatibility ID registered as long
    as .proc files still use BSE_TYPE_ERROR_TYPE.

 bse/bsebus.cc                                   |   28 +++---
 bse/bsebus.hh                                   |   12 +-
 bse/bsebus.proc                                 |   48 ++++----
 bse/bsecategories.proc                          |   14 +-
 bse/bsecontainer.proc                           |    8 +-
 bse/bsedatahandle-fir.cc                        |   10 +-
 bse/bsedatahandle-flac.cc                       |   22 ++--
 bse/bsedatahandle-resample.cc                   |   10 +-
 bse/bsedatapocket.proc                          |   68 ++++++------
 bse/bsedevice.cc                                |   32 +++---
 bse/bsedevice.hh                                |    8 +-
 bse/bseeditablesample.proc                      |   36 +++---
 bse/bseenums.cc                                 |   34 +-----
 bse/bseenums.hh                                 |   88 +--------------
 bse/bseglue.cc                                  |    4 +-
 bse/bseitem.cc                                  |   28 +++---
 bse/bseitem.hh                                  |    4 +-
 bse/bseitem.proc                                |  104 +++++++++---------
 bse/bsejanitor.proc                             |   70 ++++++------
 bse/bseloader-aiff.cc                           |   74 ++++++------
 bse/bseloader-bsewave.cc                        |   44 ++++----
 bse/bseloader-flac.cc                           |   14 +-
 bse/bseloader-guspatch.cc                       |   54 +++++-----
 bse/bseloader-mad.cc                            |   10 +-
 bse/bseloader-oggvorbis.cc                      |   12 +-
 bse/bseloader-wav.cc                            |   60 +++++-----
 bse/bseloader.cc                                |   38 +++---
 bse/bseloader.hh                                |   14 +-
 bse/bsemain.cc                                  |    2 +-
 bse/bsemididevice-null.cc                       |    6 +-
 bse/bsemididevice-oss.cc                        |   20 ++--
 bse/bsemidifile.cc                              |   40 ++++----
 bse/bsemidifile.hh                              |    2 +-
 bse/bsemidinotifier.proc                        |    4 +-
 bse/bseparasite.proc                            |   16 ++--
 bse/bsepart.cc                                  |    4 +-
 bse/bsepart.proc                                |  136 +++++++++++-----------
 bse/bsepcmdevice-null.cc                        |    6 +-
 bse/bsepcmdevice-oss.cc                         |   48 ++++----
 bse/bsepcmwriter.cc                             |   18 ++--
 bse/bsepcmwriter.hh                             |    2 +-
 bse/bseplugin.cc                                |    2 +-
 bse/bseprocedure.cc                             |   72 ++++++------
 bse/bseprocedure.hh                             |   18 ++--
 bse/bseprocedure.proc                           |   30 +++---
 bse/bseprocidl.cc                               |    2 +-
 bse/bseproject.cc                               |   56 +++++-----
 bse/bseproject.hh                               |    6 +-
 bse/bseproject.proc                             |   58 +++++-----
 bse/bsescripthelper.cc                          |   10 +-
 bse/bsescripthelper.hh                          |    2 +-
 bse/bsescripthelper.proc                        |    2 +-
 bse/bseserver.cc                                |   48 ++++----
 bse/bseserver.hh                                |    4 +-
 bse/bsesnet.proc                                |   24 ++--
 bse/bsesong.cc                                  |    2 +-
 bse/bsesong.proc                                |   62 +++++-----
 bse/bsesource.cc                                |   88 ++++++++--------
 bse/bsesource.hh                                |    8 +-
 bse/bsesource.proc                              |  130 +++++++++++-----------
 bse/bsestorage.cc                               |   24 ++--
 bse/bsestorage.hh                               |    4 +-
 bse/bsetrack.cc                                 |    4 +-
 bse/bsetrack.proc                               |   46 ++++----
 bse/bsewave.cc                                  |   30 +++---
 bse/bsewave.hh                                  |    2 +-
 bse/bsewave.proc                                |   24 ++--
 bse/bsewaveosc.cc                               |    2 +-
 bse/bsewaveosc.proc                             |   12 +-
 bse/bsewaverepo.proc                            |   28 +++---
 bse/gslcommon.cc                                |   64 ++++++------
 bse/gslcommon.hh                                |   10 +-
 bse/gsldatacache.cc                             |    2 +-
 bse/gsldatahandle-mad.cc                        |  110 +++++++++---------
 bse/gsldatahandle-mad.hh                        |    4 +-
 bse/gsldatahandle-vorbis.cc                     |   38 +++---
 bse/gsldatahandle.cc                            |   70 ++++++------
 bse/gsldatahandle.hh                            |    4 +-
 bse/gsldatautils.cc                             |   30 +++---
 bse/gsldatautils.hh                             |    4 +-
 bse/gslvorbis-enc.cc                            |   10 +-
 bse/gslvorbis-enc.hh                            |    2 +-
 bse/gslwavechunk.cc                             |   16 ++--
 bse/gslwavechunk.hh                             |    2 +-
 bse/mkcproc.pl                                  |    2 +-
 bse/tests/firhandle.cc                          |    6 +-
 bse/tests/loophandle.cc                         |   10 +-
 bse/tests/resamplehandle.cc                     |    6 +-
 drivers/bse-portaudio/bsepcmdevice-portaudio.cc |   56 +++++-----
 drivers/bsemididevice-alsa.cc                   |   10 +-
 drivers/bsepcmdevice-alsa.cc                    |   62 +++++-----
 sfi/sfidl-corecxx.cc                            |    8 +-
 tests/testwavechunk.cc                          |    6 +-
 tools/bsefextract.cc                            |    2 +-
 tools/bseloopfuncs.cc                           |   12 +-
 tools/bsewavetool.cc                            |   48 ++++----
 tools/bwtwave.cc                                |   32 +++---
 tools/bwtwave.hh                                |    8 +-
 tools/magictest.cc                              |    2 +-
 tools/mathtool.cc                               |    2 +-
 100 files changed, 1294 insertions(+), 1396 deletions(-)
---
diff --git a/bse/bsebus.cc b/bse/bsebus.cc
index 6d43aed..73239ae 100644
--- a/bse/bsebus.cc
+++ b/bse/bsebus.cc
@@ -172,7 +172,7 @@ bus_disconnect_outputs (BseBus *self)
   SfiRing *ring, *outputs = bse_bus_list_outputs (self);
   for (ring = outputs; ring; ring = sfi_ring_walk (ring, outputs))
     {
-      BseErrorType error = bse_bus_disconnect (BSE_BUS (ring->data), BSE_ITEM (self));
+      Bse::ErrorType error = bse_bus_disconnect (BSE_BUS (ring->data), BSE_ITEM (self));
       bse_assert_ok (error);
     }
   bse_source_clear_ochannels (BSE_SOURCE (self));       /* also disconnects master */
@@ -639,7 +639,7 @@ bus_uncross_input (BseItem *owner,
     bse_item_exec_void (owner, "disconnect-bus", item);
 }
 
-BseErrorType
+Bse::ErrorType
 bse_bus_connect (BseBus  *self,
                  BseItem *trackbus)
 {
@@ -660,10 +660,10 @@ bse_bus_connect (BseBus  *self,
   if (found_candidate)
     return bse_bus_connect_unchecked (self, trackbus);
   else
-    return BSE_ERROR_SOURCE_CONNECTION_INVALID;
+    return Bse::ERROR_SOURCE_CONNECTION_INVALID;
 }
 
-BseErrorType
+Bse::ErrorType
 bse_bus_connect_unchecked (BseBus  *self,
                            BseItem *trackbus)
 {
@@ -673,11 +673,11 @@ bse_bus_connect_unchecked (BseBus  *self,
   else if (BSE_IS_BUS (trackbus))
     osource = BSE_SOURCE (trackbus);
   else
-    return BSE_ERROR_SOURCE_TYPE_INVALID;
+    return Bse::ERROR_SOURCE_TYPE_INVALID;
   if (!osource || !bse_bus_ensure_summation (self) ||
       BSE_ITEM (osource)->parent != BSE_ITEM (self)->parent)    /* restrict to siblings */
-    return BSE_ERROR_SOURCE_PARENT_MISMATCH;
-  BseErrorType error = bse_source_set_input (self->summation, 0, osource, 0);
+    return Bse::ERROR_SOURCE_PARENT_MISMATCH;
+  Bse::ErrorType error = bse_source_set_input (self->summation, 0, osource, 0);
   if (!error)
     {
       bse_source_must_set_input (self->summation, 1, osource, 1);
@@ -692,7 +692,7 @@ bse_bus_connect_unchecked (BseBus  *self,
   return error;
 }
 
-BseErrorType
+Bse::ErrorType
 bse_bus_disconnect (BseBus  *self,
                     BseItem *trackbus)
 {
@@ -702,16 +702,16 @@ bse_bus_disconnect (BseBus  *self,
   else if (BSE_IS_BUS (trackbus))
     osource = BSE_SOURCE (trackbus);
   else
-    return BSE_ERROR_SOURCE_TYPE_INVALID;
+    return Bse::ERROR_SOURCE_TYPE_INVALID;
   if (!osource || !self->summation || !sfi_ring_find (self->inputs, trackbus))
-    return BSE_ERROR_SOURCE_PARENT_MISMATCH;
+    return Bse::ERROR_SOURCE_PARENT_MISMATCH;
   bse_object_unproxy_notifies (trackbus, self, "notify::inputs");
   bse_object_unproxy_notifies (self, trackbus, "notify::outputs");
   bse_item_cross_unlink (BSE_ITEM (self), BSE_ITEM (trackbus), bus_uncross_input);
   self->inputs = sfi_ring_remove (self->inputs, trackbus);
   trackbus_update_outputs (trackbus, NULL, self);
-  BseErrorType error1 = bse_source_unset_input (self->summation, 0, osource, 0);
-  BseErrorType error2 = bse_source_unset_input (self->summation, 1, osource, 1);
+  Bse::ErrorType error1 = bse_source_unset_input (self->summation, 0, osource, 0);
+  Bse::ErrorType error2 = bse_source_unset_input (self->summation, 1, osource, 1);
   g_object_notify (G_OBJECT (self), "inputs");
   g_object_notify (G_OBJECT (trackbus), "outputs");
   return error1 ? error1 : error2;
@@ -743,11 +743,11 @@ bus_restore_add_input (gpointer     data,
     bse_storage_warn (storage, "failed to add input to mixer bus \"%s\": %s", BSE_OBJECT_UNAME (self), 
error);
   else
     {
-      BseErrorType cerror;
+      Bse::ErrorType cerror;
       if (osource)
         cerror = bse_bus_connect (self, BSE_ITEM (osource));
       else
-        cerror = BSE_ERROR_SOURCE_NO_SUCH_MODULE;
+        cerror = Bse::ERROR_SOURCE_NO_SUCH_MODULE;
       if (cerror)
         bse_storage_warn (storage,
                           "failed to add input \"%s\" to mixer bus \"%s\": %s",
diff --git a/bse/bsebus.hh b/bse/bsebus.hh
index 52e98d5..f5a6c77 100644
--- a/bse/bsebus.hh
+++ b/bse/bsebus.hh
@@ -35,11 +35,11 @@ struct BseBusClass : BseSubSynthClass
 {};
 
 /* --- API --- */
-BseErrorType    bse_bus_connect                 (BseBus         *self,
+Bse::ErrorType    bse_bus_connect                 (BseBus         *self,
                                                  BseItem        *item);
-BseErrorType    bse_bus_connect_unchecked       (BseBus         *self,
+Bse::ErrorType    bse_bus_connect_unchecked       (BseBus         *self,
                                                  BseItem        *item);
-BseErrorType    bse_bus_disconnect              (BseBus         *self,
+Bse::ErrorType    bse_bus_disconnect              (BseBus         *self,
                                                  BseItem        *item);
 SfiRing*        bse_bus_list_inputs             (BseBus         *self);
 SfiRing*        bse_bus_list_outputs            (BseBus         *self);
@@ -47,11 +47,11 @@ gboolean        bse_bus_get_stack               (BseBus         *self,
                                                  BseContainer  **snet,
                                                  BseSource     **vin,
                                                  BseSource     **vout);
-BseErrorType    bse_bus_insert_slot             (BseBus         *self,
+Bse::ErrorType    bse_bus_insert_slot             (BseBus         *self,
                                                  guint           slot);
-BseErrorType    bse_bus_delete_slot             (BseBus         *self,
+Bse::ErrorType    bse_bus_delete_slot             (BseBus         *self,
                                                  guint           slot);
-BseErrorType    bse_bus_replace_effect          (BseBus         *self,
+Bse::ErrorType    bse_bus_replace_effect          (BseBus         *self,
                                                  guint           slot,
                                                  const gchar    *etype);
 void            bse_bus_change_solo             (BseBus         *self,
diff --git a/bse/bsebus.proc b/bse/bsebus.proc
index 5f17f57..cbe898c 100644
--- a/bse/bsebus.proc
+++ b/bse/bsebus.proc
@@ -16,7 +16,7 @@ METHOD (BseBus, connect-track) {
   IN    = bse_param_spec_object ("sbus", NULL, NULL, BSE_TYPE_BUS, SFI_PARAM_STANDARD);
   IN    = bse_param_spec_object ("track", NULL, NULL, BSE_TYPE_TRACK, SFI_PARAM_STANDARD);
   OUT   = bse_param_spec_genum ("error", NULL, NULL,
-                                BSE_TYPE_ERROR_TYPE, BSE_ERROR_NONE, SFI_PARAM_STANDARD);
+                                BSE_TYPE_ERROR_TYPE, Bse::ERROR_NONE, SFI_PARAM_STANDARD);
 }
 BODY (BseProcedureClass *proc,
       const GValue      *in_values,
@@ -25,15 +25,15 @@ BODY (BseProcedureClass *proc,
   /* extract parameter values */
   BseBus *self = (BseBus*) bse_value_get_object (in_values++);
   BseTrack *track = (BseTrack*) bse_value_get_object (in_values++);
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
 
   /* check parameters */
   if (!BSE_IS_BUS (self) || !BSE_IS_TRACK (track))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   if (!BSE_ITEM (self)->parent || BSE_ITEM (self)->parent != BSE_ITEM (track)->parent)
-    error = BSE_ERROR_SOURCE_PARENT_MISMATCH;
+    error = Bse::ERROR_SOURCE_PARENT_MISMATCH;
   else
     {
       error = bse_bus_connect (self, BSE_ITEM (track));
@@ -44,7 +44,7 @@ BODY (BseProcedureClass *proc,
   /* set output parameters */
   g_value_set_enum (out_values++, error);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseBus, disconnect-track) {
@@ -52,7 +52,7 @@ METHOD (BseBus, disconnect-track) {
   IN    = bse_param_spec_object ("sbus", NULL, NULL, BSE_TYPE_BUS, SFI_PARAM_STANDARD);
   IN    = bse_param_spec_object ("track", NULL, NULL, BSE_TYPE_TRACK, SFI_PARAM_STANDARD);
   OUT   = bse_param_spec_genum ("error", NULL, NULL,
-                                BSE_TYPE_ERROR_TYPE, BSE_ERROR_NONE, SFI_PARAM_STANDARD);
+                                BSE_TYPE_ERROR_TYPE, Bse::ERROR_NONE, SFI_PARAM_STANDARD);
 }
 BODY (BseProcedureClass *proc,
       const GValue      *in_values,
@@ -61,15 +61,15 @@ BODY (BseProcedureClass *proc,
   /* extract parameter values */
   BseBus *self = (BseBus*) bse_value_get_object (in_values++);
   BseTrack *track = (BseTrack*) bse_value_get_object (in_values++);
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
 
   /* check parameters */
   if (!BSE_IS_BUS (self) || !BSE_IS_TRACK (track))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   if (!BSE_ITEM (self)->parent || BSE_ITEM (self)->parent != BSE_ITEM (track)->parent)
-    error = BSE_ERROR_SOURCE_PARENT_MISMATCH;
+    error = Bse::ERROR_SOURCE_PARENT_MISMATCH;
   else
     {
       error = bse_bus_disconnect (self, BSE_ITEM (track));
@@ -80,7 +80,7 @@ BODY (BseProcedureClass *proc,
   /* set output parameters */
   g_value_set_enum (out_values++, error);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseBus, connect-bus) {
@@ -88,7 +88,7 @@ METHOD (BseBus, connect-bus) {
   IN    = bse_param_spec_object ("sbus", NULL, NULL, BSE_TYPE_BUS, SFI_PARAM_STANDARD);
   IN    = bse_param_spec_object ("bus", NULL, NULL, BSE_TYPE_BUS, SFI_PARAM_STANDARD);
   OUT   = bse_param_spec_genum ("error", NULL, NULL,
-                                BSE_TYPE_ERROR_TYPE, BSE_ERROR_NONE, SFI_PARAM_STANDARD);
+                                BSE_TYPE_ERROR_TYPE, Bse::ERROR_NONE, SFI_PARAM_STANDARD);
 }
 BODY (BseProcedureClass *proc,
       const GValue      *in_values,
@@ -97,15 +97,15 @@ BODY (BseProcedureClass *proc,
   /* extract parameter values */
   BseBus *self = (BseBus*) bse_value_get_object (in_values++);
   BseBus *bus = (BseBus*) bse_value_get_object (in_values++);
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
 
   /* check parameters */
   if (!BSE_IS_BUS (self) || !BSE_IS_BUS (bus))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   if (!BSE_ITEM (self)->parent || BSE_ITEM (self)->parent != BSE_ITEM (bus)->parent)
-    error = BSE_ERROR_SOURCE_PARENT_MISMATCH;
+    error = Bse::ERROR_SOURCE_PARENT_MISMATCH;
   else
     {
       error = bse_bus_connect (self, BSE_ITEM (bus));
@@ -116,7 +116,7 @@ BODY (BseProcedureClass *proc,
   /* set output parameters */
   g_value_set_enum (out_values++, error);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseBus, disconnect-bus) {
@@ -124,7 +124,7 @@ METHOD (BseBus, disconnect-bus) {
   IN    = bse_param_spec_object ("sbus", NULL, NULL, BSE_TYPE_BUS, SFI_PARAM_STANDARD);
   IN    = bse_param_spec_object ("bus", NULL, NULL, BSE_TYPE_BUS, SFI_PARAM_STANDARD);
   OUT   = bse_param_spec_genum ("error", NULL, NULL,
-                                BSE_TYPE_ERROR_TYPE, BSE_ERROR_NONE, SFI_PARAM_STANDARD);
+                                BSE_TYPE_ERROR_TYPE, Bse::ERROR_NONE, SFI_PARAM_STANDARD);
 }
 BODY (BseProcedureClass *proc,
       const GValue      *in_values,
@@ -133,15 +133,15 @@ BODY (BseProcedureClass *proc,
   /* extract parameter values */
   BseBus *self = (BseBus*) bse_value_get_object (in_values++);
   BseBus *bus = (BseBus*) bse_value_get_object (in_values++);
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
 
   /* check parameters */
   if (!BSE_IS_BUS (self) || !BSE_IS_BUS (bus))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   if (!BSE_ITEM (self)->parent || BSE_ITEM (self)->parent != BSE_ITEM (bus)->parent)
-    error = BSE_ERROR_SOURCE_PARENT_MISMATCH;
+    error = Bse::ERROR_SOURCE_PARENT_MISMATCH;
   else
     {
       error = bse_bus_disconnect (self, BSE_ITEM (bus));
@@ -152,14 +152,14 @@ BODY (BseProcedureClass *proc,
   /* set output parameters */
   g_value_set_enum (out_values++, error);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseBus, ensure-output) {
   HELP  = _("Ensure that a bus has an output connection.");
   IN    = bse_param_spec_object ("bus", NULL, NULL, BSE_TYPE_BUS, SFI_PARAM_STANDARD);
   OUT   = bse_param_spec_genum ("error", NULL, NULL,
-                                BSE_TYPE_ERROR_TYPE, BSE_ERROR_NONE, SFI_PARAM_STANDARD);
+                                BSE_TYPE_ERROR_TYPE, Bse::ERROR_NONE, SFI_PARAM_STANDARD);
 }
 BODY (BseProcedureClass *proc,
       const GValue      *in_values,
@@ -167,11 +167,11 @@ BODY (BseProcedureClass *proc,
 {
   /* extract parameter values */
   BseBus *self = (BseBus*) bse_value_get_object (in_values++);
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
 
   /* check parameters */
   if (!BSE_IS_BUS (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   BseItem *parent = BSE_ITEM (self)->parent;
@@ -190,5 +190,5 @@ BODY (BseProcedureClass *proc,
   /* set output parameters */
   g_value_set_enum (out_values++, error);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
diff --git a/bse/bsecategories.proc b/bse/bsecategories.proc
index 7ec7e4e..5c0ebd9 100644
--- a/bse/bsecategories.proc
+++ b/bse/bsecategories.proc
@@ -29,7 +29,7 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!pattern)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   if (type)
     cseq = bse_categories_match_typed (pattern, type);
@@ -39,7 +39,7 @@ BODY (BseProcedureClass *proc,
   /* set output parameters */
   bse_value_take_boxed (out_values++, cseq);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 PROCEDURE (bse-categories-match, "Categories/Match") {
@@ -58,7 +58,7 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!pattern)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   cseq = bse_categories_match_typed (pattern, 0);
   if (!cseq)
@@ -67,7 +67,7 @@ BODY (BseProcedureClass *proc,
   /* set output parameters */
   bse_value_take_boxed (out_values++, cseq);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 PROCEDURE (bse-category-from-id, "Categories/From ID") {
@@ -89,7 +89,7 @@ BODY (BseProcedureClass *proc,
   /* set output parameters */
   bse_value_take_boxed (out_values++, cat);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 static gboolean
@@ -130,7 +130,7 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!pattern)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   cseq = bse_categories_match (pattern, BSE_TYPE_PROCEDURE, categories_check_method, &type);
   if (!cseq)
@@ -139,5 +139,5 @@ BODY (BseProcedureClass *proc,
   /* set output parameters */
   bse_value_take_boxed (out_values++, cseq);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
diff --git a/bse/bsecontainer.proc b/bse/bsecontainer.proc
index 1758194..70ce09d 100644
--- a/bse/bsecontainer.proc
+++ b/bse/bsecontainer.proc
@@ -22,12 +22,12 @@ METHOD (BseContainer, list-children) {
 
   /* check parameters */
   if (!BSE_IS_CONTAINER (container))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   bse_value_take_boxed (out_values++, bse_container_list_children (container));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseContainer, get-item) {
@@ -50,10 +50,10 @@ METHOD (BseContainer, get-item) {
 
   /* check parameters */
   if (!BSE_IS_CONTAINER (container) || !g_type_is_a (type, BSE_TYPE_ITEM))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   bse_value_set_object (out_values++, bse_container_get_item (container, type, seqid));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
diff --git a/bse/bsedatahandle-fir.cc b/bse/bsedatahandle-fir.cc
index 281c047..181770c 100644
--- a/bse/bsedatahandle-fir.cc
+++ b/bse/bsedatahandle-fir.cc
@@ -64,11 +64,11 @@ public:
       }
   }
 
-  BseErrorType
+  Bse::ErrorType
   open (GslDataHandleSetup *setup)
   {
-    BseErrorType error = gsl_data_handle_open (m_src_handle);
-    if (error != BSE_ERROR_NONE)
+    Bse::ErrorType error = gsl_data_handle_open (m_src_handle);
+    if (error != Bse::ERROR_NONE)
       return error;
 
     /* !not! m_dhandle.setup; the framework magically ensures that *m_dhandle.setup
@@ -85,7 +85,7 @@ public:
 
     design_filter_coefficients (gsl_data_handle_mix_freq (m_src_handle));
 
-    return BSE_ERROR_NONE;
+    return Bse::ERROR_NONE;
   }
 
   void
@@ -238,7 +238,7 @@ public:
   }
 private:
 /* for the "C" API (vtable) */
-  static BseErrorType
+  static Bse::ErrorType
   dh_open (GslDataHandle *dhandle, GslDataHandleSetup *setup)
   {
     return dh_cast (dhandle)->open (setup);
diff --git a/bse/bsedatahandle-flac.cc b/bse/bsedatahandle-flac.cc
index 92653ca..fe0f07c 100644
--- a/bse/bsedatahandle-flac.cc
+++ b/bse/bsedatahandle-flac.cc
@@ -167,16 +167,16 @@ public:
     if (m_init_ok)
       gsl_data_handle_common_free (&m_dhandle);
   }
-  BseErrorType
+  Bse::ErrorType
   open (GslDataHandleSetup *setup)
   {
     m_decoder = FLAC__stream_decoder_new();
     if (!m_decoder)
-      return BSE_ERROR_FILE_OPEN_FAILED;
+      return Bse::ERROR_FILE_OPEN_FAILED;
 
     m_rfile = gsl_rfile_open (m_file_name.c_str());
     if (!m_rfile)
-      return gsl_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+      return gsl_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
 
     if (m_init_byte_offset >= 0 && m_init_byte_size >= 0)
       {
@@ -206,7 +206,7 @@ public:
                                                 file_eof_callback,
                                                 flac_write_callback, NULL, flac_error_callback, this);
     if (err != 0)
-      return BSE_ERROR_FILE_OPEN_FAILED;
+      return Bse::ERROR_FILE_OPEN_FAILED;
 
     /* decode enough to figure out number of channels */
     FLAC__bool mdok;
@@ -215,10 +215,10 @@ public:
     while (FLAC__stream_decoder_get_channels (m_decoder) == 0 && mdok);
 
     if (FLAC__stream_decoder_get_channels (m_decoder) == 0)
-      return BSE_ERROR_WRONG_N_CHANNELS;
+      return Bse::ERROR_WRONG_N_CHANNELS;
 
     if (m_error_occurred)
-      return BSE_ERROR_NO_HEADER;
+      return Bse::ERROR_NO_HEADER;
 
     m_n_channels = setup->n_channels = FLAC__stream_decoder_get_channels (m_decoder);
     setup->n_values = FLAC__stream_decoder_get_total_samples (m_decoder) * m_n_channels;
@@ -226,7 +226,7 @@ public:
     setup->mix_freq = FLAC__stream_decoder_get_sample_rate (m_decoder);
     setup->xinfos = bse_xinfos_add_float (setup->xinfos, "osc-freq", m_osc_freq);
 
-    return BSE_ERROR_NONE;
+    return Bse::ERROR_NONE;
   }
   void
   close()
@@ -296,7 +296,7 @@ public:
   }
 private:
   // for the "C" API (vtable)
-  static BseErrorType
+  static Bse::ErrorType
   dh_open (GslDataHandle *dhandle, GslDataHandleSetup *setup)
   {
     return dh_cast (dhandle)->open (setup);
@@ -357,7 +357,7 @@ bse_data_handle_new_flac_zoffset (const char *file_name,
     return NULL;
 
   /* figure out mix_freq, n_channels */
-  BseErrorType error = gsl_data_handle_open (dhandle);
+  Bse::ErrorType error = gsl_data_handle_open (dhandle);
   if (!error)
     {
       if (n_channels_p)
@@ -380,7 +380,7 @@ Flac1Handle*
 Flac1Handle::create (GslDataHandle *dhandle)
 {
   if (dhandle->vtable == &DataHandleFlac::dh_vtable &&
-      gsl_data_handle_open (dhandle) == BSE_ERROR_NONE)
+      gsl_data_handle_open (dhandle) == Bse::ERROR_NONE)
     {
       return new Flac1Handle (dhandle);
     }
@@ -429,7 +429,7 @@ Flac1Handle::read_data (void *buffer, uint blength)
     {
       rfile = gsl_rfile_open (dhandle->name);
       if (!rfile)
-        return gsl_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+        return gsl_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
       byte_length = gsl_rfile_length (rfile);
       gsl_rfile_seek_set (rfile, flac_handle->file_byte_offset());
     }
diff --git a/bse/bsedatahandle-resample.cc b/bse/bsedatahandle-resample.cc
index a708ede..817e0bf 100644
--- a/bse/bsedatahandle-resample.cc
+++ b/bse/bsedatahandle-resample.cc
@@ -123,11 +123,11 @@ protected:
   virtual int64                    read_frame  (int64 frame) = 0;
 
 public:
-  BseErrorType
+  Bse::ErrorType
   open (GslDataHandleSetup *setup)
   {
-    BseErrorType error = gsl_data_handle_open (m_src_handle);
-    if (error != BSE_ERROR_NONE)
+    Bse::ErrorType error = gsl_data_handle_open (m_src_handle);
+    if (error != Bse::ERROR_NONE)
       return error;
 
     /* !not! m_dhandle.setup; the framework magically ensures that *m_dhandle.setup
@@ -178,7 +178,7 @@ public:
        m_filter_delay = (int) round (m_resamplers[0]->delay() * 2);
        m_filter_delay_input = 0;
       }
-    return BSE_ERROR_NONE;
+    return Bse::ERROR_NONE;
   }
   void
   close()
@@ -275,7 +275,7 @@ private:
     return static_cast<CDataHandleResample2 *> (dhandle)->cxx_dh;
     //return reinterpret_cast<DataHandleResample2 *> (dhandle);
   }
-  static BseErrorType
+  static Bse::ErrorType
   dh_open (GslDataHandle *dhandle, GslDataHandleSetup *setup)
   {
     return dh_cast (dhandle)->open (setup);
diff --git a/bse/bsedatapocket.proc b/bse/bsedatapocket.proc
index 621a417..747bfd1 100644
--- a/bse/bsedatapocket.proc
+++ b/bse/bsedatapocket.proc
@@ -25,7 +25,7 @@ METHOD (BseDataPocket, create-entry) {
 
   /* check parameters */
   if (!BSE_IS_DATA_POCKET (pocket))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   id = _bse_data_pocket_create_entry (pocket);
@@ -33,7 +33,7 @@ METHOD (BseDataPocket, create-entry) {
   /* set output parameters */
   sfi_value_set_int (out_values++, id);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseDataPocket, delete-entry) {
@@ -43,7 +43,7 @@ METHOD (BseDataPocket, delete-entry) {
   IN   = sfi_pspec_int ("entry_id", "Entry ID", "The unique pocket entry ID",
                         1, 1, G_MAXINT, 1, SFI_PARAM_STANDARD);
   OUT   = bse_param_spec_genum ("error", "Error", "BSE error code",
-                               BSE_TYPE_ERROR_TYPE, BSE_ERROR_NONE,
+                               BSE_TYPE_ERROR_TYPE, Bse::ERROR_NONE,
                                SFI_PARAM_STANDARD);
 } BODY (BseProcedureClass *proc,
        const GValue      *in_values,
@@ -56,16 +56,16 @@ METHOD (BseDataPocket, delete-entry) {
 
   /* check parameters */
   if (!BSE_IS_DATA_POCKET (pocket))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   if (id)
     fail = _bse_data_pocket_delete_entry (pocket, id);
 
   /* set output parameters */
-  g_value_set_enum (out_values++, fail ? BSE_ERROR_NO_ENTRY : BSE_ERROR_NONE);
+  g_value_set_enum (out_values++, fail ? Bse::ERROR_NO_ENTRY : Bse::ERROR_NONE);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseDataPocket, get-n-entries) {
@@ -83,12 +83,12 @@ METHOD (BseDataPocket, get-n-entries) {
 
   /* check parameters */
   if (!BSE_IS_DATA_POCKET (pocket))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_int (out_values++, pocket->n_entries);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseDataPocket, get-nth-entry-id) {
@@ -109,12 +109,12 @@ METHOD (BseDataPocket, get-nth-entry-id) {
 
   /* check parameters */
   if (!BSE_IS_DATA_POCKET (pocket))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_int (out_values++, index < pocket->n_entries ? pocket->entries[index].id : 0);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseDataPocket, set-float) {
@@ -130,7 +130,7 @@ METHOD (BseDataPocket, set-float) {
   IN   = sfi_pspec_real ("number", "Number", "The value to store in the data pocket entry",
                          0, -G_MAXDOUBLE, G_MAXDOUBLE, 1, SFI_PARAM_STANDARD);
   OUT   = bse_param_spec_genum ("error", "Error", "BSE error code",
-                               BSE_TYPE_ERROR_TYPE, BSE_ERROR_NONE,
+                               BSE_TYPE_ERROR_TYPE, Bse::ERROR_NONE,
                                SFI_PARAM_STANDARD);
 } BODY (BseProcedureClass *proc,
        const GValue      *in_values,
@@ -146,7 +146,7 @@ METHOD (BseDataPocket, set-float) {
 
   /* check parameters */
   if (!BSE_IS_DATA_POCKET (pocket))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   value.v_float = v_float;
@@ -154,9 +154,9 @@ METHOD (BseDataPocket, set-float) {
     success = _bse_data_pocket_entry_set (pocket, id, g_quark_from_string (name), BSE_DATA_POCKET_FLOAT, 
value);
 
   /* set output parameters */
-  g_value_set_enum (out_values++, success ? BSE_ERROR_NONE : BSE_ERROR_NO_ENTRY);
+  g_value_set_enum (out_values++, success ? Bse::ERROR_NONE : Bse::ERROR_NO_ENTRY);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseDataPocket, set-int) {
@@ -172,7 +172,7 @@ METHOD (BseDataPocket, set-int) {
   IN   = sfi_pspec_int ("number", "Number", "The value to store in the data pocket entry",
                         0, G_MININT, G_MAXINT, 1, SFI_PARAM_STANDARD);
   OUT   = bse_param_spec_genum ("error", "Error", "BSE error code",
-                               BSE_TYPE_ERROR_TYPE, BSE_ERROR_NONE,
+                               BSE_TYPE_ERROR_TYPE, Bse::ERROR_NONE,
                                SFI_PARAM_STANDARD);
 } BODY (BseProcedureClass *proc,
        const GValue      *in_values,
@@ -188,7 +188,7 @@ METHOD (BseDataPocket, set-int) {
 
   /* check parameters */
   if (!BSE_IS_DATA_POCKET (pocket))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   value.v_int = v_uint;
@@ -196,9 +196,9 @@ METHOD (BseDataPocket, set-int) {
     success = _bse_data_pocket_entry_set (pocket, id, g_quark_from_string (name), BSE_DATA_POCKET_INT, 
value);
 
   /* set output parameters */
-  g_value_set_enum (out_values++, success ? BSE_ERROR_NONE : BSE_ERROR_NO_ENTRY);
+  g_value_set_enum (out_values++, success ? Bse::ERROR_NONE : Bse::ERROR_NO_ENTRY);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseDataPocket, set-object) {
@@ -214,7 +214,7 @@ METHOD (BseDataPocket, set-object) {
   IN   = bse_param_spec_object ("item", "Item", "The value to store in the data pocket entry",
                                 BSE_TYPE_ITEM, SFI_PARAM_STANDARD);
   OUT   = bse_param_spec_genum ("error", "Error", "BSE error code",
-                               BSE_TYPE_ERROR_TYPE, BSE_ERROR_NONE,
+                               BSE_TYPE_ERROR_TYPE, Bse::ERROR_NONE,
                                SFI_PARAM_STANDARD);
 } BODY (BseProcedureClass *proc,
        const GValue      *in_values,
@@ -231,7 +231,7 @@ METHOD (BseDataPocket, set-object) {
   /* check parameters */
   if (!BSE_IS_DATA_POCKET (pocket) ||
       (v_object && !bse_item_common_ancestor ((BseItem*) pocket, v_object)))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   value.v_object = v_object;
@@ -239,9 +239,9 @@ METHOD (BseDataPocket, set-object) {
     success = _bse_data_pocket_entry_set (pocket, id, g_quark_from_string (name), BSE_DATA_POCKET_OBJECT, 
value);
 
   /* set output parameters */
-  g_value_set_enum (out_values++, success ? BSE_ERROR_NONE : BSE_ERROR_NO_ENTRY);
+  g_value_set_enum (out_values++, success ? Bse::ERROR_NONE : Bse::ERROR_NO_ENTRY);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseDataPocket, set-string) {
@@ -255,7 +255,7 @@ METHOD (BseDataPocket, set-string) {
   IN   = sfi_pspec_string ("string", "String", "The value to store in the data pocket entry",
                            0, SFI_PARAM_STANDARD);
   OUT   = bse_param_spec_genum ("error", "Error", "BSE error code",
-                               BSE_TYPE_ERROR_TYPE, BSE_ERROR_NONE,
+                               BSE_TYPE_ERROR_TYPE, Bse::ERROR_NONE,
                                SFI_PARAM_STANDARD);
 } BODY (BseProcedureClass *proc,
        const GValue      *in_values,
@@ -269,7 +269,7 @@ METHOD (BseDataPocket, set-string) {
   bool success = FALSE;
   /* check parameters */
   if (!BSE_IS_DATA_POCKET (pocket))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
   /* action */
   if (id)
     {
@@ -278,8 +278,8 @@ METHOD (BseDataPocket, set-string) {
       success = _bse_data_pocket_entry_set (pocket, id, g_quark_from_string (name), BSE_DATA_POCKET_STRING, 
value);
     }
   /* set output parameters */
-  g_value_set_enum (out_values++, success ? BSE_ERROR_NONE : BSE_ERROR_NO_ENTRY);
-  return BSE_ERROR_NONE;
+  g_value_set_enum (out_values++, success ? Bse::ERROR_NONE : Bse::ERROR_NO_ENTRY);
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseDataPocket, get-float) {
@@ -305,7 +305,7 @@ METHOD (BseDataPocket, get-float) {
 
   /* check parameters */
   if (!BSE_IS_DATA_POCKET (pocket))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   type = _bse_data_pocket_entry_get (pocket, id, g_quark_try_string (name), &value);
@@ -313,7 +313,7 @@ METHOD (BseDataPocket, get-float) {
   /* set output parameters */
   sfi_value_set_real (out_values++, type == BSE_DATA_POCKET_FLOAT ? value.v_float : 0);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseDataPocket, get-int) {
@@ -339,7 +339,7 @@ METHOD (BseDataPocket, get-int) {
 
   /* check parameters */
   if (!BSE_IS_DATA_POCKET (pocket))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   type = _bse_data_pocket_entry_get (pocket, id, g_quark_try_string (name), &value);
@@ -347,7 +347,7 @@ METHOD (BseDataPocket, get-int) {
   /* set output parameters */
   sfi_value_set_int (out_values++, type == BSE_DATA_POCKET_INT ? value.v_int : 0);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseDataPocket, get-object) {
@@ -373,7 +373,7 @@ METHOD (BseDataPocket, get-object) {
 
   /* check parameters */
   if (!BSE_IS_DATA_POCKET (pocket))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   type = _bse_data_pocket_entry_get (pocket, id, g_quark_try_string (name), &value);
@@ -381,7 +381,7 @@ METHOD (BseDataPocket, get-object) {
   /* set output parameters */
   bse_value_set_object (out_values++, type == BSE_DATA_POCKET_OBJECT ? value.v_object : 0);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseDataPocket, get-string) {
@@ -407,7 +407,7 @@ METHOD (BseDataPocket, get-string) {
 
   /* check parameters */
   if (!BSE_IS_DATA_POCKET (pocket))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   type = _bse_data_pocket_entry_get (pocket, id, g_quark_try_string (name), &value);
@@ -415,5 +415,5 @@ METHOD (BseDataPocket, get-string) {
   /* set output parameters */
   sfi_value_set_string (out_values++, type == BSE_DATA_POCKET_STRING ? value.v_string : 0);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
diff --git a/bse/bsedevice.cc b/bse/bsedevice.cc
index 6e310a5..ca9f18f 100644
--- a/bse/bsedevice.cc
+++ b/bse/bsedevice.cc
@@ -41,13 +41,13 @@ device_split_args (const char   *arg_string,
   return strv;
 }
 
-static BseErrorType
+static Bse::ErrorType
 device_open_args (BseDevice      *self,
                   gboolean        need_readable,
                   gboolean        need_writable,
                   const char     *arg_string)
 {
-  BseErrorType error;
+  Bse::ErrorType error;
   uint n;
   char **args = device_split_args (arg_string, &n);
   error = BSE_DEVICE_GET_CLASS (self)->open (self,
@@ -58,35 +58,35 @@ device_open_args (BseDevice      *self,
 
   if (!error)
     {
-      g_return_val_if_fail (BSE_DEVICE_OPEN (self), BSE_ERROR_INTERNAL);
-      g_return_val_if_fail (self->open_device_name != NULL, BSE_ERROR_INTERNAL); /* bse_device_set_opened() 
was not called */
+      g_return_val_if_fail (BSE_DEVICE_OPEN (self), Bse::ERROR_INTERNAL);
+      g_return_val_if_fail (self->open_device_name != NULL, Bse::ERROR_INTERNAL); /* bse_device_set_opened() 
was not called */
       if (!self->open_device_args)
         self->open_device_args = g_strdup (arg_string);
       if (BSE_DEVICE_GET_CLASS (self)->post_open)
         BSE_DEVICE_GET_CLASS (self)->post_open (self);
     }
   else
-    g_return_val_if_fail (!BSE_DEVICE_OPEN (self), BSE_ERROR_INTERNAL);
+    g_return_val_if_fail (!BSE_DEVICE_OPEN (self), Bse::ERROR_INTERNAL);
 
   if (!error && ((need_readable && !BSE_DEVICE_READABLE (self)) ||
                  (need_writable && !BSE_DEVICE_WRITABLE (self))))
     {
       bse_device_close (self);
-      error = BSE_ERROR_DEVICE_NOT_AVAILABLE;
+      error = Bse::ERROR_DEVICE_NOT_AVAILABLE;
     }
 
   return error;
 }
 
-BseErrorType
+Bse::ErrorType
 bse_device_open (BseDevice      *self,
                  gboolean        need_readable,
                  gboolean        need_writable,
                  const char     *arg_string)
 {
-  g_return_val_if_fail (BSE_IS_DEVICE (self), BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (!BSE_DEVICE_OPEN (self), BSE_ERROR_INTERNAL);
-  BseErrorType error = BSE_ERROR_DEVICE_NOT_AVAILABLE;
+  g_return_val_if_fail (BSE_IS_DEVICE (self), Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (!BSE_DEVICE_OPEN (self), Bse::ERROR_INTERNAL);
+  Bse::ErrorType error = Bse::ERROR_DEVICE_NOT_AVAILABLE;
   if (arg_string)
     error = device_open_args (self, need_readable, need_writable, arg_string);
   else
@@ -375,10 +375,10 @@ bse_device_open_auto (GType           base_type,
                       void          (*request_callback) (BseDevice *device,
                                                          void      *data),
                       void           *data,
-                      BseErrorType   *errorp)
+                      Bse::ErrorType   *errorp)
 {
   if (errorp)
-    *errorp = BSE_ERROR_DEVICE_NOT_AVAILABLE;
+    *errorp = Bse::ERROR_DEVICE_NOT_AVAILABLE;
   BseDevice *device = NULL;
   SfiRing *ring, *class_list = device_classes_list (base_type, 0);
   class_list = sfi_ring_sort (class_list, device_classes_prio_cmp, NULL);
@@ -388,7 +388,7 @@ bse_device_open_auto (GType           base_type,
       device = (BseDevice*) bse_object_new (G_OBJECT_CLASS_TYPE (klass), NULL);
       if (request_callback)
         request_callback (device, data);
-      BseErrorType error = bse_device_open (device, need_readable, need_writable, NULL);
+      Bse::ErrorType error = bse_device_open (device, need_readable, need_writable, NULL);
       if (errorp)
         *errorp = error;
       if (BSE_DEVICE_OPEN (device))
@@ -419,10 +419,10 @@ bse_device_open_best (GType           base_type,
                       void          (*request_callback) (BseDevice *device,
                                                          void      *data),
                       void           *data,
-                      BseErrorType   *errorp)
+                      Bse::ErrorType   *errorp)
 {
   if (errorp)
-    *errorp = BSE_ERROR_DEVICE_NOT_AVAILABLE;
+    *errorp = Bse::ERROR_DEVICE_NOT_AVAILABLE;
   if (!devices)
     devices = auto_ring();
   BseDevice *device = NULL;
@@ -453,7 +453,7 @@ bse_device_open_best (GType           base_type,
           device = (BseDevice*) bse_object_new (G_OBJECT_CLASS_TYPE (klass), NULL);
           if (request_callback)
             request_callback (device, data);
-          BseErrorType error = bse_device_open (device, need_readable, need_writable, args ? args + 1 : 
NULL);
+          Bse::ErrorType error = bse_device_open (device, need_readable, need_writable, args ? args + 1 : 
NULL);
           if (errorp)
             *errorp = error;
           if (!error)
diff --git a/bse/bsedevice.hh b/bse/bsedevice.hh
index fd3dc92..38f3ab3 100644
--- a/bse/bsedevice.hh
+++ b/bse/bsedevice.hh
@@ -41,7 +41,7 @@ struct BseDeviceClass : BseObjectClass {
   const gchar          *driver_syntax;
   const gchar          *driver_blurb;
   SfiRing*            (*list_devices)  (BseDevice    *device);
-  BseErrorType        (*open)          (BseDevice    *device,
+  Bse::ErrorType        (*open)          (BseDevice    *device,
                                         gboolean        require_readable,
                                         gboolean        require_writable,
                                         guint           n_args,
@@ -65,7 +65,7 @@ void            bse_device_class_setup     (gpointer        klass,
                                             const gchar    *syntax,
                                             const gchar    *blurb);
 SfiRing*        bse_device_list            (BseDevice      *device);
-BseErrorType    bse_device_open            (BseDevice      *device,
+Bse::ErrorType    bse_device_open            (BseDevice      *device,
                                             gboolean        need_readable,
                                             gboolean        need_writable,
                                             const gchar    *arg_string);
@@ -102,14 +102,14 @@ BseDevice*      bse_device_open_best       (GType           base_type,
                                             void          (*request_callback) (BseDevice *device,
                                                                                gpointer   data),
                                             gpointer        data,
-                                            BseErrorType   *errorp);
+                                            Bse::ErrorType   *errorp);
 BseDevice*      bse_device_open_auto       (GType           base_type,
                                             gboolean        need_readable,
                                             gboolean        need_writable,
                                             void          (*request_callback) (BseDevice *device,
                                                                                gpointer   data),
                                             gpointer        data,
-                                            BseErrorType   *errorp);
+                                            Bse::ErrorType   *errorp);
 
 
 G_END_DECLS
diff --git a/bse/bseeditablesample.proc b/bse/bseeditablesample.proc
index 926ed86..e79e23d 100644
--- a/bse/bseeditablesample.proc
+++ b/bse/bseeditablesample.proc
@@ -11,7 +11,7 @@ METHOD (BseEditableSample, open) {
   IN   = bse_param_spec_object ("esample", "Editable Sample", NULL,
                                 BSE_TYPE_EDITABLE_SAMPLE, SFI_PARAM_STANDARD);
   OUT   = bse_param_spec_genum ("error", "Error", NULL,
-                               BSE_TYPE_ERROR_TYPE, BSE_ERROR_NONE,
+                               BSE_TYPE_ERROR_TYPE, Bse::ERROR_NONE,
                                SFI_PARAM_STANDARD);
 } BODY (BseProcedureClass *proc,
        const GValue      *in_values,
@@ -19,19 +19,19 @@ METHOD (BseEditableSample, open) {
 {
   /* extract parameter values */
   BseEditableSample *esample = (BseEditableSample*) bse_value_get_object (in_values++);
-  BseErrorType error;
+  Bse::ErrorType error;
 
   /* check parameters */
   if (!BSE_IS_EDITABLE_SAMPLE (esample))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   if (!esample->wchunk)
-    error = BSE_ERROR_WAVE_NOT_FOUND;
+    error = Bse::ERROR_WAVE_NOT_FOUND;
   else if (esample->open_count)
     {
       esample->open_count++;
-      error = BSE_ERROR_NONE;
+      error = Bse::ERROR_NONE;
     }
   else
     {
@@ -43,7 +43,7 @@ METHOD (BseEditableSample, open) {
   /* set output parameters */
   g_value_set_enum (out_values++, error);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseEditableSample, close) {
@@ -59,14 +59,14 @@ METHOD (BseEditableSample, close) {
 
   /* check parameters */
   if (!BSE_IS_EDITABLE_SAMPLE (esample) || !esample->wchunk || !esample->open_count)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   esample->open_count--;
   if (!esample->open_count)
     gsl_wave_chunk_close (esample->wchunk);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseEditableSample, get-length) {
@@ -85,14 +85,14 @@ METHOD (BseEditableSample, get-length) {
 
   /* check parameters */
   if (!BSE_IS_EDITABLE_SAMPLE (esample))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   if (BSE_EDITABLE_SAMPLE_OPENED (esample) && esample->wchunk)
     dcache = esample->wchunk->dcache;
   sfi_value_set_int (out_values++, dcache ? gsl_data_handle_length (dcache->dhandle) : 0);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseEditableSample, get-n-channels) {
@@ -110,12 +110,12 @@ METHOD (BseEditableSample, get-n-channels) {
 
   /* check parameters */
   if (!BSE_IS_EDITABLE_SAMPLE (esample))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_int (out_values++, esample->wchunk ? esample->wchunk->n_channels : 1);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseEditableSample, get-osc-freq) {
@@ -133,12 +133,12 @@ METHOD (BseEditableSample, get-osc-freq) {
 
   /* check parameters */
   if (!BSE_IS_EDITABLE_SAMPLE (esample))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_real (out_values++, esample->wchunk ? esample->wchunk->osc_freq : BSE_KAMMER_FREQUENCY);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseEditableSample, read-samples) {
@@ -159,7 +159,7 @@ METHOD (BseEditableSample, read-samples) {
   BseFloatSeq *fseq;
   /* check parameters */
   if (!BSE_IS_EDITABLE_SAMPLE (esample))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
   if (BSE_EDITABLE_SAMPLE_OPENED (esample) && esample->wchunk)
     dcache = esample->wchunk->dcache;
   if (!dcache || voffset >= gsl_data_handle_length (dcache->dhandle))
@@ -182,7 +182,7 @@ METHOD (BseEditableSample, read-samples) {
     }
   /* set output parameters */
   g_value_take_boxed (out_values++, fseq);
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 METHOD (BseEditableSample, collect-stats) {
   HELP = ("Collect statistics from sample blocks as (minimum, maximum) pairs.");
@@ -214,7 +214,7 @@ METHOD (BseEditableSample, collect-stats) {
   BseFloatSeq *fseq;
   /* check parameters */
   if (!BSE_IS_EDITABLE_SAMPLE (esample) || stepping < 1)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
   if (BSE_EDITABLE_SAMPLE_OPENED (esample) && esample->wchunk)
     dcache = esample->wchunk->dcache;
   if (!dcache || voffset + block_size > gsl_data_handle_length (dcache->dhandle))
@@ -260,5 +260,5 @@ METHOD (BseEditableSample, collect-stats) {
     }
   /* set output parameters */
   g_value_take_boxed (out_values++, fseq);
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
diff --git a/bse/bseenums.cc b/bse/bseenums.cc
index 6a6fb01..1c1f33c 100644
--- a/bse/bseenums.cc
+++ b/bse/bseenums.cc
@@ -1,4 +1,5 @@
 // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
+#define BSE_IDL_PSEUDOS 1 // dummy values to satisfy the old code generator
 #include "bseenums.hh"
 #include "gslcommon.hh"
 #include <errno.h>
@@ -37,43 +38,16 @@ bse_type_register_enums (void)
     }
 }
 
-/* BseErrorType is a static type */
-static GEnumClass *bse_error_class = NULL;
-
-const char*
-bse_error_name (BseErrorType error_value)
-{
-  GEnumValue *ev;
-
-  if (!bse_error_class)
-    bse_error_class = (GEnumClass*) g_type_class_ref (BSE_TYPE_ERROR_TYPE);
-
-  ev = g_enum_get_value (bse_error_class, error_value);
-  return ev ? ev->value_name : NULL;
-}
-
-const char*
-bse_error_nick (BseErrorType error_value)
-{
-  GEnumValue *ev;
-
-  if (!bse_error_class)
-    bse_error_class = (GEnumClass*) g_type_class_ref (BSE_TYPE_ERROR_TYPE);
-
-  ev = g_enum_get_value (bse_error_class, error_value);
-  return ev ? ev->value_nick : NULL;
-}
-
 const char*
-bse_error_blurb (BseErrorType error_value)
+bse_error_blurb (Bse::ErrorType error_value)
 {
   const Rapicorn::Aida::EnumValue *ev = Rapicorn::Aida::enum_info<Bse::ErrorType>().find_value (error_value);
   return ev ? ev->blurb : NULL;
 }
 
-BseErrorType
+Bse::ErrorType
 bse_error_from_errno (int             v_errno,
-                     BseErrorType    fallback)
+                     Bse::ErrorType    fallback)
 {
   return gsl_error_from_errno (v_errno, fallback);
 }
diff --git a/bse/bseenums.hh b/bse/bseenums.hh
index bf690ae..2b3ee7b 100644
--- a/bse/bseenums.hh
+++ b/bse/bseenums.hh
@@ -49,94 +49,18 @@ typedef enum
   BSE_MAGIC_BSE_BIN_EXTENSION   = 1 << 0,
   BSE_MAGIC_BSE_SONG            = 1 << 2
 } BseMagicFlags;
+
+#ifdef  BSE_IDL_PSEUDOS
 typedef enum
 {
-  BSE_ERROR_NONE                               = Bse::ERROR_NONE,
-  BSE_ERROR_INTERNAL                            = Bse::ERROR_INTERNAL,
-  BSE_ERROR_UNKNOWN                            = Bse::ERROR_UNKNOWN,
-  /* general errors */
-  BSE_ERROR_IO                                 = Bse::ERROR_IO,
-  BSE_ERROR_PERMS                              = Bse::ERROR_PERMS,
-  /* file errors */
-  BSE_ERROR_FILE_BUSY                          = Bse::ERROR_FILE_BUSY,
-  BSE_ERROR_FILE_EXISTS                                = Bse::ERROR_FILE_EXISTS,
-  BSE_ERROR_FILE_EOF                           = Bse::ERROR_FILE_EOF,
-  BSE_ERROR_FILE_EMPTY                         = Bse::ERROR_FILE_EMPTY,
-  BSE_ERROR_FILE_NOT_FOUND                     = Bse::ERROR_FILE_NOT_FOUND,
-  BSE_ERROR_FILE_IS_DIR                                = Bse::ERROR_FILE_IS_DIR,
-  BSE_ERROR_FILE_OPEN_FAILED                   = Bse::ERROR_FILE_OPEN_FAILED,
-  BSE_ERROR_FILE_SEEK_FAILED                   = Bse::ERROR_FILE_SEEK_FAILED,
-  BSE_ERROR_FILE_READ_FAILED                   = Bse::ERROR_FILE_READ_FAILED,
-  BSE_ERROR_FILE_WRITE_FAILED                  = Bse::ERROR_FILE_WRITE_FAILED,
-  /* out of resource conditions */
-  BSE_ERROR_MANY_FILES                         = Bse::ERROR_MANY_FILES,
-  BSE_ERROR_NO_FILES                           = Bse::ERROR_NO_FILES,
-  BSE_ERROR_NO_SPACE                           = Bse::ERROR_NO_SPACE,
-  BSE_ERROR_NO_MEMORY                          = Bse::ERROR_NO_MEMORY,
-  /* content errors */
-  BSE_ERROR_NO_HEADER                          = Bse::ERROR_NO_HEADER,
-  BSE_ERROR_NO_SEEK_INFO                       = Bse::ERROR_NO_SEEK_INFO,
-  BSE_ERROR_NO_DATA                            = Bse::ERROR_NO_DATA,
-  BSE_ERROR_DATA_CORRUPT                       = Bse::ERROR_DATA_CORRUPT,
-  BSE_ERROR_WRONG_N_CHANNELS                   = Bse::ERROR_WRONG_N_CHANNELS,
-  BSE_ERROR_FORMAT_INVALID                     = Bse::ERROR_FORMAT_INVALID,
-  BSE_ERROR_FORMAT_UNKNOWN                     = Bse::ERROR_FORMAT_UNKNOWN,
-  BSE_ERROR_DATA_UNMATCHED                     = Bse::ERROR_DATA_UNMATCHED,
-  /* miscellaneous errors */
-  BSE_ERROR_TEMP                               = Bse::ERROR_TEMP,
-  BSE_ERROR_WAVE_NOT_FOUND                     = Bse::ERROR_WAVE_NOT_FOUND,
-  BSE_ERROR_CODEC_FAILURE                      = Bse::ERROR_CODEC_FAILURE,
-  BSE_ERROR_UNIMPLEMENTED                      = Bse::ERROR_UNIMPLEMENTED,
-  BSE_ERROR_INVALID_PROPERTY                   = Bse::ERROR_INVALID_PROPERTY,
-  BSE_ERROR_INVALID_MIDI_CONTROL               = Bse::ERROR_INVALID_MIDI_CONTROL,
-  BSE_ERROR_PARSE_ERROR                                = Bse::ERROR_PARSE_ERROR,
-  BSE_ERROR_SPAWN                              = Bse::ERROR_SPAWN,
-  /* Device errors */
-  BSE_ERROR_DEVICE_NOT_AVAILABLE               = Bse::ERROR_DEVICE_NOT_AVAILABLE,
-  BSE_ERROR_DEVICE_ASYNC                       = Bse::ERROR_DEVICE_ASYNC,
-  BSE_ERROR_DEVICE_BUSY                        = Bse::ERROR_DEVICE_BUSY,
-  BSE_ERROR_DEVICE_FORMAT                      = Bse::ERROR_DEVICE_FORMAT,
-  BSE_ERROR_DEVICE_BUFFER                      = Bse::ERROR_DEVICE_BUFFER,
-  BSE_ERROR_DEVICE_LATENCY                     = Bse::ERROR_DEVICE_LATENCY,
-  BSE_ERROR_DEVICE_CHANNELS                    = Bse::ERROR_DEVICE_CHANNELS,
-  BSE_ERROR_DEVICE_FREQUENCY                   = Bse::ERROR_DEVICE_FREQUENCY,
-  BSE_ERROR_DEVICES_MISMATCH                   = Bse::ERROR_DEVICES_MISMATCH,
-  /* BseSource errors */
-  BSE_ERROR_SOURCE_NO_SUCH_MODULE              = Bse::ERROR_SOURCE_NO_SUCH_MODULE,
-  BSE_ERROR_SOURCE_NO_SUCH_ICHANNEL            = Bse::ERROR_SOURCE_NO_SUCH_ICHANNEL,
-  BSE_ERROR_SOURCE_NO_SUCH_OCHANNEL            = Bse::ERROR_SOURCE_NO_SUCH_OCHANNEL,
-  BSE_ERROR_SOURCE_NO_SUCH_CONNECTION          = Bse::ERROR_SOURCE_NO_SUCH_CONNECTION,
-  BSE_ERROR_SOURCE_PRIVATE_ICHANNEL            = Bse::ERROR_SOURCE_PRIVATE_ICHANNEL,
-  BSE_ERROR_SOURCE_ICHANNEL_IN_USE             = Bse::ERROR_SOURCE_ICHANNEL_IN_USE,
-  BSE_ERROR_SOURCE_CHANNELS_CONNECTED          = Bse::ERROR_SOURCE_CHANNELS_CONNECTED,
-  BSE_ERROR_SOURCE_CONNECTION_INVALID          = Bse::ERROR_SOURCE_CONNECTION_INVALID,
-  BSE_ERROR_SOURCE_PARENT_MISMATCH             = Bse::ERROR_SOURCE_PARENT_MISMATCH,
-  BSE_ERROR_SOURCE_BAD_LOOPBACK                        = Bse::ERROR_SOURCE_BAD_LOOPBACK,
-  BSE_ERROR_SOURCE_BUSY                                = Bse::ERROR_SOURCE_BUSY,
-  BSE_ERROR_SOURCE_TYPE_INVALID                        = Bse::ERROR_SOURCE_TYPE_INVALID,
-  /* BseProcedure errors */
-  BSE_ERROR_PROC_NOT_FOUND                     = Bse::ERROR_PROC_NOT_FOUND,
-  BSE_ERROR_PROC_BUSY                          = Bse::ERROR_PROC_BUSY,
-  BSE_ERROR_PROC_PARAM_INVAL                   = Bse::ERROR_PROC_PARAM_INVAL,
-  BSE_ERROR_PROC_EXECUTION                     = Bse::ERROR_PROC_EXECUTION,
-  BSE_ERROR_PROC_ABORT                         = Bse::ERROR_PROC_ABORT,
-  /* various procedure errors */
-  BSE_ERROR_NO_ENTRY                           = Bse::ERROR_NO_ENTRY,
-  BSE_ERROR_NO_EVENT                           = Bse::ERROR_NO_EVENT,
-  BSE_ERROR_NO_TARGET                          = Bse::ERROR_NO_TARGET,
-  BSE_ERROR_NOT_OWNER                          = Bse::ERROR_NOT_OWNER,
-  BSE_ERROR_INVALID_OFFSET                     = Bse::ERROR_INVALID_OFFSET,
-  BSE_ERROR_INVALID_DURATION                   = Bse::ERROR_INVALID_DURATION,
-  BSE_ERROR_INVALID_OVERLAP                    = Bse::ERROR_INVALID_OVERLAP,
+  BSE_ERROR_NONE = Bse::ERROR_NONE,
 } BseErrorType;
+#endif // BSE_IDL_PSEUDOS
 
 
 /* --- convenience functions --- */
-const gchar*   bse_error_name                  (BseErrorType    error_value);
-const gchar*   bse_error_nick                  (BseErrorType    error_value);
-const gchar*   bse_error_blurb                 (BseErrorType    error_value);
-BseErrorType   bse_error_from_errno            (gint            v_errno,
-                                                BseErrorType    fallback);
+const gchar*   bse_error_blurb                 (Bse::ErrorType  error_value);
+Bse::ErrorType bse_error_from_errno            (gint v_errno, Bse::ErrorType fallback);
 
 #define bse_assert_ok(error)    G_STMT_START{                           \
      if G_UNLIKELY (error)                                              \
diff --git a/bse/bseglue.cc b/bse/bseglue.cc
index ec4a540..d05a7c3 100644
--- a/bse/bseglue.cc
+++ b/bse/bseglue.cc
@@ -595,7 +595,7 @@ bglue_iface_children (SfiGlueContext *context,
   return childnames;
 }
 
-static BseErrorType
+static Bse::ErrorType
 bglue_marshal_proc (void              *marshal_data,
                    BseProcedureClass *proc,
                    const GValue      *ivalues,
@@ -618,7 +618,7 @@ bglue_exec_proc (SfiGlueContext *context,
       GValue *ovalues = g_new0 (GValue, proc->n_out_pspecs);
       GSList *ilist = NULL, *olist = NULL, *clearlist = NULL;
       uint i, sl = sfi_seq_length (params);
-      BseErrorType error;
+      Bse::ErrorType error;
 
       for (i = 0; i < proc->n_in_pspecs; i++)
        {
diff --git a/bse/bseitem.cc b/bse/bseitem.cc
index 6ad6e10..10f3eb1 100644
--- a/bse/bseitem.cc
+++ b/bse/bseitem.cc
@@ -749,13 +749,13 @@ find_method_procedure (GType       object_type,
   return proc_type;
 }
 
-static inline BseErrorType
+static inline Bse::ErrorType
 bse_item_execva_i (BseItem     *item,
                    const char  *procedure,
                    va_list      var_args,
                    gboolean     skip_oparams)
 {
-  BseErrorType error;
+  Bse::ErrorType error;
   GType proc_type = find_method_procedure (BSE_OBJECT_TYPE (item), procedure);
   GValue obj_value;
 
@@ -763,7 +763,7 @@ bse_item_execva_i (BseItem     *item,
     {
       g_warning ("no such method \"%s\" of item %s",
                  procedure, bse_object_debug_name (item));
-      return BSE_ERROR_INTERNAL;
+      return Bse::ERROR_INTERNAL;
     }
 
   /* setup first arg (the object) */
@@ -776,17 +776,17 @@ bse_item_execva_i (BseItem     *item,
   return error;
 }
 
-BseErrorType
+Bse::ErrorType
 bse_item_exec (void       *_item,
                const char *procedure,
                ...)
 {
   BseItem *item = (BseItem*) _item;
   va_list var_args;
-  BseErrorType error;
+  Bse::ErrorType error;
 
-  g_return_val_if_fail (BSE_IS_ITEM (item), BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (procedure != NULL, BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_IS_ITEM (item), Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (procedure != NULL, Bse::ERROR_INTERNAL);
 
   va_start (var_args, procedure);
   error = bse_item_execva_i (item, procedure, var_args, FALSE);
@@ -795,17 +795,17 @@ bse_item_exec (void       *_item,
   return error;
 }
 
-BseErrorType
+Bse::ErrorType
 bse_item_exec_void (void       *_item,
                     const char *procedure,
                     ...)
 {
   BseItem *item = (BseItem*) _item;
   va_list var_args;
-  BseErrorType error;
+  Bse::ErrorType error;
 
-  g_return_val_if_fail (BSE_IS_ITEM (item), BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (procedure != NULL, BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_IS_ITEM (item), Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (procedure != NULL, Bse::ERROR_INTERNAL);
 
   va_start (var_args, procedure);
   error = bse_item_execva_i (item, procedure, var_args, TRUE);
@@ -885,7 +885,7 @@ undo_call_proc (BseUndoStep  *ustep,
   else /* invoke procedure */
     {
       GValue ovalue = { 0, };
-      BseErrorType error;
+      Bse::ErrorType error;
       uint i;
       /* convert values from undo */
       for (i = 0; i < proc->n_in_pspecs; i++)
@@ -900,7 +900,7 @@ undo_call_proc (BseUndoStep  *ustep,
         {
           /* check returned error if any */
           if (G_PARAM_SPEC_VALUE_TYPE (proc->out_pspecs[0]) == BSE_TYPE_ERROR_TYPE && !error)
-            error = BseErrorType (g_value_get_enum (&ovalue));
+            error = Bse::ErrorType (g_value_get_enum (&ovalue));
           g_value_unset (&ovalue);
         }
       /* we're not tolerating any errors */
@@ -920,7 +920,7 @@ bse_item_push_undo_proc_valist (void        *item,
   BseUndoStack *ustack = bse_item_undo_open (item, "%s: %s", commit_as_redo ? "redo-proc" : "undo-proc", 
procedure);
   BseProcedureClass *proc;
   GValue *ivalues;
-  BseErrorType error;
+  Bse::ErrorType error;
   uint i;
   if (BSE_UNDO_STACK_VOID (ustack) ||
       BSE_ITEM_INTERNAL (item))
diff --git a/bse/bseitem.hh b/bse/bseitem.hh
index afb198a..1e2899a 100644
--- a/bse/bseitem.hh
+++ b/bse/bseitem.hh
@@ -108,10 +108,10 @@ BseItem*        bse_item_use                 (BseItem         *item);
 void            bse_item_unuse               (BseItem         *item);
 void            bse_item_set_parent          (BseItem         *item,
                                               BseItem         *parent);
-BseErrorType    bse_item_exec                (gpointer         item,
+Bse::ErrorType    bse_item_exec                (gpointer         item,
                                               const gchar     *procedure,
                                               ...);
-BseErrorType    bse_item_exec_void           (gpointer         item,
+Bse::ErrorType    bse_item_exec_void           (gpointer         item,
                                               const gchar     *procedure,
                                               ...); /* ignore return values */
 /* undo-aware functions */
diff --git a/bse/bseitem.proc b/bse/bseitem.proc
index 17e03e1..e54db32 100644
--- a/bse/bseitem.proc
+++ b/bse/bseitem.proc
@@ -27,12 +27,12 @@ METHOD (BseItem, get-type) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (item))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_static_string (out_values++, g_type_name (G_OBJECT_TYPE (item)));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, get-type-name) {
@@ -51,12 +51,12 @@ METHOD (BseItem, get-type-name) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (item))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_string (out_values++, g_type_name (G_OBJECT_TYPE (item)));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, get-type-blurb) {
@@ -75,12 +75,12 @@ METHOD (BseItem, get-type-blurb) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (item))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_string (out_values++, bse_type_get_blurb (G_OBJECT_TYPE (item)));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, get-type-authors) {
@@ -99,12 +99,12 @@ METHOD (BseItem, get-type-authors) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (item))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_string (out_values++, bse_type_get_authors (G_OBJECT_TYPE (item)));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, get-type-license) {
@@ -123,12 +123,12 @@ METHOD (BseItem, get-type-license) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (item))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_string (out_values++, bse_type_get_license (G_OBJECT_TYPE (item)));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, get-parent) {
@@ -146,12 +146,12 @@ METHOD (BseItem, get-parent) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (item))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   bse_value_set_object (out_values++, item->parent);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, get-project) {
@@ -169,12 +169,12 @@ METHOD (BseItem, get-project) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (item))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   bse_value_set_object (out_values++, bse_item_get_project (item));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, get-uname-path) {
@@ -193,7 +193,7 @@ METHOD (BseItem, get-uname-path) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (item))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   project = bse_item_get_project (item);
 
@@ -201,7 +201,7 @@ METHOD (BseItem, get-uname-path) {
   sfi_value_take_string (out_values++,
                         project ? bse_container_make_upath (BSE_CONTAINER (project), item) : NULL);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, internal) {
@@ -219,12 +219,12 @@ METHOD (BseItem, internal) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (item))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_bool (out_values++, BSE_ITEM_INTERNAL (item));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, use) {
@@ -242,7 +242,7 @@ METHOD (BseItem, use) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (item) || (!item->parent && !item->use_count))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   bse_item_use (item);
@@ -250,7 +250,7 @@ METHOD (BseItem, use) {
   /* set output parameters */
   bse_value_set_object (out_values++, item);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, unuse) {
@@ -266,15 +266,15 @@ METHOD (BseItem, unuse) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (item))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   if (item->use_count < 1)
-    return BSE_ERROR_NOT_OWNER;
+    return Bse::ERROR_NOT_OWNER;
 
   bse_item_unuse (item);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, set-name) {
@@ -293,13 +293,13 @@ METHOD (BseItem, set-name) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (item))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   if (!bse_string_equals (name, BSE_OBJECT_UNAME (item)))
     bse_item_set (item, "uname", name, NULL);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 
@@ -318,12 +318,12 @@ METHOD (BseItem, get-name) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (item))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_string (out_values++, BSE_OBJECT_UNAME (item));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, get-name-or-type) {
@@ -342,7 +342,7 @@ METHOD (BseItem, get-name-or-type) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (item))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   name = BSE_OBJECT_UNAME (item);
@@ -351,7 +351,7 @@ METHOD (BseItem, get-name-or-type) {
   else
     sfi_value_set_string (out_values++, BSE_OBJECT_TYPE_NAME (item));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, get-seqid) {
@@ -371,12 +371,12 @@ METHOD (BseItem, get-seqid) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (item))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_int (out_values++, bse_item_get_seqid (item));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, check-is-a) {
@@ -408,7 +408,7 @@ METHOD (BseItem, check-is-a) {
   /* set output parameters */
   sfi_value_set_bool (out_values++, is_a);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, get-property-candidates) {
@@ -428,7 +428,7 @@ METHOD (BseItem, get-property-candidates) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (self) || !property)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   BsePropertyCandidates *pc = bse_property_candidates_new();
@@ -439,7 +439,7 @@ METHOD (BseItem, get-property-candidates) {
     }
   bse_value_take_boxed (out_values++, pc);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, editable-property) {
@@ -459,12 +459,12 @@ METHOD (BseItem, editable-property) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (self) || !property)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_bool (out_values++, bse_object_editable_property (self, property));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, get-icon) {
@@ -482,12 +482,12 @@ METHOD (BseItem, get-icon) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   bse_value_set_boxed (out_values++, bse_object_get_icon (BSE_OBJECT (self)));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, group-undo) {
@@ -507,13 +507,13 @@ METHOD (BseItem, group-undo) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (self) || !name)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   ustack = bse_item_undo_open (self, "item-group-undo");
   bse_undo_stack_add_merger (ustack, name);
   bse_item_undo_close (ustack);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, ungroup-undo) {
@@ -530,13 +530,13 @@ METHOD (BseItem, ungroup-undo) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   ustack = bse_item_undo_open (self, "item-ungroup-undo");
   bse_undo_stack_remove_merger (ustack);
   bse_item_undo_close (ustack);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, undo) {
@@ -553,13 +553,13 @@ METHOD (BseItem, undo) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   project = bse_item_get_project (self);
   if (project)
     bse_item_exec_void (project, "undo");
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, redo) {
@@ -576,13 +576,13 @@ METHOD (BseItem, redo) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   project = bse_item_get_project (self);
   if (project)
     bse_item_exec_void (project, "redo");
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, clear-undo) {
@@ -599,13 +599,13 @@ METHOD (BseItem, clear-undo) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   project = bse_item_get_project (self);
   if (project)
     bse_item_exec_void (project, "clear-undo");
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, undo-depth) {
@@ -625,7 +625,7 @@ METHOD (BseItem, undo-depth) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   project = bse_item_get_project (self);
   if (project)
@@ -634,7 +634,7 @@ METHOD (BseItem, undo-depth) {
   /* set output parameters */
   sfi_value_set_int (out_values++, depth);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, redo-depth) {
@@ -653,11 +653,11 @@ METHOD (BseItem, redo-depth) {
   BseProject *project;
   /* check parameters */
   if (!BSE_IS_ITEM (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
   project = bse_item_get_project (self);
   if (project)
     bse_item_exec (project, "redo-depth", &depth);
   /* set output parameters */
   sfi_value_set_int (out_values++, depth);
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
diff --git a/bse/bsejanitor.proc b/bse/bsejanitor.proc
index 51fc58c..4fdeb00 100644
--- a/bse/bsejanitor.proc
+++ b/bse/bsejanitor.proc
@@ -27,12 +27,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_JANITOR (self) || !action)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   bse_janitor_trigger_action (self, action);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseJanitor, get-script-name) {
@@ -51,12 +51,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_JANITOR (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_string (out_values++, self->script_name);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseJanitor, get-proc-name) {
@@ -75,12 +75,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_JANITOR (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_string (out_values++, self->proc_name);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseJanitor, n-actions) {
@@ -99,12 +99,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_JANITOR (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_int (out_values++, g_slist_length (self->actions));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseJanitor, get-action) {
@@ -126,13 +126,13 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_JANITOR (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   BseJanitorAction *a = (BseJanitorAction*) g_slist_nth_data (self->actions, nth);
   /* set output parameters */
   sfi_value_set_string (out_values++, a ? g_quark_to_string (a->action) : NULL);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseJanitor, get-action-name) {
@@ -154,14 +154,14 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_JANITOR (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   BseJanitorAction *a = (BseJanitorAction*) g_slist_nth_data (self->actions, nth);
 
   /* set output parameters */
   sfi_value_set_string (out_values++, a ? a->name : NULL);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseJanitor, get-action-blurb) {
@@ -183,13 +183,13 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_JANITOR (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   BseJanitorAction *a = (BseJanitorAction*) g_slist_nth_data (self->actions, nth);
 
   /* set output parameters */
   sfi_value_set_string (out_values++, a ? a->blurb : NULL);
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseJanitor, kill) {
@@ -206,12 +206,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_JANITOR (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   bse_janitor_kill (self);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 PROCEDURE (bse-script-janitor, "Script/Get Janitor") {
@@ -227,12 +227,12 @@ BODY (BseProcedureClass *proc,
 
   /* check execution context */
   if (!self || !self->port || self->port_closed)
-    return BSE_ERROR_PROC_EXECUTION;
+    return Bse::ERROR_PROC_EXECUTION;
 
   /* set output parameters */
   bse_value_set_object (out_values++, self);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 PROCEDURE (bse-script-add-action, "Script/Add Action") {
@@ -256,16 +256,16 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_JANITOR (self) || !action || !name)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* check execution context */
   if (!self->port || self->port_closed)
-    return BSE_ERROR_PROC_EXECUTION;
+    return Bse::ERROR_PROC_EXECUTION;
 
   /* action */
   bse_janitor_add_action (self, action, name, blurb);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 PROCEDURE (bse-script-remove-action, "Script/Remove Action") {
@@ -283,16 +283,16 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_JANITOR (self) || !action)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* check execution context */
   if (!self->port || self->port_closed)
-    return BSE_ERROR_PROC_EXECUTION;
+    return Bse::ERROR_PROC_EXECUTION;
 
   /* action */
   bse_janitor_remove_action (self, action);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 PROCEDURE (bse-script-set-status, "Script/Set Status") {
@@ -309,18 +309,18 @@ PROCEDURE (bse-script-set-status, "Script/Set Status") {
 
   /* check parameters */
   if (!BSE_IS_JANITOR (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* check execution context */
   if (!self->port || self->port_closed)
-    return BSE_ERROR_PROC_EXECUTION;
+    return Bse::ERROR_PROC_EXECUTION;
   if (!message)
     message = "";
 
   /* action */
   bse_item_set (self, "status-message", message, NULL);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 PROCEDURE (bse-script-progress, "Script/Progress") {
@@ -338,16 +338,16 @@ PROCEDURE (bse-script-progress, "Script/Progress") {
 
   /* check parameters */
   if (!BSE_IS_JANITOR (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* check execution context */
   if (!self->port || self->port_closed)
-    return BSE_ERROR_PROC_EXECUTION;
+    return Bse::ERROR_PROC_EXECUTION;
 
   /* action */
   bse_janitor_progress (self, progress);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 PROCEDURE (bse-script-send-message, "Script/Message") {
@@ -367,7 +367,7 @@ PROCEDURE (bse-script-send-message, "Script/Message") {
   /* extract parameter values */
   BseJanitor *janitor = bse_janitor_get_current();
   if (!BSE_IS_JANITOR (janitor) || !janitor->port || janitor->port_closed)
-    return BSE_ERROR_PROC_EXECUTION;
+    return Bse::ERROR_PROC_EXECUTION;
 
   const gchar *domain = sfi_value_get_string (in_values++);
   const gchar *mtype  = sfi_value_get_string (in_values++);
@@ -402,10 +402,10 @@ PROCEDURE (bse-script-send-message, "Script/Message") {
       if (check && check[0])
         umsg.label = check;
       ServerImpl::instance().send_user_message (umsg);
-      return BSE_ERROR_NONE;
+      return Bse::ERROR_NONE;
     }
   else
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 }
 PROCEDURE (bse-script-quit, "Script/Quit") {
   HELP  = "Exit a script succesfully (server side).";
@@ -418,11 +418,11 @@ PROCEDURE (bse-script-quit, "Script/Quit") {
 
   /* check execution context */
   if (!BSE_IS_JANITOR (janitor) || !janitor->port || janitor->port_closed)
-    return BSE_ERROR_PROC_EXECUTION;
+    return Bse::ERROR_PROC_EXECUTION;
 
   /* action */
   janitor->force_normal_exit = TRUE;
   bse_janitor_close (janitor);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
diff --git a/bse/bseloader-aiff.cc b/bse/bseloader-aiff.cc
index 5a8adc0..8dda270 100644
--- a/bse/bseloader-aiff.cc
+++ b/bse/bseloader-aiff.cc
@@ -145,7 +145,7 @@ aiff_read_pstring (int    fd,
   return r;
 }
 
-static BseErrorType
+static Bse::ErrorType
 aiff_read_comm (int       fd,
                 AiffFile *afile,
                 guint32   chunk_size)
@@ -154,24 +154,24 @@ aiff_read_comm (int       fd,
   guint32 num_sample_frames;
   double sample_rate;
   if (chunk_size < 18)
-    return BSE_ERROR_FORMAT_INVALID;
+    return Bse::ERROR_FORMAT_INVALID;
   if (aiff_read_s16 (fd, &num_channels) < 0 ||
       aiff_read_u32 (fd, &num_sample_frames) < 0 ||
       aiff_read_s16 (fd, &sample_size) < 0 ||
       aiff_read_f80 (fd, &sample_rate) < 0)
-    return gsl_error_from_errno (errno, BSE_ERROR_FILE_READ_FAILED);
+    return gsl_error_from_errno (errno, Bse::ERROR_FILE_READ_FAILED);
   LDEBUG ("COMM: num_channels=%d num_sample_frames=%u sample_size=%d sample_rate=%f",
           num_channels, num_sample_frames, sample_size, sample_rate);
   if (num_channels <= 0 || sample_size <= 0 || sample_rate <= 0)
-    return BSE_ERROR_DATA_CORRUPT;
+    return Bse::ERROR_DATA_CORRUPT;
   afile->n_channels = num_channels;
   afile->bit_depth = sample_size;
   afile->n_values = num_sample_frames * num_channels;
   afile->mix_freq = sample_rate;
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
-static BseErrorType
+static Bse::ErrorType
 aiff_read_mark (int       fd,
                 AiffFile *afile,
                 guint32   chunk_size)
@@ -179,9 +179,9 @@ aiff_read_mark (int       fd,
   guint16 num_markers;
   uint i;
   if (chunk_size < 2)
-    return BSE_ERROR_FORMAT_INVALID;
+    return Bse::ERROR_FORMAT_INVALID;
   if (aiff_read_u16 (fd, &num_markers) < 0)
-    return gsl_error_from_errno (errno, BSE_ERROR_FILE_READ_FAILED);
+    return gsl_error_from_errno (errno, Bse::ERROR_FILE_READ_FAILED);
   for (i = 0; i < num_markers; i++)
     {
       guint16 marker_id;
@@ -190,7 +190,7 @@ aiff_read_mark (int       fd,
       if (aiff_read_u16 (fd, &marker_id) < 0 ||
           aiff_read_u32 (fd, &position) < 0 ||
           aiff_read_pstring (fd, &marker_name) < 0)
-        return gsl_error_from_errno (errno, BSE_ERROR_FILE_READ_FAILED);
+        return gsl_error_from_errno (errno, Bse::ERROR_FILE_READ_FAILED);
       j = afile->n_markers++;
       afile->markers = (AiffFile::Marker*) g_realloc (afile->markers, sizeof (afile->markers[0]) * 
afile->n_markers);
       afile->markers[j].id = marker_id;
@@ -198,10 +198,10 @@ aiff_read_mark (int       fd,
       afile->markers[j].name = marker_name;
       LDEBUG ("MARK: %u) >%u< \"%s\"", marker_id, position, marker_name);
     }
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
-static BseErrorType
+static Bse::ErrorType
 aiff_read_inst (int       fd,
                 AiffFile *afile,
                 guint32   chunk_size)
@@ -209,12 +209,12 @@ aiff_read_inst (int       fd,
   int r;
   RAPICORN_STATIC_ASSERT (sizeof (afile->instrument) == 20);
   if (chunk_size < 20)
-    return BSE_ERROR_FORMAT_INVALID;
+    return Bse::ERROR_FORMAT_INVALID;
   do
     r = read (fd, &afile->instrument, 20);
   while (r < 0 && errno == EINTR);
   if (r < 0)
-    return BseErrorType (r);
+    return Bse::ErrorType (r);
   afile->instrument.gain_dB = GINT16_FROM_BE (afile->instrument.gain_dB);
   afile->instrument.sustain_loop_mode = GUINT16_FROM_BE (afile->instrument.sustain_loop_mode);
   afile->instrument.sustain_begin_id = GUINT16_FROM_BE (afile->instrument.sustain_begin_id);
@@ -227,10 +227,10 @@ aiff_read_inst (int       fd,
           afile->instrument.low_velocity, afile->instrument.high_velocity, afile->instrument.gain_dB,
           afile->instrument.sustain_loop_mode, afile->instrument.sustain_begin_id, 
afile->instrument.sustain_end_id,
           afile->instrument.release_loop_mode, afile->instrument.release_begin_id, 
afile->instrument.release_end_id);
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
-static BseErrorType
+static Bse::ErrorType
 aiff_read_ssnd (int       fd,
                 AiffFile *afile,
                 guint32   chunk_size)
@@ -238,24 +238,24 @@ aiff_read_ssnd (int       fd,
   guint32 alignment_offset, alignment_block_size;
   off_t pos;
   if (chunk_size < 8)
-    return BSE_ERROR_FORMAT_INVALID;
+    return Bse::ERROR_FORMAT_INVALID;
   if (aiff_read_u32 (fd, &alignment_offset) < 0 ||
       aiff_read_u32 (fd, &alignment_block_size) < 0)
-    return gsl_error_from_errno (errno, BSE_ERROR_FILE_READ_FAILED);
+    return gsl_error_from_errno (errno, Bse::ERROR_FILE_READ_FAILED);
   do
     pos = lseek (fd, 0, SEEK_CUR);
   while (pos < 0 && errno == EINTR);
   if (pos < 0)
-    return gsl_error_from_errno (errno, BSE_ERROR_FILE_SEEK_FAILED);
+    return gsl_error_from_errno (errno, Bse::ERROR_FILE_SEEK_FAILED);
   if (chunk_size < 8 + alignment_offset)
-    return BSE_ERROR_FORMAT_INVALID;
+    return Bse::ERROR_FORMAT_INVALID;
   afile->data_start = pos + alignment_offset;
   afile->data_size = chunk_size - 8 - alignment_offset;
   LDEBUG ("SSND: pos:>%u< n_bytes:%u", afile->data_start, afile->data_size);
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
-static BseErrorType
+static Bse::ErrorType
 aiff_append_string (int       fd,
                     AiffFile *afile,
                     guint32   chunk_id,
@@ -274,32 +274,32 @@ aiff_append_string (int       fd,
   *text = g_strconcat (old ? old : "", string, NULL);
   g_free (old);
   g_free (string);
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
-static BseErrorType
+static Bse::ErrorType
 aiff_file_load (int       fd,
                 AiffFile *afile)
 {
   guint32 form_id, form_size, form_type, seek_pos;
   if (lseek (fd, 0, SEEK_SET) < 0)
-    return gsl_error_from_errno (errno, BSE_ERROR_FILE_SEEK_FAILED);
+    return gsl_error_from_errno (errno, Bse::ERROR_FILE_SEEK_FAILED);
   if (aiff_read_u32 (fd, &form_id) < 0 ||
       aiff_read_u32 (fd, &form_size) < 0 ||
       aiff_read_u32 (fd, &form_type) < 0)
-    return gsl_error_from_errno (errno, BSE_ERROR_FILE_READ_FAILED);
+    return gsl_error_from_errno (errno, Bse::ERROR_FILE_READ_FAILED);
   if (form_id != AIFF_ID ("FORM") || form_size < 4 || form_type != AIFF_ID ("AIFF"))
-    return BSE_ERROR_FORMAT_UNKNOWN;
+    return Bse::ERROR_FORMAT_UNKNOWN;
 
   afile->form_type = form_type;
   seek_pos = 12; /* we've read up 12 bytes so far */
   while (seek_pos < 8 + form_size)
     {
       guint32 chunk_id, chunk_size;
-      BseErrorType error;
+      Bse::ErrorType error;
       if (aiff_read_u32 (fd, &chunk_id) < 0 ||
           aiff_read_u32 (fd, &chunk_size) < 0)
-        return gsl_error_from_errno (errno, BSE_ERROR_FILE_EOF); /* premature eof? */
+        return gsl_error_from_errno (errno, Bse::ERROR_FILE_EOF); /* premature eof? */
       seek_pos += 4 + 4;
       switch (chunk_id)
         {
@@ -311,7 +311,7 @@ aiff_file_load (int       fd,
         case AIFF_ULONG ('A','U','T','H'): error = aiff_append_string (fd, afile, chunk_id, chunk_size, 
&afile->author); break;
         case AIFF_ULONG ('(','c',')',' '): error = aiff_append_string (fd, afile, chunk_id, chunk_size, 
&afile->copyright); break;
         case AIFF_ULONG ('A','N','N','O'): error = aiff_append_string (fd, afile, chunk_id, chunk_size, 
&afile->annotation); break;
-        default:                           error = BSE_ERROR_NONE;      /* ignore unknown chunks */
+        default:                           error = Bse::ERROR_NONE;      /* ignore unknown chunks */
           LDEBUG ("%c%c%c%c: ignored...", chunk_id >> 24, chunk_id >> 16 & 0xff, chunk_id >> 8 & 0xff, 
chunk_id & 0xff);
         }
       if (error)
@@ -320,9 +320,9 @@ aiff_file_load (int       fd,
       /* align to even seek sizes by skipping pad bytes */
       seek_pos = seek_pos & 1 ? seek_pos + 1 : seek_pos;
       if (lseek (fd, seek_pos, SEEK_SET) < 0)
-        return gsl_error_from_errno (errno, BSE_ERROR_FILE_SEEK_FAILED);
+        return gsl_error_from_errno (errno, Bse::ERROR_FILE_SEEK_FAILED);
     }
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 static void
@@ -348,7 +348,7 @@ typedef struct
 static BseWaveFileInfo*
 aiff_load_file_info (void         *data,
                      const char   *file_name,
-                     BseErrorType *error_p)
+                     Bse::ErrorType *error_p)
 {
   AiffFile *afile;
   FileInfo *fi;
@@ -356,7 +356,7 @@ aiff_load_file_info (void         *data,
   char *str;
   if (fd < 0)
     {
-      *error_p = gsl_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+      *error_p = gsl_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
       return NULL;
     }
   afile = g_new0 (AiffFile, 1);
@@ -378,14 +378,14 @@ aiff_load_file_info (void         *data,
       afile->bit_depth > 16 || afile->mix_freq < 8000)
     {
       aiff_file_free (afile);
-      *error_p = BSE_ERROR_FORMAT_UNKNOWN;
+      *error_p = Bse::ERROR_FORMAT_UNKNOWN;
       return NULL;
     }
   if (afile->n_values < afile->n_channels ||
       afile->data_size < (afile->bit_depth + 7) / 8 * afile->n_values)
     {
       aiff_file_free (afile);
-      *error_p = BSE_ERROR_NO_DATA;
+      *error_p = Bse::ERROR_NO_DATA;
       return NULL;
     }
   fi = sfi_new_struct0 (FileInfo, 1);
@@ -423,7 +423,7 @@ static BseWaveDsc*
 aiff_load_wave_dsc (void            *data,
                     BseWaveFileInfo *file_info,
                     uint             nth_wave,
-                    BseErrorType    *error_p)
+                    Bse::ErrorType    *error_p)
 {
   FileInfo *fi = (FileInfo*) file_info;
   AiffFile *afile = fi->afile;
@@ -496,7 +496,7 @@ static GslDataHandle*
 aiff_create_chunk_handle (void         *data,
                           BseWaveDsc   *wave_dsc,
                           uint          nth_chunk,
-                          BseErrorType *error_p)
+                          Bse::ErrorType *error_p)
 {
   WaveDsc *dsc = (WaveDsc*) wave_dsc;
   FileInfo *fi = (FileInfo*) dsc->wdsc.file_info;
diff --git a/bse/bseloader-bsewave.cc b/bse/bseloader-bsewave.cc
index b83c42c..0dcbcda 100644
--- a/bse/bseloader-bsewave.cc
+++ b/bse/bseloader-bsewave.cc
@@ -131,7 +131,7 @@ bsewave_skip_rest_statement (GScanner *scanner,
 static BseWaveFileInfo*
 bsewave_load_file_info (void         *data,
                        const char   *_file_name,
-                       BseErrorType *error_p)
+                       Bse::ErrorType *error_p)
 {
   FileInfo *fi = NULL;
   gboolean in_wave = FALSE, abort = FALSE;
@@ -158,7 +158,7 @@ bsewave_load_file_info (void         *data,
   fd = open (file_name, O_RDONLY);
   if (fd < 0)
     {
-      *error_p = gsl_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+      *error_p = gsl_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
       g_free (cwd);
       g_free (file_name);
       return NULL;
@@ -567,14 +567,14 @@ static BseWaveDsc*
 bsewave_load_wave_dsc (void            *data,
                       BseWaveFileInfo *file_info,
                       uint             nth_wave,
-                      BseErrorType    *error_p)
+                      Bse::ErrorType    *error_p)
 {
   uint token, i;
 
   int fd = open (file_info->file_name, O_RDONLY);
   if (fd < 0)
     {
-      *error_p = gsl_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+      *error_p = gsl_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
       return NULL;
     }
 
@@ -642,7 +642,7 @@ static GslDataHandle*
 bsewave_load_singlechunk_wave (BseWaveFileInfo *fi,
                               const char      *wave_name,
                                float            osc_freq,
-                              BseErrorType    *error_p,
+                              Bse::ErrorType    *error_p,
                                uint            *n_channelsp)
 {
   BseWaveDsc *wdsc;
@@ -653,7 +653,7 @@ bsewave_load_singlechunk_wave (BseWaveFileInfo *fi,
   else if (!wave_name)
     {
       /* don't know which wave to pick */
-      *error_p = BSE_ERROR_FORMAT_INVALID;
+      *error_p = Bse::ERROR_FORMAT_INVALID;
       return NULL;
     }
   else /* find named wave */
@@ -662,7 +662,7 @@ bsewave_load_singlechunk_wave (BseWaveFileInfo *fi,
        break;
   if (i >= fi->n_waves)
     {
-      *error_p = BSE_ERROR_WAVE_NOT_FOUND;
+      *error_p = Bse::ERROR_WAVE_NOT_FOUND;
       return NULL;
     }
 
@@ -691,7 +691,7 @@ bsewave_load_singlechunk_wave (BseWaveFileInfo *fi,
    * point to a wave with multiple chunks...
    */
   bse_wave_dsc_free (wdsc);
-  *error_p = BSE_ERROR_FORMAT_INVALID;
+  *error_p = Bse::ERROR_FORMAT_INVALID;
   return NULL;
 }
 
@@ -699,7 +699,7 @@ static GslDataHandle*
 bsewave_create_chunk_handle (void         *data,
                             BseWaveDsc   *wave_dsc,
                             uint          nth_chunk,
-                            BseErrorType *error_p)
+                            Bse::ErrorType *error_p)
 {
   WaveDsc *dsc = (WaveDsc*) wave_dsc;
   FileInfo *fi = (FileInfo*) dsc->wdsc.file_info;
@@ -711,7 +711,7 @@ bsewave_create_chunk_handle (void         *data,
       char *string;
     case AUTO_FILE_MAGIC:
       {
-        *error_p = BSE_ERROR_IO;
+        *error_p = Bse::ERROR_IO;
         /* construct chunk file name from (hopefully) relative path */
         if (g_path_is_absolute ((char*) LOADER_FILE (chunk)))
           string = g_strdup ((char*) LOADER_FILE (chunk));
@@ -735,7 +735,7 @@ bsewave_create_chunk_handle (void         *data,
               }
             if (dhandle && nch != dsc->wdsc.n_channels)
               {
-                *error_p = BSE_ERROR_WRONG_N_CHANNELS;
+                *error_p = Bse::ERROR_WRONG_N_CHANNELS;
                 gsl_data_handle_unref (dhandle);
                 dhandle = NULL;
               }
@@ -760,7 +760,7 @@ bsewave_create_chunk_handle (void         *data,
                                     LOADER_BOFFSET (chunk),    /* byte offset */
                                      LOADER_LENGTH (chunk) ? LOADER_LENGTH (chunk) : -1,        /* n_values 
*/
                                      chunk->xinfos);
-      *error_p = dhandle ? BSE_ERROR_NONE : BSE_ERROR_IO;
+      *error_p = dhandle ? Bse::ERROR_NONE : Bse::ERROR_IO;
       g_free (string);
       break;
     case RAW_LINK_MAGIC:
@@ -775,15 +775,15 @@ bsewave_create_chunk_handle (void         *data,
                                                  LOADER_BOFFSET (chunk),        /* byte offset */
                                                 LOADER_LENGTH (chunk),         /* byte length */
                                                  chunk->xinfos);
-         *error_p = dhandle ? BSE_ERROR_NONE : BSE_ERROR_IO;
+         *error_p = dhandle ? Bse::ERROR_NONE : Bse::ERROR_IO;
        }
       else
-        *error_p = BSE_ERROR_WAVE_NOT_FOUND;
+        *error_p = Bse::ERROR_WAVE_NOT_FOUND;
       break;
     case VORBIS_LINK_MAGIC:
       if (LOADER_LENGTH (chunk))        /* inlined binary data */
        {
-          *error_p = BSE_ERROR_IO;
+          *error_p = Bse::ERROR_IO;
           uint vnch = 0;
          dhandle = gsl_data_handle_new_ogg_vorbis_zoffset (fi->wfi.file_name,
                                                             chunk->osc_freq,
@@ -792,7 +792,7 @@ bsewave_create_chunk_handle (void         *data,
                                                             &vnch, NULL);
           if (dhandle && vnch != dsc->wdsc.n_channels)
             {
-              *error_p = BSE_ERROR_WRONG_N_CHANNELS;
+              *error_p = Bse::ERROR_WRONG_N_CHANNELS;
               gsl_data_handle_unref (dhandle);
               dhandle = NULL;
             }
@@ -804,12 +804,12 @@ bsewave_create_chunk_handle (void         *data,
             }
        }
       else
-        *error_p = BSE_ERROR_WAVE_NOT_FOUND;
+        *error_p = Bse::ERROR_WAVE_NOT_FOUND;
       break;
     case FLAC_LINK_MAGIC:
       if (LOADER_LENGTH (chunk))        /* inlined binary data */
         {
-          *error_p = BSE_ERROR_IO;
+          *error_p = Bse::ERROR_IO;
           uint vnch = 0;
          dhandle = bse_data_handle_new_flac_zoffset (fi->wfi.file_name,
                                                       chunk->osc_freq,
@@ -818,7 +818,7 @@ bsewave_create_chunk_handle (void         *data,
                                                       &vnch, NULL);
           if (dhandle && vnch != dsc->wdsc.n_channels)
             {
-              *error_p = BSE_ERROR_WRONG_N_CHANNELS;
+              *error_p = Bse::ERROR_WRONG_N_CHANNELS;
               gsl_data_handle_unref (dhandle);
               dhandle = NULL;
             }
@@ -830,14 +830,14 @@ bsewave_create_chunk_handle (void         *data,
             }
         }
       else
-        *error_p = BSE_ERROR_WAVE_NOT_FOUND;
+        *error_p = Bse::ERROR_WAVE_NOT_FOUND;
       break;
     default:    /* no file_name and no loader specified */
-      *error_p = BSE_ERROR_FORMAT_UNKNOWN;
+      *error_p = Bse::ERROR_FORMAT_UNKNOWN;
       break;
     }
   if (dhandle)
-    *error_p = BSE_ERROR_NONE;
+    *error_p = Bse::ERROR_NONE;
   return dhandle;
 }
 
diff --git a/bse/bseloader-flac.cc b/bse/bseloader-flac.cc
index c10baad..1a57c5e 100644
--- a/bse/bseloader-flac.cc
+++ b/bse/bseloader-flac.cc
@@ -36,7 +36,7 @@ struct FileInfo
     return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
   }
   FileInfo (const gchar  *file_name,
-            BseErrorType *error_p)
+            Bse::ErrorType *error_p)
   {
     /* initialize C structures with zeros */
     memset (&wfi, 0, sizeof (wfi));
@@ -46,14 +46,14 @@ struct FileInfo
     FLAC__StreamDecoder* decoder = FLAC__stream_decoder_new();
     if (!decoder)
       {
-        *error_p = BSE_ERROR_INTERNAL;  // should not happen
+        *error_p = Bse::ERROR_INTERNAL;  // should not happen
         return;
       }
     error_occurred = false;
     int r = FLAC__stream_decoder_init_file (decoder, file_name, flac_write_callback, NULL, 
flac_error_callback, this);
     if (r != 0)
       {
-        *error_p = gsl_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+        *error_p = gsl_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
         return;
       }
 
@@ -65,7 +65,7 @@ struct FileInfo
 
     if (error_occurred || FLAC__stream_decoder_get_channels (decoder) == 0)
       {
-        *error_p = BSE_ERROR_IO;
+        *error_p = Bse::ERROR_IO;
         return;
       }
 
@@ -108,7 +108,7 @@ struct FileInfo
 static BseWaveFileInfo*
 flac_load_file_info (gpointer      data,
                     const gchar  *file_name,
-                    BseErrorType *error_p)
+                    Bse::ErrorType *error_p)
 {
   FileInfo *file_info = new FileInfo (file_name, error_p);
   if (*error_p)
@@ -131,7 +131,7 @@ static BseWaveDsc*
 flac_load_wave_dsc (gpointer         data,
                    BseWaveFileInfo *wave_file_info,
                    guint            nth_wave,
-                   BseErrorType    *error_p)
+                   Bse::ErrorType    *error_p)
 {
   FileInfo *file_info = reinterpret_cast<FileInfo*> (wave_file_info);
   return &file_info->wdsc;
@@ -147,7 +147,7 @@ static GslDataHandle*
 flac_create_chunk_handle (gpointer      data,
                          BseWaveDsc   *wave_dsc,
                          guint         nth_chunk,
-                         BseErrorType *error_p)
+                         Bse::ErrorType *error_p)
 {
   g_return_val_if_fail (nth_chunk == 0, NULL);
 
diff --git a/bse/bseloader-guspatch.cc b/bse/bseloader-guspatch.cc
index 2d3108e..355aaac 100644
--- a/bse/bseloader-guspatch.cc
+++ b/bse/bseloader-guspatch.cc
@@ -28,9 +28,9 @@ typedef int sdword;
  * executes read_me (which should be a function call to read something from the file),
  * and returns from the calling function if that fails
  */
-#define read_or_return_error(read_me) G_STMT_START{ BseErrorType _error = read_me; if (_error) return 
_error; }G_STMT_END
+#define read_or_return_error(read_me) G_STMT_START{ Bse::ErrorType _error = read_me; if (_error) return 
_error; }G_STMT_END
 
-static inline BseErrorType
+static inline Bse::ErrorType
 fread_block (FILE *file,
              int   len,
              void *data)
@@ -38,13 +38,13 @@ fread_block (FILE *file,
   if (fread (data, len, 1, file) != 1)
     {
       if (feof (file))
-        return BSE_ERROR_FILE_EOF;
+        return Bse::ERROR_FILE_EOF;
       else
-        return gsl_error_from_errno (errno, BSE_ERROR_FILE_READ_FAILED);
+        return gsl_error_from_errno (errno, Bse::ERROR_FILE_READ_FAILED);
     }
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
-static inline BseErrorType
+static inline Bse::ErrorType
 skip (FILE *file,
       int   len)
 {
@@ -54,10 +54,10 @@ skip (FILE *file,
       read_or_return_error (fread_block (file, 1, &junk));
       len--;
     }
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
-static inline BseErrorType
+static inline Bse::ErrorType
 fread_bytes (FILE          *file,
              unsigned char *bytes,
              int            len)
@@ -65,7 +65,7 @@ fread_bytes (FILE          *file,
   return fread_block (file, len, bytes);
 }
 
-static inline BseErrorType
+static inline Bse::ErrorType
 fread_string (FILE *file,
               char *str,
               int   len)
@@ -74,7 +74,7 @@ fread_string (FILE *file,
 }
 
 /* readXXX with sizeof(xxx) == 1 */
-static inline BseErrorType
+static inline Bse::ErrorType
 fread_byte (FILE *file,
           byte &b)
 {
@@ -82,7 +82,7 @@ fread_byte (FILE *file,
 }
 
 /* readXXX with sizeof(xxx) == 2 */
-static inline BseErrorType
+static inline Bse::ErrorType
 fread_word (FILE *file,
           word &w)
 {
@@ -92,10 +92,10 @@ fread_word (FILE *file,
   read_or_return_error (fread_block (file, 1, &h));
   w = (h << 8) + l;
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
-static inline BseErrorType
+static inline Bse::ErrorType
 fread_short_word (FILE  *file,
                   sword &sw)
 {
@@ -104,11 +104,11 @@ fread_short_word (FILE  *file,
   read_or_return_error (fread_word (file, w));
   sw = (sword) w;
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 /* readXXX with sizeof(xxx) == 4 */
-static inline BseErrorType
+static inline Bse::ErrorType
 fread_dword (FILE *file, dword& dw)
 {
   byte h, l, hh, hl;
@@ -119,7 +119,7 @@ fread_dword (FILE *file, dword& dw)
   read_or_return_error (fread_block (file, 1, &hh));
   dw = (hh << 24) + (hl << 16) + (h << 8) + l;
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 struct PatHeader
@@ -141,7 +141,7 @@ struct PatHeader
   {
   }
 
-  BseErrorType
+  Bse::ErrorType
   load (FILE *file)
   {
     read_or_return_error (fread_string (file, id, 12));
@@ -159,7 +159,7 @@ struct PatHeader
 
     read_or_return_error (fread_string (file, reserved, 36));
 
-    return BSE_ERROR_NONE;
+    return Bse::ERROR_NONE;
   }
 };
 
@@ -181,7 +181,7 @@ struct PatInstrument
   {
   }
 
-  BseErrorType
+  Bse::ErrorType
   load (FILE *file)
   {
     read_or_return_error (fread_word (file, number));
@@ -196,7 +196,7 @@ struct PatInstrument
     read_or_return_error (fread_byte (file, sampleCount));
     read_or_return_error (fread_string (file, reserved, 40));
 
-    return BSE_ERROR_NONE;
+    return Bse::ERROR_NONE;
   }
 };
 
@@ -242,7 +242,7 @@ struct PatPatch
   {
   }
 
-  BseErrorType
+  Bse::ErrorType
   load (FILE *file)
   {
     read_or_return_error (fread_string (file, filename, 7));
@@ -269,7 +269,7 @@ struct PatPatch
     read_or_return_error (fread_word (file, freqScaleFactor));
     read_or_return_error (fread_string (file, reserved, 36));
 
-    return BSE_ERROR_NONE;
+    return Bse::ERROR_NONE;
   }
 };
 #undef read_or_return_error
@@ -377,7 +377,7 @@ struct FileInfo
 
 
   FileInfo (const gchar  *file_name,
-            BseErrorType *error_p)
+            Bse::ErrorType *error_p)
   {
     /* initialize C structures with zeros */
     memset (&wfi, 0, sizeof (wfi));
@@ -387,7 +387,7 @@ struct FileInfo
     FILE *patfile = fopen (file_name, "r");
     if (!patfile)
       {
-       *error_p = gsl_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+       *error_p = gsl_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
        return;
       }
 
@@ -528,7 +528,7 @@ struct FileInfo
 static BseWaveFileInfo*
 pat_load_file_info (gpointer      data,
                    const gchar  *file_name,
-                   BseErrorType *error_p)
+                   Bse::ErrorType *error_p)
 {
   FileInfo *file_info = new FileInfo (file_name, error_p);
   if (*error_p)
@@ -552,7 +552,7 @@ static BseWaveDsc*
 pat_load_wave_dsc (gpointer         data,
                   BseWaveFileInfo *wave_file_info,
                   guint            nth_wave,
-                  BseErrorType    *error_p)
+                  Bse::ErrorType    *error_p)
 {
   FileInfo *file_info = reinterpret_cast<FileInfo*> (wave_file_info);
   return &file_info->wdsc;
@@ -568,7 +568,7 @@ static GslDataHandle*
 pat_create_chunk_handle (gpointer      data,
                         BseWaveDsc   *wave_dsc,
                         guint         nth_chunk,
-                        BseErrorType *error_p)
+                        Bse::ErrorType *error_p)
 {
   g_return_val_if_fail (nth_chunk < wave_dsc->n_chunks, NULL);
   FileInfo *file_info = reinterpret_cast<FileInfo*> (wave_dsc->file_info);
diff --git a/bse/bseloader-mad.cc b/bse/bseloader-mad.cc
index d6fd6ad..3ab3c20 100644
--- a/bse/bseloader-mad.cc
+++ b/bse/bseloader-mad.cc
@@ -21,12 +21,12 @@ typedef struct
 static BseWaveFileInfo*
 mad_load_file_info (void         *data,
                    const char   *file_name,
-                   BseErrorType *error_p)
+                   Bse::ErrorType *error_p)
 {
   FileInfo *fi;
   uint n_channels;
   float mix_freq;
-  BseErrorType error;
+  Bse::ErrorType error;
 
   error = gsl_data_handle_mad_testopen (file_name, &n_channels, &mix_freq);
   if (error)
@@ -64,7 +64,7 @@ static BseWaveDsc*
 mad_load_wave_dsc (void            *data,
                   BseWaveFileInfo *file_info,
                   uint             nth_wave,
-                  BseErrorType    *error_p)
+                  Bse::ErrorType    *error_p)
 {
   FileInfo *fi = (FileInfo*) file_info;
   BseWaveDsc *wdsc = sfi_new_struct0 (BseWaveDsc, 1);
@@ -95,7 +95,7 @@ static GslDataHandle*
 mad_create_chunk_handle (void         *data,
                         BseWaveDsc   *wdsc,
                         uint          nth_chunk,
-                        BseErrorType *error_p)
+                        Bse::ErrorType *error_p)
 {
   FileInfo *fi = (FileInfo*) wdsc->file_info;
   GslDataHandle *dhandle;
@@ -110,7 +110,7 @@ mad_create_chunk_handle (void         *data,
       gsl_data_handle_unref (tmp_handle);
     }
   if (!dhandle && !*error_p)
-    *error_p = BSE_ERROR_FILE_OPEN_FAILED;
+    *error_p = Bse::ERROR_FILE_OPEN_FAILED;
   return dhandle;
 }
 
diff --git a/bse/bseloader-oggvorbis.cc b/bse/bseloader-oggvorbis.cc
index 464e8a5..4a980ed 100644
--- a/bse/bseloader-oggvorbis.cc
+++ b/bse/bseloader-oggvorbis.cc
@@ -22,7 +22,7 @@ typedef struct
 static BseWaveFileInfo*
 oggv_load_file_info (void         *data,
                     const char   *file_name,
-                    BseErrorType *error_p)
+                    Bse::ErrorType *error_p)
 {
   FileInfo *fi = sfi_new_struct0 (FileInfo, 1);
   FILE *file;
@@ -31,7 +31,7 @@ oggv_load_file_info (void         *data,
   file = fopen (file_name, "r");
   if (!file)
     {
-      *error_p = gsl_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+      *error_p = gsl_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
       return NULL;
     }
 
@@ -41,7 +41,7 @@ oggv_load_file_info (void         *data,
     {
       fclose (file);
       sfi_delete_struct (FileInfo, fi);
-      *error_p = BSE_ERROR_CODEC_FAILURE;
+      *error_p = Bse::ERROR_CODEC_FAILURE;
       return NULL;
     }
 
@@ -82,7 +82,7 @@ static BseWaveDsc*
 oggv_load_wave_dsc (void            *data,
                    BseWaveFileInfo *file_info,
                    uint             nth_wave,
-                   BseErrorType    *error_p)
+                   Bse::ErrorType    *error_p)
 {
   FileInfo *fi = (FileInfo*) file_info;
   BseWaveDsc *wdsc = sfi_new_struct0 (BseWaveDsc, 1);
@@ -115,7 +115,7 @@ static GslDataHandle*
 oggv_create_chunk_handle (void         *data,
                          BseWaveDsc   *wdsc,
                          uint          nth_chunk,
-                         BseErrorType *error_p)
+                         Bse::ErrorType *error_p)
 {
   FileInfo *fi = (FileInfo*) wdsc->file_info;
   GslDataHandle *dhandle;
@@ -132,7 +132,7 @@ oggv_create_chunk_handle (void         *data,
       gsl_data_handle_unref (tmp_handle);
     }
   if (!dhandle)
-    *error_p = BSE_ERROR_FILE_OPEN_FAILED;
+    *error_p = Bse::ERROR_FILE_OPEN_FAILED;
   return dhandle;
 }
 
diff --git a/bse/bseloader-wav.cc b/bse/bseloader-wav.cc
index b8c1733..803725e 100644
--- a/bse/bseloader-wav.cc
+++ b/bse/bseloader-wav.cc
@@ -31,7 +31,7 @@ typedef struct
   DWord file_length;   /* file length */
   DWord chunk_type;     /* 'WAVE', big endian as int */
 } WavHeader;
-static BseErrorType
+static Bse::ErrorType
 wav_read_header (int        fd,
                 WavHeader *header)
 {
@@ -45,7 +45,7 @@ wav_read_header (int        fd,
   if (read (fd, header, n_bytes) != n_bytes)
     {
       LDEBUG ("failed to read WavHeader: %s", g_strerror (errno));
-      return gsl_error_from_errno (errno, BSE_ERROR_IO);
+      return gsl_error_from_errno (errno, Bse::ERROR_IO);
     }
 
   /* endianess corrections */
@@ -57,20 +57,20 @@ wav_read_header (int        fd,
   if (header->main_chunk != ('R' << 24 | 'I' << 16 | 'F' << 8 | 'F'))
     {
       LDEBUG ("unmatched token 'RIFF'");
-      return BSE_ERROR_FORMAT_INVALID;
+      return Bse::ERROR_FORMAT_INVALID;
     }
   if (header->file_length < 36)
     {
       LDEBUG ("file length (%u) too small", header->file_length);
-      return BSE_ERROR_FORMAT_INVALID;
+      return Bse::ERROR_FORMAT_INVALID;
     }
   if (header->chunk_type != ('W' << 24 | 'A' << 16 | 'V' << 8 | 'E'))
     {
       LDEBUG ("unmatched token 'WAVE'");
-      return BSE_ERROR_FORMAT_INVALID;
+      return Bse::ERROR_FORMAT_INVALID;
     }
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 typedef struct
@@ -84,7 +84,7 @@ typedef struct
   Word  byte_per_sample;        /* 1 = 8bit, 2 = 16bit, 3 = 24bit, 4 = 24bit or 32 bit */
   Word  bit_per_sample;         /* 8, 12, 16, 32 */
 } FmtHeader;
-static BseErrorType
+static Bse::ErrorType
 wav_read_fmt_header (int        fd,
                     FmtHeader *header)
 {
@@ -98,7 +98,7 @@ wav_read_fmt_header (int        fd,
   if (read (fd, header, n_bytes) != n_bytes)
     {
       LDEBUG ("failed to read FmtHeader");
-      return gsl_error_from_errno (errno, BSE_ERROR_IO);
+      return gsl_error_from_errno (errno, Bse::ERROR_IO);
     }
 
   /* endianess corrections */
@@ -115,47 +115,47 @@ wav_read_fmt_header (int        fd,
   if (header->sub_chunk != ('f' << 24 | 'm' << 16 | 't' << 8 | ' '))
     {
       LDEBUG ("unmatched token 'fmt '");
-      return BSE_ERROR_FORMAT_UNKNOWN;
+      return Bse::ERROR_FORMAT_UNKNOWN;
     }
   if (header->format != 1 /* PCM */ &&
       !FORMAT_IS_ALAW (header->format) &&
       !FORMAT_IS_ULAW (header->format))
     {
       LDEBUG ("unknown format (%u)", header->format);
-      return BSE_ERROR_FORMAT_UNKNOWN;
+      return Bse::ERROR_FORMAT_UNKNOWN;
     }
   if (header->n_channels > 2 || header->n_channels < 1)
     {
       LDEBUG ("invalid number of channels (%u)", header->n_channels);
-      return BSE_ERROR_FORMAT_UNKNOWN;
+      return Bse::ERROR_FORMAT_UNKNOWN;
     }
   if (header->length < 16)
     {
       LDEBUG ("WAVE header too short (%u)", header->length);
-      return BSE_ERROR_FORMAT_INVALID;
+      return Bse::ERROR_FORMAT_INVALID;
     }
   if (header->sample_freq < 1378 || header->sample_freq > 96000)
     {
       LDEBUG ("invalid sample_freq (%u)", header->sample_freq);
-      return BSE_ERROR_FORMAT_UNKNOWN;
+      return Bse::ERROR_FORMAT_UNKNOWN;
     }
   if (header->byte_per_sample < 1 * header->n_channels || header->byte_per_sample > 4 * header->n_channels ||
       (header->bit_per_sample != 8 && header->bit_per_sample != 12 && header->bit_per_sample != 16 &&
        header->bit_per_sample != 24 && header->bit_per_sample != 32))
     {
       LDEBUG ("invalid byte_per_sample (%u) or bit_per_sample (%u)", header->byte_per_sample, 
header->bit_per_sample);
-      return BSE_ERROR_FORMAT_UNKNOWN;
+      return Bse::ERROR_FORMAT_UNKNOWN;
     }
   if (header->byte_per_second != header->sample_freq * header->byte_per_sample)
     {
       LDEBUG ("invalid byte_per_second (%u!=%u)", header->byte_per_second, header->sample_freq * 
header->byte_per_sample);
-      return BSE_ERROR_FORMAT_INVALID;
+      return Bse::ERROR_FORMAT_INVALID;
     }
   if (!(header->byte_per_sample == (header->bit_per_sample + 7) / 8 * header->n_channels ||
         (header->bit_per_sample == 24 && header->byte_per_sample == 4 * header->n_channels)))
     {
       LDEBUG ("invalid byte_per_sample (%u!=%u)", header->byte_per_sample, (header->bit_per_sample + 7) / 8 
* header->n_channels);
-      return BSE_ERROR_FORMAT_INVALID;
+      return Bse::ERROR_FORMAT_INVALID;
     }
   LDEBUG ("WAVE: freq=%u channels=%u bits=%u bytes=%u", header->sample_freq, header->n_channels, 
header->bit_per_sample, header->byte_per_sample);
   if (header->length > 16)
@@ -171,13 +171,13 @@ wav_read_fmt_header (int        fd,
          if (l < 1 || l > n)
            {
              sfi_diag ("failed to read FmtHeader from WAVE file");
-             return gsl_error_from_errno (errno, BSE_ERROR_IO);
+             return gsl_error_from_errno (errno, Bse::ERROR_IO);
            }
          n -= l;
        }
     }
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 typedef struct
@@ -185,7 +185,7 @@ typedef struct
   DWord data_chunk;             /* 'data', big endian as int */
   DWord data_length;
 } DataHeader;
-static BseErrorType
+static Bse::ErrorType
 wav_read_data_header (int         fd,
                      DataHeader *header,
                      uint        byte_alignment)
@@ -200,7 +200,7 @@ wav_read_data_header (int         fd,
   if (read (fd, header, n_bytes) != n_bytes)
     {
       LDEBUG ("failed to read DataHeader");
-      return gsl_error_from_errno (errno, BSE_ERROR_IO);
+      return gsl_error_from_errno (errno, Bse::ERROR_IO);
     }
 
   /* endianess corrections */
@@ -226,7 +226,7 @@ wav_read_data_header (int         fd,
       if (lseek (fd, header->data_length, SEEK_CUR) < 0)
        {
          LDEBUG ("failed to seek while skipping sub-chunk");
-         return gsl_error_from_errno (errno, BSE_ERROR_IO);
+         return gsl_error_from_errno (errno, Bse::ERROR_IO);
        }
       return wav_read_data_header (fd, header, byte_alignment);
     }
@@ -234,10 +234,10 @@ wav_read_data_header (int         fd,
     {
       LDEBUG ("invalid data length (%u) or alignment (%u)",
               header->data_length, header->data_length % byte_alignment);
-      return BSE_ERROR_FORMAT_INVALID;
+      return Bse::ERROR_FORMAT_INVALID;
     }
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 typedef struct
@@ -249,7 +249,7 @@ typedef struct
 static BseWaveFileInfo*
 wav_load_file_info (void         *data,
                    const char   *file_name,
-                   BseErrorType *error_p)
+                   Bse::ErrorType *error_p)
 {
   WavHeader wav_header;
   FileInfo *fi;
@@ -258,7 +258,7 @@ wav_load_file_info (void         *data,
   fd = open (file_name, O_RDONLY);
   if (fd < 0)
     {
-      *error_p = gsl_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+      *error_p = gsl_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
       return NULL;
     }
 
@@ -303,7 +303,7 @@ static BseWaveDsc*
 wav_load_wave_dsc (void            *data,
                   BseWaveFileInfo *file_info,
                   uint             nth_wave,
-                  BseErrorType    *error_p)
+                  Bse::ErrorType    *error_p)
 {
   FileInfo *fi = (FileInfo*) file_info;
   DataHeader data_header;
@@ -315,7 +315,7 @@ wav_load_wave_dsc (void            *data,
   if (lseek (fi->fd, sizeof (WavHeader), SEEK_SET) != sizeof (WavHeader))
     {
       LDEBUG ("failed to seek to end of WavHeader");
-      *error_p = gsl_error_from_errno (errno, BSE_ERROR_IO);
+      *error_p = gsl_error_from_errno (errno, Bse::ERROR_IO);
       return NULL;
     }
   *error_p = wav_read_fmt_header (fi->fd, &fmt_header);
@@ -327,7 +327,7 @@ wav_load_wave_dsc (void            *data,
   if (data_offset < sizeof (WavHeader) && !*error_p)
     {
       LDEBUG ("failed to seek to start of data");
-      *error_p = gsl_error_from_errno (errno, BSE_ERROR_IO);
+      *error_p = gsl_error_from_errno (errno, Bse::ERROR_IO);
     }
   if (*error_p)
     return NULL;
@@ -356,7 +356,7 @@ wav_load_wave_dsc (void            *data,
       /* fall through */
     default:
       LDEBUG ("unrecognized sample width (%ubits, %ubytes)", fmt_header.bit_per_sample, 
fmt_header.byte_per_sample);
-      *error_p = BSE_ERROR_FORMAT_UNKNOWN;
+      *error_p = Bse::ERROR_FORMAT_UNKNOWN;
       return NULL;
     }
   LDEBUG ("wav loaded: n_channels: %d sample_freq: %d bit_width: %u",
@@ -392,7 +392,7 @@ static GslDataHandle*
 wav_create_chunk_handle (void         *data,
                         BseWaveDsc   *wave_dsc,
                         uint          nth_chunk,
-                        BseErrorType *error_p)
+                        Bse::ErrorType *error_p)
 {
   WaveDsc *dsc = (WaveDsc*) wave_dsc;
   GslDataHandle *dhandle;
diff --git a/bse/bseloader.cc b/bse/bseloader.cc
index 08eb43c..088d4a0 100644
--- a/bse/bseloader.cc
+++ b/bse/bseloader.cc
@@ -131,14 +131,14 @@ bse_loader_match (const char *file_name)
 
 BseWaveFileInfo*
 bse_wave_file_info_load (const char   *file_name,
-                        BseErrorType *error_p)
+                        Bse::ErrorType *error_p)
 {
   BseWaveFileInfo *finfo = NULL;
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
   BseLoader *loader;
 
   if (error_p)
-    *error_p = BSE_ERROR_INTERNAL;
+    *error_p = Bse::ERROR_INTERNAL;
   g_return_val_if_fail (file_name != NULL, NULL);
 
   loader = bse_loader_match (file_name);
@@ -152,7 +152,7 @@ bse_wave_file_info_load (const char   *file_name,
          finfo = NULL;
        }
       if (!finfo && !error)
-       error = BSE_ERROR_FILE_EMPTY;   /* FIXME: try next loader */
+       error = Bse::ERROR_FILE_EMPTY;  /* FIXME: try next loader */
       if (finfo)
        {
          if (finfo->n_waves > 0)
@@ -173,7 +173,7 @@ bse_wave_file_info_load (const char   *file_name,
            {
              loader->free_file_info (loader->data, finfo);
              finfo = NULL;
-             error = BSE_ERROR_FILE_EMPTY;   /* FIXME: try next loader */
+             error = Bse::ERROR_FILE_EMPTY;   /* FIXME: try next loader */
            }
        }
     }
@@ -182,7 +182,7 @@ bse_wave_file_info_load (const char   *file_name,
       /* try to provide apropriate error code */
       error = gsl_file_check (file_name, "rf");
       if (!error)
-       error = BSE_ERROR_FORMAT_UNKNOWN;
+       error = Bse::ERROR_FORMAT_UNKNOWN;
     }
 
   if (error_p)
@@ -235,14 +235,14 @@ BseWaveDsc*
 bse_wave_dsc_load (BseWaveFileInfo *wave_file_info,
                   uint             nth_wave,
                    gboolean         accept_empty,
-                   BseErrorType    *error_p)
+                   Bse::ErrorType    *error_p)
 {
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
   BseWaveDsc *wdsc;
   BseLoader *loader;
 
   if (error_p)
-    *error_p = BSE_ERROR_INTERNAL;
+    *error_p = Bse::ERROR_INTERNAL;
   g_return_val_if_fail (wave_file_info != NULL, NULL);
   g_return_val_if_fail (wave_file_info->loader != NULL, NULL);
   g_return_val_if_fail (nth_wave < wave_file_info->n_waves, NULL);
@@ -257,7 +257,7 @@ bse_wave_dsc_load (BseWaveFileInfo *wave_file_info,
       wdsc = NULL;
     }
   if (!wdsc && !error)
-    error = BSE_ERROR_FILE_EMPTY;
+    error = Bse::ERROR_FILE_EMPTY;
   if (wdsc)
     {
       if (accept_empty || wdsc->n_chunks > 0)
@@ -272,7 +272,7 @@ bse_wave_dsc_load (BseWaveFileInfo *wave_file_info,
        {
          loader->free_wave_dsc (loader->data, wdsc);
          wdsc = NULL;
-         error = BSE_ERROR_FILE_EMPTY;
+         error = Bse::ERROR_FILE_EMPTY;
        }
     }
 
@@ -298,14 +298,14 @@ bse_wave_dsc_free (BseWaveDsc *wave_dsc)
 GslDataHandle*
 bse_wave_handle_create (BseWaveDsc   *wave_dsc,
                        uint          nth_chunk,
-                       BseErrorType *error_p)
+                       Bse::ErrorType *error_p)
 {
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
   GslDataHandle *dhandle;
   BseLoader *loader;
 
   if (error_p)
-    *error_p = BSE_ERROR_INTERNAL;
+    *error_p = Bse::ERROR_INTERNAL;
   g_return_val_if_fail (wave_dsc != NULL, NULL);
   g_return_val_if_fail (wave_dsc->file_info != NULL, NULL);
   g_return_val_if_fail (nth_chunk < wave_dsc->n_chunks, NULL);
@@ -323,7 +323,7 @@ bse_wave_handle_create (BseWaveDsc   *wave_dsc,
       dhandle = NULL;
     }
   if (!dhandle && !error)
-    error = BSE_ERROR_FORMAT_INVALID;
+    error = Bse::ERROR_FORMAT_INVALID;
 
   if (error_p)
     *error_p = error;
@@ -334,14 +334,14 @@ bse_wave_handle_create (BseWaveDsc   *wave_dsc,
 GslWaveChunk*
 bse_wave_chunk_create (BseWaveDsc   *wave_dsc,
                       uint          nth_chunk,
-                      BseErrorType *error_p)
+                      Bse::ErrorType *error_p)
 {
   GslDataHandle *dhandle;
   GslDataCache *dcache;
   GslWaveChunk *wchunk;
 
   if (error_p)
-    *error_p = BSE_ERROR_INTERNAL;
+    *error_p = Bse::ERROR_INTERNAL;
   g_return_val_if_fail (wave_dsc != NULL, NULL);
   g_return_val_if_fail (nth_chunk < wave_dsc->n_chunks, NULL);
 
@@ -352,7 +352,7 @@ bse_wave_chunk_create (BseWaveDsc   *wave_dsc,
   BseWaveChunkDsc *chunk = wave_dsc->chunks + nth_chunk;
 
   if (error_p)
-    *error_p = BSE_ERROR_IO;
+    *error_p = Bse::ERROR_IO;
 
   /* FIXME: we essentially create a dcache for each wchunk here ;( */
 
@@ -381,7 +381,7 @@ bse_wave_chunk_create (BseWaveDsc   *wave_dsc,
   gsl_data_cache_unref (dcache);
 
   if (error_p && wchunk)
-    *error_p = BSE_ERROR_NONE;
+    *error_p = Bse::ERROR_NONE;
 
   return wchunk;
 }
diff --git a/bse/bseloader.hh b/bse/bseloader.hh
index 15790ae..b0ce1d2 100644
--- a/bse/bseloader.hh
+++ b/bse/bseloader.hh
@@ -47,21 +47,21 @@ struct _BseWaveChunkDsc
 
 /* --- functions --- */
 BseWaveFileInfo*      bse_wave_file_info_load  (const gchar     *file_name,
-                                                BseErrorType    *error);
+                                                Bse::ErrorType  *error);
 BseWaveFileInfo*      bse_wave_file_info_ref   (BseWaveFileInfo *wave_file_info);
 void                  bse_wave_file_info_unref (BseWaveFileInfo *wave_file_info);
 const gchar*         bse_wave_file_info_loader (BseWaveFileInfo *fi);
 BseWaveDsc*          bse_wave_dsc_load         (BseWaveFileInfo *wave_file_info,
                                                 guint            nth_wave,
                                                  gboolean         accept_empty,
-                                                BseErrorType    *error);
+                                                Bse::ErrorType  *error);
 void                 bse_wave_dsc_free         (BseWaveDsc      *wave_dsc);
 GslDataHandle*       bse_wave_handle_create    (BseWaveDsc      *wave_dsc,
                                                 guint            nth_chunk,
-                                                BseErrorType    *error);
+                                                Bse::ErrorType  *error);
 GslWaveChunk*        bse_wave_chunk_create     (BseWaveDsc      *wave_dsc,
                                                 guint            nth_chunk,
-                                                BseErrorType    *error);
+                                                Bse::ErrorType  *error);
 
 
 /* --- loader impl --- */
@@ -88,19 +88,19 @@ struct BseLoader {
   gpointer               data;
   BseWaveFileInfo*     (*load_file_info)       (gpointer          data,
                                                 const gchar      *file_name,
-                                                BseErrorType     *error);
+                                                Bse::ErrorType   *error);
   void                 (*free_file_info)       (gpointer          data,
                                                 BseWaveFileInfo  *file_info);
   BseWaveDsc*          (*load_wave_dsc)        (gpointer          data,
                                                 BseWaveFileInfo  *file_info,
                                                 guint             nth_wave,
-                                                BseErrorType     *error);
+                                                Bse::ErrorType   *error);
   void                 (*free_wave_dsc)        (gpointer          data,
                                                 BseWaveDsc       *wave_dsc);
   GslDataHandle*       (*create_chunk_handle)  (gpointer          data,
                                                 BseWaveDsc       *wave_dsc,
                                                 guint             nth_chunk,
-                                                BseErrorType     *error);
+                                                Bse::ErrorType   *error);
   BseLoader   *next;   /* must be NULL */
 };
 
diff --git a/bse/bsemain.cc b/bse/bsemain.cc
index 3bc47ec..ef2318d 100644
--- a/bse/bsemain.cc
+++ b/bse/bsemain.cc
@@ -267,7 +267,7 @@ bse_init_intern (int *argc, char **argv, const char *app_name, const Bse::String
     }
   if (bse_main_args->load_core_scripts)
     {
-      BseErrorType error = bse_item_exec (bse_server_get(), "register-scripts", NULL);
+      Bse::ErrorType error = bse_item_exec (bse_server_get(), "register-scripts", NULL);
       if (error)
         sfi_diag ("during script registration: %s", bse_error_blurb (error));
       while (!single_thread_registration_done)
diff --git a/bse/bsemididevice-null.cc b/bse/bsemididevice-null.cc
index cebd5d1..5a900c3 100644
--- a/bse/bsemididevice-null.cc
+++ b/bse/bsemididevice-null.cc
@@ -23,7 +23,7 @@ bse_midi_device_null_list_devices (BseDevice *device)
   return ring;
 }
 
-static BseErrorType
+static Bse::ErrorType
 bse_midi_device_null_open (BseDevice     *device,
                            gboolean       require_readable,
                            gboolean       require_writable,
@@ -37,8 +37,8 @@ bse_midi_device_null_open (BseDevice     *device,
   handle->writable = require_writable;
   bse_device_set_opened (device, "null", handle->readable, handle->writable);
   BSE_MIDI_DEVICE (device)->handle = handle;
-  MDEBUG ("opening MIDI readable=%d writable=%d: %s", require_readable, require_writable, bse_error_blurb 
(BSE_ERROR_NONE));
-  return BSE_ERROR_NONE;
+  MDEBUG ("opening MIDI readable=%d writable=%d: %s", require_readable, require_writable, bse_error_blurb 
(Bse::ERROR_NONE));
+  return Bse::ERROR_NONE;
 }
 static void
 bse_midi_device_null_close (BseDevice *device)
diff --git a/bse/bsemididevice-oss.cc b/bse/bsemididevice-oss.cc
index c026a75..e84bfa6 100644
--- a/bse/bsemididevice-oss.cc
+++ b/bse/bsemididevice-oss.cc
@@ -44,11 +44,11 @@ bse_midi_device_oss_init (BseMidiDeviceOSS *oss)
 {
   oss->device_name = g_strdup (BSE_MIDI_DEVICE_CONF_OSS);
 }
-static BseErrorType
+static Bse::ErrorType
 check_device_usage (const char *name,
                     const char *check_mode)
 {
-  BseErrorType error = gsl_file_check (name, check_mode);
+  Bse::ErrorType error = gsl_file_check (name, check_mode);
   if (!error)
     {
       errno = 0;
@@ -58,7 +58,7 @@ check_device_usage (const char *name,
        * might be wrong and the device may be busy.
        */
       if (errno == ENODEV)
-        error = BSE_ERROR_DEVICE_NOT_AVAILABLE;
+        error = Bse::ERROR_DEVICE_NOT_AVAILABLE;
       if (fd >= 0)
         close (fd);
     }
@@ -77,17 +77,17 @@ bse_midi_device_oss_list_devices (BseDevice *device)
       char *dname = g_strconcat (BSE_MIDI_DEVICE_OSS (device)->device_name, postfixes[i], NULL);
       if (!birnet_file_equals (last, dname))
         {
-          if (check_device_usage (dname, "crw") == BSE_ERROR_NONE)
+          if (check_device_usage (dname, "crw") == Bse::ERROR_NONE)
             ring = sfi_ring_append (ring,
                                     bse_device_entry_new (device,
                                                           g_strdup_format ("%s,rw", dname),
                                                           g_strdup_format ("%s (read-write)", dname)));
-          else if (check_device_usage (dname, "cr") == BSE_ERROR_NONE)
+          else if (check_device_usage (dname, "cr") == Bse::ERROR_NONE)
             ring = sfi_ring_append (ring,
                                     bse_device_entry_new (device,
                                                           g_strdup_format ("%s,ro", dname),
                                                           g_strdup_format ("%s (read only)", dname)));
-          else if (check_device_usage (dname, "cw") == BSE_ERROR_NONE)
+          else if (check_device_usage (dname, "cw") == Bse::ERROR_NONE)
             ring = sfi_ring_append (ring,
                                     bse_device_entry_new (device,
                                                           g_strdup_format ("%s,wo", dname),
@@ -102,7 +102,7 @@ bse_midi_device_oss_list_devices (BseDevice *device)
   return ring;
 }
 
-static BseErrorType
+static Bse::ErrorType
 bse_midi_device_oss_open (BseDevice     *device,
                           gboolean       require_readable,
                           gboolean       require_writable,
@@ -129,7 +129,7 @@ bse_midi_device_oss_open (BseDevice     *device,
   oss->fd = -1;
 
   /* try open */
-  BseErrorType error;
+  Bse::ErrorType error;
   int fd = -1;
   handle->readable = (omode & O_RDWR) == O_RDWR || (omode & O_RDONLY) == O_RDONLY;
   handle->writable = (omode & O_RDWR) == O_RDWR || (omode & O_WRONLY) == O_WRONLY;
@@ -148,10 +148,10 @@ bse_midi_device_oss_open (BseDevice     *device,
     {
       oss->fd = fd;
       /* try setup */
-      error = BSE_ERROR_NONE;
+      error = Bse::ERROR_NONE;
     }
   else
-    error = bse_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+    error = bse_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
 
   /* setup MIDI handle or shutdown */
   if (!error)
diff --git a/bse/bsemidifile.cc b/bse/bsemidifile.cc
index 04ea232..53a860e 100644
--- a/bse/bsemidifile.cc
+++ b/bse/bsemidifile.cc
@@ -42,7 +42,7 @@ dummy_read (int  fd,
   return total;
 }
 
-static BseErrorType
+static Bse::ErrorType
 smf_read_header (int        fd,
                  SMFHeader *header)
 {
@@ -52,7 +52,7 @@ smf_read_header (int        fd,
   if (read (fd, header, n_bytes) != n_bytes)
     {
       MDEBUG ("failed to read midi file header: %s", g_strerror (errno));
-      return gsl_error_from_errno (errno, BSE_ERROR_IO);
+      return gsl_error_from_errno (errno, Bse::ERROR_IO);
     }
   /* endianess corrections */
   header->chunk.type = GUINT32_FROM_BE (header->chunk.type);
@@ -64,43 +64,43 @@ smf_read_header (int        fd,
   if (header->chunk.type != ('M' << 24 | 'T' << 16 | 'h' << 8 | 'd'))
     {
       MDEBUG ("unmatched token 'MThd'");
-      return BSE_ERROR_FORMAT_INVALID;
+      return Bse::ERROR_FORMAT_INVALID;
     }
   if (header->chunk.length < 6)
     {
       MDEBUG ("truncated midi file header");
-      return BSE_ERROR_FORMAT_INVALID;
+      return Bse::ERROR_FORMAT_INVALID;
     }
   if (header->format > 2)
     {
       MDEBUG ("unknown midi file format");
-      return BSE_ERROR_FORMAT_UNKNOWN;
+      return Bse::ERROR_FORMAT_UNKNOWN;
     }
   if (header->format == 0 && header->n_tracks != 1)
     {
       MDEBUG ("invalid number of tracks: %d", header->n_tracks);
-      return BSE_ERROR_FORMAT_INVALID;
+      return Bse::ERROR_FORMAT_INVALID;
     }
   if (header->n_tracks < 1)
     {
       MDEBUG ("midi file without tracks");
-      return BSE_ERROR_NO_DATA;
+      return Bse::ERROR_NO_DATA;
     }
   if (header->division & 0x8000)        // FIXME: this allowes only tpqn
     {
       MDEBUG ("SMPTE time encoding not supported");
-      return BSE_ERROR_FORMAT_UNKNOWN;
+      return Bse::ERROR_FORMAT_UNKNOWN;
     }
   /* read up remaining unused header bytes */
   if (dummy_read (fd, header->chunk.length - 6) != header->chunk.length - 6)
     {
       MDEBUG ("failed to read midi file header: %s", g_strerror (errno));
-      return gsl_error_from_errno (errno, BSE_ERROR_IO);
+      return gsl_error_from_errno (errno, Bse::ERROR_IO);
     }
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
-static BseErrorType
+static Bse::ErrorType
 smf_read_track (BseMidiFile    *smf,
                 int             fd,
                 BseMidiDecoder *md)
@@ -112,7 +112,7 @@ smf_read_track (BseMidiFile    *smf,
   if (read (fd, &chunk, n_bytes) != n_bytes)
     {
       MDEBUG ("failed to read midi track header: %s", g_strerror (errno));
-      return gsl_error_from_errno (errno, BSE_ERROR_IO);
+      return gsl_error_from_errno (errno, Bse::ERROR_IO);
     }
   /* endianess corrections */
   chunk.type = GUINT32_FROM_BE (chunk.type);
@@ -121,7 +121,7 @@ smf_read_track (BseMidiFile    *smf,
   if (chunk.type != ('M' << 24 | 'T' << 16 | 'r' << 8 | 'k'))
     {
       MDEBUG ("unmatched token 'MTrk'");
-      return BSE_ERROR_FORMAT_INVALID;
+      return Bse::ERROR_FORMAT_INVALID;
     }
   /* read up and decode track data */
   n_bytes = chunk.length;
@@ -132,27 +132,27 @@ smf_read_track (BseMidiFile    *smf,
       if (read (fd, buffer, l) < 0)
         {
           MDEBUG ("failed to read (got %d bytes) midi track: %s", l, g_strerror (errno));
-          return gsl_error_from_errno (errno, BSE_ERROR_IO);
+          return gsl_error_from_errno (errno, Bse::ERROR_IO);
         }
       bse_midi_decoder_push_smf_data (md, l, buffer);
       n_bytes -= l;
     }
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 BseMidiFile*
 bse_midi_file_load (const char   *file_name,
-                    BseErrorType *error_p)
+                    Bse::ErrorType *error_p)
 {
   BseMidiFile *smf;
   SMFHeader header;
-  BseErrorType dummy_error;
+  Bse::ErrorType dummy_error;
   int i, fd = open (file_name, O_RDONLY);
   if (!error_p)
     error_p = &dummy_error;
   if (fd < 0)
     {
-      *error_p = gsl_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+      *error_p = gsl_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
       return NULL;
     }
 
@@ -209,7 +209,7 @@ bse_midi_file_load (const char   *file_name,
           smf->denominator = event->data.time_signature.denominator;
         }
     }
-  *error_p = BSE_ERROR_NONE;
+  *error_p = Bse::ERROR_NONE;
   return smf;
 }
 
@@ -335,7 +335,7 @@ bse_midi_file_setup_song (BseMidiFile    *smf,
         {
           BseTrack *track;
           BsePart *part;
-          BseErrorType error;
+          Bse::ErrorType error;
           bse_item_exec (song, "create-track", &track);
           bse_item_exec (track, "ensure-output", &error);
           bse_assert_ok (error);
diff --git a/bse/bsemidifile.hh b/bse/bsemidifile.hh
index a5015b9..7aa3763 100644
--- a/bse/bsemidifile.hh
+++ b/bse/bsemidifile.hh
@@ -23,7 +23,7 @@ typedef struct {
 } BseMidiFile;
 
 BseMidiFile* bse_midi_file_load            (const gchar  *file_name,
-                                            BseErrorType *error_p);
+                                            Bse::ErrorType *error_p);
 void         bse_midi_file_free            (BseMidiFile  *smf);
 void         bse_midi_file_add_part_events (BseMidiFile  *smf,
                                             guint         nth_track,
diff --git a/bse/bsemidinotifier.proc b/bse/bsemidinotifier.proc
index 64a7670..a5f183e 100644
--- a/bse/bsemidinotifier.proc
+++ b/bse/bsemidinotifier.proc
@@ -26,7 +26,7 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_MIDI_NOTIFIER (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   gettimeofday (&tv, NULL);
   stamp = tv.tv_sec;
@@ -35,5 +35,5 @@ BODY (BseProcedureClass *proc,
   /* set output parameters */
   sfi_value_set_int (out_values++, stamp / 1000);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
diff --git a/bse/bseparasite.proc b/bse/bseparasite.proc
index 8a156cd..0fb5ecf 100644
--- a/bse/bseparasite.proc
+++ b/bse/bseparasite.proc
@@ -21,13 +21,13 @@ METHOD (BseItem, list-parasites) {
   SfiRing *ring;
   BseStringSeq *sseq;
   if (!BSE_IS_ITEM (item))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
   sseq = bse_string_seq_new ();
   ring = bse_item_list_parasites (item, path);
   while (ring)
     bse_string_seq_append (sseq, (const char*) sfi_ring_pop_head (&ring));
   bse_value_take_boxed (out_values++, sseq);
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, get-parasite) {
@@ -43,9 +43,9 @@ METHOD (BseItem, get-parasite) {
   BseItem *item = (BseItem*) g_value_get_object (in_values++);
   const gchar *path = g_value_get_string (in_values++);
   if (!BSE_IS_ITEM (item))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
   sfi_value_set_rec (out_values++, bse_item_get_parasite (item, path));
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, set-parasite) {
@@ -62,9 +62,9 @@ METHOD (BseItem, set-parasite) {
   const gchar *path = g_value_get_string (in_values++);
   SfiRec      *rec  = sfi_value_get_rec (in_values++);
   if (!BSE_IS_ITEM (item))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
   bse_item_set_parasite (item, path, rec);
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseItem, add-parasite) {
@@ -81,10 +81,10 @@ METHOD (BseItem, add-parasite) {
   const gchar *path = g_value_get_string (in_values++);
   SfiRec      *rec  = sfi_value_get_rec (in_values++);
   if (!BSE_IS_ITEM (item))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
   path = bse_item_create_parasite_name (item, path);
   if (path)
     bse_item_set_parasite (item, path, rec);
   g_print ("%s: %s: %p\n", G_STRFUNC, path, rec);
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
diff --git a/bse/bsepart.cc b/bse/bsepart.cc
index d69d4f0..4b559e4 100644
--- a/bse/bsepart.cc
+++ b/bse/bsepart.cc
@@ -774,7 +774,7 @@ bse_part_insert_note (BsePart *self,
 {
   BsePartEventNote key = { 0 };
   const bool use_any_channel = channel == ~uint (0);
-  g_return_val_if_fail (BSE_IS_PART (self), BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_IS_PART (self), Bse::ERROR_INTERNAL);
   if (use_any_channel)
     channel = 0;
   else if (channel >= self->n_channels)
@@ -838,7 +838,7 @@ bse_part_insert_control (BsePart          *self,
   BsePartTickNode *node;
   BsePartEventControl *cev;
   guint id;
-  g_return_val_if_fail (BSE_IS_PART (self), BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_IS_PART (self), Bse::ERROR_INTERNAL);
 
   if (!(value >= -1 && value <= +1 &&
         tick < BSE_PART_MAX_TICK &&
diff --git a/bse/bsepart.proc b/bse/bsepart.proc
index 7cdcdc8..6dc1287 100644
--- a/bse/bsepart.proc
+++ b/bse/bsepart.proc
@@ -43,7 +43,7 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   ustack = bse_item_undo_open (self, "insert-note-auto");
@@ -55,7 +55,7 @@ BODY (BseProcedureClass *proc,
   /* set output parameters */
   sfi_value_set_int (out_values++, id);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, insert-note) {
@@ -94,7 +94,7 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   ustack = bse_item_undo_open (self, "insert-note");
@@ -106,7 +106,7 @@ BODY (BseProcedureClass *proc,
   /* set output parameters */
   sfi_value_set_int (out_values++, id);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, insert-control) {
@@ -138,7 +138,7 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   ustack = bse_item_undo_open (self, "insert-event");
@@ -150,7 +150,7 @@ BODY (BseProcedureClass *proc,
   /* set output parameters */
   sfi_value_set_int (out_values++, id);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, change-note) {
@@ -170,7 +170,7 @@ METHOD (BsePart, change-note) {
                          1.0, 0, 1.0, 0.01,
                          SFI_PARAM_STANDARD ":scale");
   OUT   = bse_param_spec_genum ("error", "Error", NULL,
-                               BSE_TYPE_ERROR_TYPE, BSE_ERROR_NONE,
+                               BSE_TYPE_ERROR_TYPE, Bse::ERROR_NONE,
                                SFI_PARAM_STANDARD);
 }
 BODY (BseProcedureClass *proc,
@@ -190,7 +190,7 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   if (bse_part_query_event (self, id, &equery) == BSE_PART_EVENT_NOTE)
@@ -211,9 +211,9 @@ BODY (BseProcedureClass *proc,
     }
 
   /* set output parameters */
-  g_value_set_enum (out_values++, success ? BSE_ERROR_NONE : BSE_ERROR_NO_EVENT);
+  g_value_set_enum (out_values++, success ? Bse::ERROR_NONE : Bse::ERROR_NO_EVENT);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, change-control) {
@@ -231,7 +231,7 @@ METHOD (BsePart, change-control) {
                          0.0, -1.0, +1.0, 0.1,
                          SFI_PARAM_STANDARD ":scale");
   OUT   = bse_param_spec_genum ("error", "Error", NULL,
-                               BSE_TYPE_ERROR_TYPE, BSE_ERROR_NONE,
+                               BSE_TYPE_ERROR_TYPE, Bse::ERROR_NONE,
                                SFI_PARAM_STANDARD);
 }
 BODY (BseProcedureClass *proc,
@@ -249,7 +249,7 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   bse_part_query_event (self, id, &equery);
@@ -288,9 +288,9 @@ BODY (BseProcedureClass *proc,
     }
 
   /* set output parameters */
-  g_value_set_enum (out_values++, success ? BSE_ERROR_NONE : BSE_ERROR_NO_EVENT);
+  g_value_set_enum (out_values++, success ? Bse::ERROR_NONE : Bse::ERROR_NO_EVENT);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, delete-event) {
@@ -300,7 +300,7 @@ METHOD (BsePart, delete-event) {
   IN   = sfi_pspec_int ("id", "ID", NULL,
                         0, 0, BSE_PART_MAX_TICK, 1, SFI_PARAM_STANDARD);
   OUT   = bse_param_spec_genum ("error", "Error", NULL,
-                               BSE_TYPE_ERROR_TYPE, BSE_ERROR_NONE,
+                               BSE_TYPE_ERROR_TYPE, Bse::ERROR_NONE,
                                SFI_PARAM_STANDARD);
 }
 BODY (BseProcedureClass *proc,
@@ -315,7 +315,7 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   bse_part_query_event (self, id, &equery);
@@ -338,9 +338,9 @@ BODY (BseProcedureClass *proc,
     }
 
   /* set output parameters */
-  g_value_set_enum (out_values++, deleted ? BSE_ERROR_NONE : BSE_ERROR_NO_EVENT);
+  g_value_set_enum (out_values++, deleted ? Bse::ERROR_NONE : Bse::ERROR_NO_EVENT);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, is-event-selected) {
@@ -364,7 +364,7 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   if (bse_part_query_event (self, id, &equery) != BSE_PART_EVENT_NONE)
@@ -373,7 +373,7 @@ BODY (BseProcedureClass *proc,
   /* set output parameters */
   sfi_value_set_bool (out_values++, selected);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, list-notes-crossing) {
@@ -398,12 +398,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   bse_value_take_boxed (out_values++, bse_part_list_notes (self, ~0, tick, duration, BSE_MIN_NOTE, 
BSE_MAX_NOTE, TRUE));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, list-notes-within) {
@@ -431,12 +431,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   bse_value_take_boxed (out_values++, bse_part_list_notes (self, channel, tick, duration, BSE_MIN_NOTE, 
BSE_MAX_NOTE, FALSE));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, list-controls) {
@@ -465,12 +465,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   bse_value_take_boxed (out_values++, bse_part_list_controls (self, ~0, tick, duration, BseMidiSignalType 
(ctype)));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, queue-notes) {
@@ -499,12 +499,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   bse_part_queue_notes_within (self, tick, duration, min_note, max_note);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, queue-controls) {
@@ -527,12 +527,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   bse_part_queue_controls (self, tick, duration);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, list-selected-notes) {
@@ -551,12 +551,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   bse_value_take_boxed (out_values++, bse_part_list_selected_notes (self));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, list-selected-controls) {
@@ -579,12 +579,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   bse_value_take_boxed (out_values++, bse_part_list_selected_controls (self, BseMidiSignalType (ctype)));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, check-overlap) {
@@ -611,12 +611,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   bse_value_take_boxed (out_values++, bse_part_list_notes (self, ~0, tick, duration, note, note, TRUE));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, get-notes) {
@@ -641,12 +641,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   bse_value_take_boxed (out_values++, bse_part_list_notes (self, ~0, tick, 1, note, note, TRUE));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, get-controls) {
@@ -672,12 +672,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   bse_value_take_boxed (out_values++, bse_part_list_controls (self, ~0, tick, 1, BseMidiSignalType (ctype)));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, get-channel-controls) {
@@ -709,12 +709,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   bse_value_take_boxed (out_values++, bse_part_list_controls (self, channel, tick, duration, 
BseMidiSignalType (ctype)));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, get-min-note) {
@@ -733,12 +733,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* it doesn't currently make sense to restrict the standard note range */
   sfi_value_set_int (out_values++, BSE_MIN_NOTE);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, get-max-note) {
@@ -757,12 +757,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* it doesn't currently make sense to restrict the standard note range */
   sfi_value_set_int (out_values++, BSE_MAX_NOTE);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, select-notes-exclusive) {
@@ -791,11 +791,11 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   bse_part_select_notes_exclusive (self, ~0, tick, duration, min_note, max_note);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, select-controls-exclusive) {
@@ -822,11 +822,11 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   bse_part_select_controls_exclusive (self, tick, duration, BseMidiSignalType (ctype));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, select-controls) {
@@ -853,11 +853,11 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   bse_part_select_controls (self, tick, duration, BseMidiSignalType (ctype), TRUE);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, select-notes) {
@@ -886,11 +886,11 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   bse_part_select_notes (self, ~0, tick, duration, min_note, max_note, TRUE);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, deselect-notes) {
@@ -919,11 +919,11 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   bse_part_select_notes (self, ~0, tick, duration, min_note, max_note, FALSE);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, deselect-controls) {
@@ -950,11 +950,11 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   bse_part_select_controls (self, tick, duration, BseMidiSignalType (ctype), FALSE);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, select-event) {
@@ -975,7 +975,7 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   bse_part_query_event (self, id, &equery);
@@ -984,8 +984,8 @@ BODY (BseProcedureClass *proc,
   else if (equery.event_type == BSE_PART_EVENT_NOTE)
     bse_part_set_note_selected (self, id, equery.channel, TRUE);
   else
-    return BSE_ERROR_PROC_PARAM_INVAL;
-  return BSE_ERROR_NONE;
+    return Bse::ERROR_PROC_PARAM_INVAL;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, deselect-event) {
@@ -1006,7 +1006,7 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   bse_part_query_event (self, id, &equery);
@@ -1015,8 +1015,8 @@ BODY (BseProcedureClass *proc,
   else if (equery.event_type == BSE_PART_EVENT_NOTE)
     bse_part_set_note_selected (self, id, equery.channel, FALSE);
   else
-    return BSE_ERROR_PROC_PARAM_INVAL;
-  return BSE_ERROR_NONE;
+    return Bse::ERROR_PROC_PARAM_INVAL;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, get-timing) {
@@ -1036,7 +1036,7 @@ METHOD (BsePart, get-timing) {
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   parent = BSE_ITEM (self)->parent;
@@ -1048,7 +1048,7 @@ METHOD (BsePart, get-timing) {
   /* set output parameters */
   bse_value_set_boxed (out_values++, &timing);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BsePart, list-links) {
@@ -1066,10 +1066,10 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_PART (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   bse_value_take_boxed (out_values++, bse_part_list_links (self));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
diff --git a/bse/bsepcmdevice-null.cc b/bse/bsepcmdevice-null.cc
index 3364326..6bc2b3e 100644
--- a/bse/bsepcmdevice-null.cc
+++ b/bse/bsepcmdevice-null.cc
@@ -36,7 +36,7 @@ bse_pcm_device_null_list_devices (BseDevice *device)
   return ring;
 }
 
-static BseErrorType
+static Bse::ErrorType
 bse_pcm_device_null_open (BseDevice     *device,
                           gboolean       require_readable,
                           gboolean       require_writable,
@@ -62,8 +62,8 @@ bse_pcm_device_null_open (BseDevice     *device,
   else
     null->sleep_us = 10 * 1000;
   BSE_PCM_DEVICE (device)->handle = handle;
-  PDEBUG ("NULL: opening PCM readable=%d writable=%d: %s", require_readable, require_writable, 
bse_error_blurb (BSE_ERROR_NONE));
-  return BSE_ERROR_NONE;
+  PDEBUG ("NULL: opening PCM readable=%d writable=%d: %s", require_readable, require_writable, 
bse_error_blurb (Bse::ERROR_NONE));
+  return Bse::ERROR_NONE;
 }
 
 static void
diff --git a/bse/bsepcmdevice-oss.cc b/bse/bsepcmdevice-oss.cc
index 154e0d6..02988b0 100644
--- a/bse/bsepcmdevice-oss.cc
+++ b/bse/bsepcmdevice-oss.cc
@@ -51,7 +51,7 @@ typedef struct
 
 
 /* --- prototypes --- */
-static BseErrorType oss_device_setup                   (OSSHandle              *oss,
+static Bse::ErrorType oss_device_setup                 (OSSHandle              *oss,
                                                          guint                   req_queue_length);
 static void        oss_device_retrigger                (OSSHandle              *oss);
 static gsize       oss_device_read                     (BsePcmHandle           *handle,
@@ -74,11 +74,11 @@ bse_pcm_device_oss_init (BsePcmDeviceOSS *oss)
   oss->device_name = g_strdup (BSE_PCM_DEVICE_CONF_OSS);
 }
 
-static BseErrorType
+static Bse::ErrorType
 check_device_usage (const gchar *name,
                     const gchar *check_mode)
 {
-  BseErrorType error = gsl_file_check (name, check_mode);
+  Bse::ErrorType error = gsl_file_check (name, check_mode);
   if (!error && strchr (check_mode, 'w'))
     {
       errno = 0;
@@ -88,7 +88,7 @@ check_device_usage (const gchar *name,
        * might be wrong and the device may be busy.
        */
       if (errno == ENODEV)
-        error = BSE_ERROR_DEVICE_NOT_AVAILABLE;
+        error = Bse::ERROR_DEVICE_NOT_AVAILABLE;
       if (fd >= 0)
         close (fd);
     }
@@ -107,12 +107,12 @@ bse_pcm_device_oss_list_devices (BseDevice    *device)
       gchar *dname = g_strconcat (BSE_PCM_DEVICE_OSS (device)->device_name, postfixes[i], NULL);
       if (!birnet_file_equals (last, dname))
         {
-          if (check_device_usage (dname, "crw") == BSE_ERROR_NONE)
+          if (check_device_usage (dname, "crw") == Bse::ERROR_NONE)
             ring = sfi_ring_append (ring,
                                     bse_device_entry_new (device,
                                                           g_strdup_format ("%s,rw", dname),
                                                           g_strdup_format ("%s (read-write)", dname)));
-          else if (check_device_usage (dname, "cw") == BSE_ERROR_NONE)
+          else if (check_device_usage (dname, "cw") == Bse::ERROR_NONE)
             ring = sfi_ring_append (ring,
                                     bse_device_entry_new (device,
                                                           g_strdup_format ("%s,wo", dname),
@@ -127,7 +127,7 @@ bse_pcm_device_oss_list_devices (BseDevice    *device)
   return ring;
 }
 
-static BseErrorType
+static Bse::ErrorType
 bse_pcm_device_oss_open (BseDevice     *device,
                          gboolean       require_readable,
                          gboolean       require_writable,
@@ -168,7 +168,7 @@ bse_pcm_device_oss_open (BseDevice     *device,
   oss->hard_sync = hard_sync;
 
   /* try open */
-  BseErrorType error;
+  Bse::ErrorType error;
   gint fd = -1;
   handle->readable = omode == O_RDWR || omode == O_RDONLY;      /* O_RDONLY maybe defined to 0 */
   handle->writable = omode == O_RDWR || omode == O_WRONLY;
@@ -185,7 +185,7 @@ bse_pcm_device_oss_open (BseDevice     *device,
       error = oss_device_setup (oss, latency);
     }
   else
-    error = bse_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+    error = bse_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
 
   /* setup PCM handle or shutdown */
   if (!error)
@@ -230,7 +230,7 @@ bse_pcm_device_oss_finalize (GObject *object)
   /* chain parent class' handler */
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }
-static BseErrorType
+static Bse::ErrorType
 oss_device_setup (OSSHandle *oss,
                   guint      req_queue_length)
 {
@@ -246,32 +246,32 @@ oss_device_setup (OSSHandle *oss,
   d_long = fcntl (fd, F_GETFL);
   d_long &= ~O_NONBLOCK;
   if (fcntl (fd, F_SETFL, d_long))
-    return BSE_ERROR_DEVICE_ASYNC;
+    return Bse::ERROR_DEVICE_ASYNC;
 
   d_int = 0;
   if (ioctl (fd, SNDCTL_DSP_GETFMTS, &d_int) < 0)
-    return BSE_ERROR_DEVICE_FORMAT;
+    return Bse::ERROR_DEVICE_FORMAT;
   if ((d_int & AFMT_S16_HE) != AFMT_S16_HE)
-    return BSE_ERROR_DEVICE_FORMAT;
+    return Bse::ERROR_DEVICE_FORMAT;
   d_int = AFMT_S16_HE;
   if (ioctl (fd, SNDCTL_DSP_SETFMT, &d_int) < 0 ||
       d_int != AFMT_S16_HE)
-    return BSE_ERROR_DEVICE_FORMAT;
+    return Bse::ERROR_DEVICE_FORMAT;
   guint bytes_per_value = 2;
 
   d_int = handle->n_channels - 1;
   if (ioctl (fd, SNDCTL_DSP_STEREO, &d_int) < 0)
-    return BSE_ERROR_DEVICE_CHANNELS;
+    return Bse::ERROR_DEVICE_CHANNELS;
   if (int (handle->n_channels) != d_int + 1)
-    return BSE_ERROR_DEVICE_CHANNELS;
+    return Bse::ERROR_DEVICE_CHANNELS;
   oss->frame_size = handle->n_channels * bytes_per_value;
 
   d_int = handle->mix_freq;
   if (ioctl (fd, SNDCTL_DSP_SPEED, &d_int) < 0)
-    return BSE_ERROR_DEVICE_FREQUENCY;
+    return Bse::ERROR_DEVICE_FREQUENCY;
   handle->mix_freq = d_int;
   if (MAX (d_int, handle->mix_freq) - MIN (d_int, handle->mix_freq) > handle->mix_freq / 100)
-    return BSE_ERROR_DEVICE_FREQUENCY;
+    return Bse::ERROR_DEVICE_FREQUENCY;
 
   /* Note: fragment = n_fragments << 16;
    *       fragment |= g_bit_storage (fragment_size - 1);
@@ -287,24 +287,24 @@ oss_device_setup (OSSHandle *oss,
     }
   d_int = (oss->n_frags << 16) | g_bit_storage (oss->frag_size - 1);
   if (ioctl (fd, SNDCTL_DSP_SETFRAGMENT, &d_int) < 0)
-    return BSE_ERROR_DEVICE_LATENCY;
+    return Bse::ERROR_DEVICE_LATENCY;
 
   d_int = 0;
   if (ioctl (fd, SNDCTL_DSP_GETBLKSIZE, &d_int) < 0 ||
       d_int < 128 || d_int > 131072 || (d_int & 1))
-    return BSE_ERROR_DEVICE_BUFFER;
+    return Bse::ERROR_DEVICE_BUFFER;
 
   audio_buf_info info = { 0, };
   if (handle->writable && ioctl (fd, SNDCTL_DSP_GETOSPACE, &info) < 0)
-    return BSE_ERROR_DEVICE_BUFFER;
+    return Bse::ERROR_DEVICE_BUFFER;
   else if (!handle->writable && ioctl (fd, SNDCTL_DSP_GETISPACE, &info) < 0)
-    return BSE_ERROR_DEVICE_BUFFER;
+    return Bse::ERROR_DEVICE_BUFFER;
   oss->n_frags = info.fragstotal;
   oss->frag_size = info.fragsize;
   oss->queue_length = info.bytes / oss->frame_size;
   if (oss->queue_length != oss->frag_size * oss->n_frags / oss->frame_size)
     {
-      /* return BSE_ERROR_DEVICE_BUFFER; */
+      /* return Bse::ERROR_DEVICE_BUFFER; */
       sfi_diag ("OSS: buffer size (%d) differs from fragment space (%d)", info.bytes, info.fragstotal * 
info.fragsize);
       oss->queue_length = oss->n_frags * oss->frag_size / oss->frame_size;
     }
@@ -333,7 +333,7 @@ oss_device_setup (OSSHandle *oss,
           oss->n_frags,
           oss->frag_size / oss->frame_size,
           info.bytes / oss->frame_size);
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 static void
 oss_device_retrigger (OSSHandle *oss)
diff --git a/bse/bsepcmwriter.cc b/bse/bsepcmwriter.cc
index 684b54d..020585c 100644
--- a/bse/bsepcmwriter.cc
+++ b/bse/bsepcmwriter.cc
@@ -61,7 +61,7 @@ bse_pcm_writer_finalize (GObject *object)
   self->mutex.~Mutex();
 }
 
-BseErrorType
+Bse::ErrorType
 bse_pcm_writer_open (BsePcmWriter *self,
                     const gchar  *file,
                     guint         n_channels,
@@ -69,11 +69,11 @@ bse_pcm_writer_open (BsePcmWriter *self,
                      uint64        recorded_maximum)
 {
   gint fd;
-  g_return_val_if_fail (BSE_IS_PCM_WRITER (self), BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (!self->open, BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (file != NULL, BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (n_channels > 0, BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (sample_freq >= 1000, BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_IS_PCM_WRITER (self), Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (!self->open, Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (file != NULL, Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (n_channels > 0, Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (sample_freq >= 1000, Bse::ERROR_INTERNAL);
   self->mutex.lock();
   self->n_bytes = 0;
   self->recorded_maximum = recorded_maximum;
@@ -81,7 +81,7 @@ bse_pcm_writer_open (BsePcmWriter *self,
   if (fd < 0)
     {
       self->mutex.unlock();
-      return bse_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+      return bse_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
     }
 
   errno = bse_wave_file_dump_header (fd, 0x7fff0000, 16, n_channels, sample_freq);
@@ -89,13 +89,13 @@ bse_pcm_writer_open (BsePcmWriter *self,
     {
       close (fd);
       self->mutex.unlock();
-      return bse_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+      return bse_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
     }
   self->fd = fd;
   self->open = TRUE;
   self->broken = FALSE;
   self->mutex.unlock();
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 void
 bse_pcm_writer_close (BsePcmWriter *self)
diff --git a/bse/bsepcmwriter.hh b/bse/bsepcmwriter.hh
index db3d411..8c22daa 100644
--- a/bse/bsepcmwriter.hh
+++ b/bse/bsepcmwriter.hh
@@ -27,7 +27,7 @@ struct BsePcmWriter : BseItem {
 struct BsePcmWriterClass : BseItemClass
 {};
 
-BseErrorType   bse_pcm_writer_open             (BsePcmWriter           *pdev,
+Bse::ErrorType bse_pcm_writer_open             (BsePcmWriter           *pdev,
                                                 const gchar            *file,
                                                 guint                   n_channels,
                                                 guint                   sample_freq,
diff --git a/bse/bseplugin.cc b/bse/bseplugin.cc
index dedc4e5..2d07440 100644
--- a/bse/bseplugin.cc
+++ b/bse/bseplugin.cc
@@ -587,7 +587,7 @@ bse_plugin_check_load (const gchar *const_file_name)
       gint fd = open (const_file_name, O_RDONLY, 0);
       if (fd < 0)
         return (errno == ENOENT || errno == ENOTDIR || errno == ELOOP ?
-                bse_error_blurb (BSE_ERROR_FILE_NOT_FOUND) :
+                bse_error_blurb (Bse::ERROR_FILE_NOT_FOUND) :
                 "Unable to access plugin");
 
       /* and search libtool's dlname specification */
diff --git a/bse/bseprocedure.cc b/bse/bseprocedure.cc
index a14d55f..accf238 100644
--- a/bse/bseprocedure.cc
+++ b/bse/bseprocedure.cc
@@ -156,10 +156,10 @@ bse_procedure_type_register (const gchar *name,
                              GType       *ret_type)
 {
   GType base_type = 0;
-  g_return_val_if_fail (ret_type != NULL, bse_error_blurb (BSE_ERROR_INTERNAL));
+  g_return_val_if_fail (ret_type != NULL, bse_error_blurb (Bse::ERROR_INTERNAL));
   *ret_type = 0;
-  g_return_val_if_fail (name != NULL, bse_error_blurb (BSE_ERROR_INTERNAL));
-  g_return_val_if_fail (plugin != NULL, bse_error_blurb (BSE_ERROR_INTERNAL));
+  g_return_val_if_fail (name != NULL, bse_error_blurb (Bse::ERROR_INTERNAL));
+  g_return_val_if_fail (plugin != NULL, bse_error_blurb (Bse::ERROR_INTERNAL));
   GType type = g_type_from_name (name);
   if (type)
     return "Procedure already registered";
@@ -195,17 +195,17 @@ bse_procedure_lookup (const gchar *proc_name)
 }
 
 static void
-signal_exec_status (BseErrorType       error,
+signal_exec_status (Bse::ErrorType       error,
                     BseProcedureClass *proc,
                     GValue            *first_ovalue)
 {
 #if 0
-  /* signal script status, supporting BseErrorType-outparam procedures
+  /* signal script status, supporting Bse::ErrorType-outparam procedures
    */
   if (!error && proc->n_out_pspecs == 1 &&
       g_type_is_a (G_VALUE_TYPE (first_ovalue), BSE_TYPE_ERROR_TYPE))
     {
-      BseErrorType verror = g_value_get_enum (first_ovalue);
+      Bse::ErrorType verror = g_value_get_enum (first_ovalue);
 
       bse_server_exec_status (bse_server_get (), BSE_EXEC_STATUS_DONE, BSE_PROCEDURE_NAME (proc), verror ? 0 
: 1, verror);
     }
@@ -214,7 +214,7 @@ signal_exec_status (BseErrorType       error,
 #endif
 }
 
-static BseErrorType
+static Bse::ErrorType
 bse_procedure_call (BseProcedureClass  *proc,
                     GValue             *ivalues,
                     GValue             *ovalues,
@@ -222,7 +222,7 @@ bse_procedure_call (BseProcedureClass  *proc,
                     gpointer            marshal_data)
 {
   guint i, bail_out = FALSE;
-  BseErrorType error;
+  Bse::ErrorType error;
 
   for (i = 0; i < proc->n_in_pspecs; i++)
     {
@@ -238,7 +238,7 @@ bse_procedure_call (BseProcedureClass  *proc,
     }
 
   if (bail_out)
-    error = BSE_ERROR_PROC_PARAM_INVAL;
+    error = Bse::ERROR_PROC_PARAM_INVAL;
   else
     {
       if (CHECK_DEBUG())
@@ -268,7 +268,7 @@ bse_procedure_call (BseProcedureClass  *proc,
   return error;
 }
 
-BseErrorType
+Bse::ErrorType
 bse_procedure_marshal (GType               proc_type,
                        const GValue       *ivalues,
                        GValue             *ovalues,
@@ -277,8 +277,8 @@ bse_procedure_marshal (GType               proc_type,
 {
   GValue tmp_ivalues[BSE_PROCEDURE_MAX_IN_PARAMS], tmp_ovalues[BSE_PROCEDURE_MAX_OUT_PARAMS];
   uint i, bail_out = FALSE;
-  BseErrorType error;
-  g_return_val_if_fail (BSE_TYPE_IS_PROCEDURE (proc_type), BSE_ERROR_INTERNAL);
+  Bse::ErrorType error;
+  g_return_val_if_fail (BSE_TYPE_IS_PROCEDURE (proc_type), Bse::ERROR_INTERNAL);
   BseProcedureClass *proc = (BseProcedureClass*) g_type_class_ref (proc_type);
   for (i = 0; i < proc->n_in_pspecs; i++)
     {
@@ -302,7 +302,7 @@ bse_procedure_marshal (GType               proc_type,
     }
 
   if (bail_out)
-    error = BSE_ERROR_PROC_PARAM_INVAL;
+    error = Bse::ERROR_PROC_PARAM_INVAL;
   else
     error = bse_procedure_call (proc, tmp_ivalues, tmp_ovalues, marshal, marshal_data);
   signal_exec_status (error, proc, tmp_ovalues);
@@ -326,7 +326,7 @@ bse_procedure_marshal (GType               proc_type,
   return error;
 }
 
-static inline BseErrorType
+static inline Bse::ErrorType
 bse_procedure_call_collect (BseProcedureClass  *proc,
                             const GValue       *first_value,
                             BseProcedureMarshal marshal,
@@ -338,7 +338,7 @@ bse_procedure_call_collect (BseProcedureClass  *proc,
                             va_list             var_args)
 {
   guint i, bail_out = FALSE;
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
   PDEBUG ("call %s: ", BSE_PROCEDURE_NAME (proc));
   /* collect first arg */
   if (first_value && first_value != ivalues) /* may skip this since bse_procedure_call() does extra 
validation */
@@ -398,7 +398,7 @@ bse_procedure_call_collect (BseProcedureClass  *proc,
 
       /* execute procedure */
       if (bail_out)
-        error = BSE_ERROR_PROC_PARAM_INVAL;
+        error = Bse::ERROR_PROC_PARAM_INVAL;
       else
         error = bse_procedure_call (proc, ivalues, ovalues, marshal, marshal_data);
       PDEBUG ("  call result: %s", bse_error_blurb (error));
@@ -440,14 +440,14 @@ bse_procedure_call_collect (BseProcedureClass  *proc,
  * @param marshal_data data passed in to @a marshal
  * @param skip_ovalues whether return value locations should be collected and filled in
  * @param var_args     va_list to collect input args from
- * @return             BseErrorType value of error if any occoured
+ * @return             Bse::ErrorType value of error if any occoured
  *
  * Collect input arguments for a procedure call from a va_list and
  * call the procedure, optionally via @a marshal. If @a skip_ovalues is
  * FALSE, the procedure return values will be stored in return
  * value locations also collected from @a var_args.
  */
-BseErrorType
+Bse::ErrorType
 bse_procedure_marshal_valist (GType               proc_type,
                               const GValue       *first_value,
                               BseProcedureMarshal marshal,
@@ -455,10 +455,10 @@ bse_procedure_marshal_valist (GType               proc_type,
                               gboolean            skip_ovalues,
                               va_list             var_args)
 {
-  g_return_val_if_fail (BSE_TYPE_IS_PROCEDURE (proc_type), BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_TYPE_IS_PROCEDURE (proc_type), Bse::ERROR_INTERNAL);
   GValue tmp_ivalues[BSE_PROCEDURE_MAX_IN_PARAMS], tmp_ovalues[BSE_PROCEDURE_MAX_OUT_PARAMS];
   BseProcedureClass *proc = (BseProcedureClass*) g_type_class_ref (proc_type);
-  BseErrorType error = bse_procedure_call_collect (proc, first_value, marshal, marshal_data,
+  Bse::ErrorType error = bse_procedure_call_collect (proc, first_value, marshal, marshal_data,
                                                    FALSE, skip_ovalues, tmp_ivalues, tmp_ovalues, var_args);
   procedure_class_unref (proc);
   return error;
@@ -469,7 +469,7 @@ bse_procedure_marshal_valist (GType               proc_type,
  * @param first_value  the first input argument if not to be collected
  * @param var_args     va_list to collect input args from
  * @param ivalues      uninitialized GValue array with at least proc->n_in_pspecs members
- * @return             BseErrorType value of error if any occoured during collection
+ * @return             Bse::ErrorType value of error if any occoured during collection
  *
  * Collect input arguments for a procedure call from a va_list. The first
  * value may be supplied as @a first_value and will then not be collected.
@@ -479,14 +479,14 @@ bse_procedure_marshal_valist (GType               proc_type,
  * argument is entirely ignored and collection simply starts out with the
  * second argument.
  */
-BseErrorType
+Bse::ErrorType
 bse_procedure_collect_input_args (BseProcedureClass  *proc,
                                   const GValue       *first_value,
                                   va_list             var_args,
                                   GValue              ivalues[BSE_PROCEDURE_MAX_IN_PARAMS])
 {
-  BseErrorType error;
-  g_return_val_if_fail (BSE_IS_PROCEDURE_CLASS (proc), BSE_ERROR_INTERNAL);
+  Bse::ErrorType error;
+  g_return_val_if_fail (BSE_IS_PROCEDURE_CLASS (proc), Bse::ERROR_INTERNAL);
 
   /* add an extra reference count to the class */
   proc = (BseProcedureClass*) g_type_class_ref (BSE_PROCEDURE_TYPE (proc));
@@ -497,23 +497,23 @@ bse_procedure_collect_input_args (BseProcedureClass  *proc,
   return error;
 }
 
-BseErrorType
+Bse::ErrorType
 bse_procedure_exec (const gchar *proc_name,
                     ...)
 {
   GType proc_type;
 
-  g_return_val_if_fail (proc_name != NULL, BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (proc_name != NULL, Bse::ERROR_INTERNAL);
 
   proc_type = bse_procedure_lookup (proc_name);
   if (!proc_type)
     {
       g_warning ("%s: no such procedure", proc_name);
-      return BSE_ERROR_PROC_NOT_FOUND;
+      return Bse::ERROR_PROC_NOT_FOUND;
     }
   else
     {
-      BseErrorType error;
+      Bse::ErrorType error;
       va_list var_args;
 
       va_start (var_args, proc_name);
@@ -523,23 +523,23 @@ bse_procedure_exec (const gchar *proc_name,
     }
 }
 
-BseErrorType
+Bse::ErrorType
 bse_procedure_exec_void (const gchar *proc_name,
                          ...)
 {
   GType proc_type;
 
-  g_return_val_if_fail (proc_name != NULL, BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (proc_name != NULL, Bse::ERROR_INTERNAL);
 
   proc_type = bse_procedure_lookup (proc_name);
   if (!proc_type)
     {
       g_warning ("%s: no such procedure", proc_name);
-      return BSE_ERROR_PROC_NOT_FOUND;
+      return Bse::ERROR_PROC_NOT_FOUND;
     }
   else
     {
-      BseErrorType error;
+      Bse::ErrorType error;
       va_list var_args;
 
       va_start (var_args, proc_name);
@@ -549,7 +549,7 @@ bse_procedure_exec_void (const gchar *proc_name,
     }
 }
 
-BseErrorType
+Bse::ErrorType
 bse_procedure_execvl (BseProcedureClass  *proc,
                       GSList             *in_value_list,
                       GSList             *out_value_list,
@@ -558,7 +558,7 @@ bse_procedure_execvl (BseProcedureClass  *proc,
 {
   GValue tmp_ivalues[BSE_PROCEDURE_MAX_IN_PARAMS];
   GValue tmp_ovalues[BSE_PROCEDURE_MAX_OUT_PARAMS];
-  BseErrorType error;
+  Bse::ErrorType error;
   GSList *slist;
   guint i;
 
@@ -569,14 +569,14 @@ bse_procedure_execvl (BseProcedureClass  *proc,
   if (slist || i != proc->n_in_pspecs)
     {
       g_warning ("%s: invalid number of arguments supplied to procedure \"%s\"", G_STRLOC, 
BSE_PROCEDURE_NAME (proc));
-      return BSE_ERROR_PROC_PARAM_INVAL;
+      return Bse::ERROR_PROC_PARAM_INVAL;
     }
   for (i = 0, slist = out_value_list; slist && i < proc->n_out_pspecs; i++, slist = slist->next)
     memcpy (tmp_ovalues + i, slist->data, sizeof (tmp_ovalues[0]));
   if (slist || i != proc->n_out_pspecs)
     {
       g_warning ("%s: invalid number of arguments supplied to procedure \"%s\"", G_STRLOC, 
BSE_PROCEDURE_NAME (proc));
-      return BSE_ERROR_PROC_PARAM_INVAL;
+      return Bse::ERROR_PROC_PARAM_INVAL;
     }
   error = bse_procedure_marshal (BSE_PROCEDURE_TYPE (proc), tmp_ivalues, tmp_ovalues, marshal, marshal_data);
   for (i = 0, slist = out_value_list; slist && i < proc->n_out_pspecs; i++, slist = slist->next)
diff --git a/bse/bseprocedure.hh b/bse/bseprocedure.hh
index 93b9442..7416561 100644
--- a/bse/bseprocedure.hh
+++ b/bse/bseprocedure.hh
@@ -21,7 +21,7 @@ G_BEGIN_DECLS
 typedef void          (*BseProcedureInit)   (BseProcedureClass *proc,
                                              GParamSpec       **in_pspecs,
                                              GParamSpec       **out_pspecs);
-typedef BseErrorType  (*BseProcedureExec)   (BseProcedureClass *procedure,
+typedef Bse::ErrorType  (*BseProcedureExec)   (BseProcedureClass *procedure,
                                              const GValue      *in_values,
                                              GValue           *out_values);
 struct _BseProcedureClass
@@ -48,8 +48,8 @@ struct _BseProcedureClass
 /* --- notifiers --- */
 typedef gboolean (*BseProcedureNotify) (gpointer     func_data,
                                        const gchar *proc_name,
-                                       BseErrorType exit_status);
-typedef BseErrorType (*BseProcedureMarshal) (gpointer          marshal_data,
+                                       Bse::ErrorType exit_status);
+typedef Bse::ErrorType (*BseProcedureMarshal) (gpointer                marshal_data,
                                             BseProcedureClass *proc,
                                             const GValue      *ivalues,
                                             GValue            *ovalues);
@@ -59,27 +59,27 @@ typedef BseErrorType (*BseProcedureMarshal) (gpointer               marshal_data,
 /* execute procedure, passing n_in_pspecs param values for in
  * values and n_out_pspecs param value locations for out values
  */
-BseErrorType bse_procedure_exec                  (const gchar          *proc_name,
+Bse::ErrorType bse_procedure_exec                (const gchar          *proc_name,
                                           ...);
-BseErrorType bse_procedure_exec_void     (const gchar          *proc_name,
+Bse::ErrorType bse_procedure_exec_void           (const gchar          *proc_name,
                                           ...);
 GType       bse_procedure_lookup         (const gchar          *proc_name);
-BseErrorType bse_procedure_marshal_valist (GType                proc_type,
+Bse::ErrorType bse_procedure_marshal_valist (GType              proc_type,
                                           const GValue         *first_value,
                                           BseProcedureMarshal   marshal,
                                           gpointer              marshal_data,
                                           gboolean              skip_ovalues,
                                           va_list               var_args);
-BseErrorType bse_procedure_marshal        (GType                proc_type,
+Bse::ErrorType bse_procedure_marshal        (GType              proc_type,
                                           const GValue         *ivalues,
                                           GValue               *ovalues,
                                           BseProcedureMarshal   marshal,
                                           gpointer              marshal_data);
-BseErrorType bse_procedure_collect_input_args (BseProcedureClass  *proc,
+Bse::ErrorType bse_procedure_collect_input_args (BseProcedureClass  *proc,
                                                const GValue       *first_value,
                                                va_list             var_args,
                                                GValue              ivalues[BSE_PROCEDURE_MAX_IN_PARAMS]);
-BseErrorType bse_procedure_execvl        (BseProcedureClass    *proc,
+Bse::ErrorType bse_procedure_execvl      (BseProcedureClass    *proc,
                                           GSList               *in_value_list,
                                           GSList               *out_value_list,
                                           BseProcedureMarshal   marshal,
diff --git a/bse/bseprocedure.proc b/bse/bseprocedure.proc
index 1c1e5b7..71ca96a 100644
--- a/bse/bseprocedure.proc
+++ b/bse/bseprocedure.proc
@@ -44,7 +44,7 @@ PROCEDURE (bse-note-to-freq, "Note to Freq") {
   /* set out params */
   sfi_value_set_real (out_values++, freq);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 PROCEDURE (bse-note-from-freq, "Note from Freq") {
@@ -66,7 +66,7 @@ PROCEDURE (bse-note-from-freq, "Note from Freq") {
   /* set out params */
   sfi_value_set_int (out_values++, bse_note_from_freq (musical_tuning, frequency));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 PROCEDURE (bse-note-describe, "Describe Note") {
@@ -90,7 +90,7 @@ BODY (BseProcedureClass *proc,
   /* describe note */
   bse_value_take_boxed (out_values++, bse_note_description (musical_tuning, note, fine_tune));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 PROCEDURE (bse-note-describe-from-freq, "Describe Note From Freq") {
@@ -117,7 +117,7 @@ BODY (BseProcedureClass *proc,
   note = bse_note_from_freq (musical_tuning, freq);
   bse_value_take_boxed (out_values++, bse_note_description (musical_tuning, note, 0));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 PROCEDURE (bse-note-from-string, "Note From String") {
@@ -142,7 +142,7 @@ BODY (BseProcedureClass *proc,
   note = bse_note_from_string (name);
   bse_value_take_boxed (out_values++, bse_note_description (musical_tuning, note, 0));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 PROCEDURE (bse-note-construct, "Note Construction") {
@@ -172,7 +172,7 @@ BODY (BseProcedureClass *proc,
   note = BSE_NOTE_GENERIC (octave, semitone);
   bse_value_take_boxed (out_values++, bse_note_description (musical_tuning, note, fine_tune));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 PROCEDURE (bse-type-options, "Type Options") {
@@ -189,14 +189,14 @@ PROCEDURE (bse-type-options, "Type Options") {
 
   /* check parameters */
   if (!stype)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   type = g_type_from_name (stype);
 
   /* set out params */
   sfi_value_set_string (out_values++, type ? bse_type_get_options (type) : NULL);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 PROCEDURE (bse-type-blurb, "Type Blurb") {
@@ -213,14 +213,14 @@ PROCEDURE (bse-type-blurb, "Type Blurb") {
 
   /* check parameters */
   if (!stype)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   type = g_type_from_name (stype);
 
   /* set out params */
   sfi_value_set_string (out_values++, type ? bse_type_get_blurb (type) : NULL);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 PROCEDURE (bse-type-authors, "Type Authors") {
@@ -237,14 +237,14 @@ PROCEDURE (bse-type-authors, "Type Authors") {
 
   /* check parameters */
   if (!stype)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   type = g_type_from_name (stype);
 
   /* set out params */
   sfi_value_set_string (out_values++, type ? bse_type_get_authors (type) : NULL);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 PROCEDURE (bse-type-license, "Type License") {
@@ -261,14 +261,14 @@ PROCEDURE (bse-type-license, "Type License") {
 
   /* check parameters */
   if (!stype)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   type = g_type_from_name (stype);
 
   /* set out params */
   sfi_value_set_string (out_values++, type ? bse_type_get_license (type) : NULL);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 static gdouble
@@ -362,5 +362,5 @@ PROCEDURE (bse-string-extract-number, "String Extract Number") {
         number = str2num (string, 0);
     }
   sfi_value_set_real (out_values++, number);
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
diff --git a/bse/bseprocidl.cc b/bse/bseprocidl.cc
index 41b89e1..cd8f00a 100644
--- a/bse/bseprocidl.cc
+++ b/bse/bseprocidl.cc
@@ -359,7 +359,7 @@ printChoices (void)
     {
       const gchar *name = g_type_name (children[i]);
       GEnumClass *eclass = (GEnumClass *)g_type_class_ref (children[i]);
-      gboolean regular_choice = strcmp (name, "BseErrorType") != 0;
+      gboolean regular_choice = strcmp (name, "Bse::ErrorType") != 0;
       GEnumValue *val;
 
       if (needTypes.count (name) && !excludeTypes.count (name))
diff --git a/bse/bseproject.cc b/bse/bseproject.cc
index 016a62e..acac7e4 100644
--- a/bse/bseproject.cc
+++ b/bse/bseproject.cc
@@ -487,7 +487,7 @@ compute_missing_supers (BseProject *self,
   return targets;
 }
 
-BseErrorType
+Bse::ErrorType
 bse_project_store_bse (BseProject  *self,
                        BseSuper    *super,
                       const gchar *bse_file,
@@ -499,17 +499,17 @@ bse_project_store_bse (BseProject  *self,
   guint l, flags;
   gint fd;
 
-  g_return_val_if_fail (BSE_IS_PROJECT (self), BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_IS_PROJECT (self), Bse::ERROR_INTERNAL);
   if (super)
     {
-      g_return_val_if_fail (BSE_IS_SUPER (super), BSE_ERROR_INTERNAL);
-      g_return_val_if_fail (BSE_ITEM (super)->parent == BSE_ITEM (self), BSE_ERROR_INTERNAL);
+      g_return_val_if_fail (BSE_IS_SUPER (super), Bse::ERROR_INTERNAL);
+      g_return_val_if_fail (BSE_ITEM (super)->parent == BSE_ITEM (self), Bse::ERROR_INTERNAL);
     }
-  g_return_val_if_fail (bse_file != NULL, BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (bse_file != NULL, Bse::ERROR_INTERNAL);
 
   fd = open (bse_file, O_WRONLY | O_CREAT | O_EXCL, 0666);
   if (fd < 0)
-    return bse_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+    return bse_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
 
   storage = (BseStorage*) bse_object_new (BSE_TYPE_STORAGE, NULL);
   flags = 0;
@@ -534,27 +534,27 @@ bse_project_store_bse (BseProject  *self,
   while (l < 0 && errno == EINTR);
   g_free (string);
 
-  BseErrorType error = bse_storage_flush_fd (storage, fd);
-  if (close (fd) < 0 && error == BSE_ERROR_NONE)
-    error = bse_error_from_errno (errno, BSE_ERROR_FILE_WRITE_FAILED);
+  Bse::ErrorType error = bse_storage_flush_fd (storage, fd);
+  if (close (fd) < 0 && error == Bse::ERROR_NONE)
+    error = bse_error_from_errno (errno, Bse::ERROR_FILE_WRITE_FAILED);
   bse_storage_reset (storage);
   g_object_unref (storage);
 
   return error;
 }
 
-BseErrorType
+Bse::ErrorType
 bse_project_restore (BseProject *self,
                     BseStorage *storage)
 {
   GScanner *scanner;
   GTokenType expected_token = G_TOKEN_NONE;
 
-  g_return_val_if_fail (BSE_IS_PROJECT (self), BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (BSE_IS_STORAGE (storage), BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_IS_PROJECT (self), Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_IS_STORAGE (storage), Bse::ERROR_INTERNAL);
 
   scanner = bse_storage_get_scanner (storage);
-  g_return_val_if_fail (scanner != NULL, BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (scanner != NULL, Bse::ERROR_INTERNAL);
 
   g_object_ref (self);
 
@@ -578,8 +578,8 @@ bse_project_restore (BseProject *self,
   g_object_unref (self);
 
   return (scanner->parse_errors >= scanner->max_parse_errors ?
-         BSE_ERROR_PARSE_ERROR :
-         BSE_ERROR_NONE);
+         Bse::ERROR_PARSE_ERROR :
+         Bse::ERROR_NONE);
 }
 
 BseObject*
@@ -679,7 +679,7 @@ bse_project_create_intern_synth (BseProject  *self,
   if (bse_synth)
     {
       BseStorage *storage = (BseStorage*) bse_object_new (BSE_TYPE_STORAGE, NULL);
-      BseErrorType error = BSE_ERROR_NONE;
+      Bse::ErrorType error = Bse::ERROR_NONE;
       StorageTrap strap = { 0, TRUE, }, *old_strap = (StorageTrap*) g_object_get_qdata ((GObject*) self, 
quark_storage_trap);
       bse_storage_input_text (storage, bse_synth, "<builtin-lib>");
       g_object_set_qdata ((GObject*) self, quark_storage_trap, &strap);
@@ -693,7 +693,7 @@ bse_project_create_intern_synth (BseProject  *self,
       g_free (bse_synth);
       if (error || !strap.items)
        g_warning ("failed to create internal synth \"%s\": %s",
-                  synth_name, bse_error_blurb (error ? error : BSE_ERROR_NO_ENTRY));
+                  synth_name, bse_error_blurb (error ? error : Bse::ERROR_NO_ENTRY));
       else
        synth = (BseItem*) strap.items->data;
       g_slist_free (strap.items);
@@ -788,19 +788,19 @@ bse_project_keep_activated (BseProject *self,
     }
 }
 
-BseErrorType
+Bse::ErrorType
 bse_project_activate (BseProject *self)
 {
-  BseErrorType error;
+  Bse::ErrorType error;
   BseTrans *trans;
   GSList *slist;
 
-  g_return_val_if_fail (BSE_IS_PROJECT (self), BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_IS_PROJECT (self), Bse::ERROR_INTERNAL);
 
   if (self->state != BSE_PROJECT_INACTIVE)
-    return BSE_ERROR_NONE;
+    return Bse::ERROR_NONE;
 
-  g_return_val_if_fail (BSE_SOURCE_PREPARED (self) == FALSE, BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_SOURCE_PREPARED (self) == FALSE, Bse::ERROR_INTERNAL);
 
   error = bse_server_open_devices (bse_server_get ());
   if (error)
@@ -827,7 +827,7 @@ bse_project_activate (BseProject *self)
     }
   bse_trans_commit (trans);
   bse_project_state_changed (self, BSE_PROJECT_ACTIVE);
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 void
@@ -986,7 +986,7 @@ ProjectImpl::play ()
 {
   BseProject *self = as<BseProject*>();
   BseProjectState state_before = self->state;
-  BseErrorType error = bse_project_activate (self);
+  Bse::ErrorType error = bse_project_activate (self);
   if (!error)
     {
       if (self->state == BSE_PROJECT_PLAYING)
@@ -1006,7 +1006,7 @@ ProjectImpl::activate ()
 {
   BseProject *self = as<BseProject*>();
   BseProjectState state_before = self->state;
-  BseErrorType error = bse_project_activate (self);
+  Bse::ErrorType error = bse_project_activate (self);
   if (state_before == BSE_PROJECT_INACTIVE && self->state != BSE_PROJECT_INACTIVE)
     {
       // some things work only (can only be undone) in deactivated projects
@@ -1176,7 +1176,7 @@ ErrorType
 ProjectImpl::import_midi_file (const String &file_name)
 {
   BseProject *self = as<BseProject*>();
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
   BseMidiFile *smf = bse_midi_file_load (file_name.c_str(), &error);
   if (!error)
     {
@@ -1201,7 +1201,7 @@ ErrorType
 ProjectImpl::restore_from_file (const String &file_name)
 {
   BseProject *self = as<BseProject*>();
-  BseErrorType error;
+  Bse::ErrorType error;
   if (!self->in_undo && !self->in_redo)
     {
       BseStorage *storage = (BseStorage*) bse_object_new (BSE_TYPE_STORAGE, NULL);
@@ -1213,7 +1213,7 @@ ProjectImpl::restore_from_file (const String &file_name)
       bse_project_clear_undo (self);
     }
   else
-    error = BSE_ERROR_PROC_BUSY;
+    error = Bse::ERROR_PROC_BUSY;
   return Bse::ErrorType (error);
 }
 
diff --git a/bse/bseproject.hh b/bse/bseproject.hh
index f7285b5..3967e71 100644
--- a/bse/bseproject.hh
+++ b/bse/bseproject.hh
@@ -39,7 +39,7 @@ struct BseProject : BseContainer {
 struct BseProjectClass : BseContainerClass
 {};
 
-BseErrorType   bse_project_activate            (BseProject     *project);
+Bse::ErrorType bse_project_activate            (BseProject     *project);
 void           bse_project_start_playback      (BseProject     *project);
 void           bse_project_stop_playback       (BseProject     *project);
 void           bse_project_check_auto_stop     (BseProject     *project);
@@ -52,9 +52,9 @@ void          bse_project_state_changed       (BseProject     *project,
                                                 BseProjectState state);
 BseStringSeq*  bse_project_list_upaths         (BseProject     *project,
                                                 GType           item_type);
-BseErrorType   bse_project_restore             (BseProject     *project,
+Bse::ErrorType bse_project_restore             (BseProject     *project,
                                                 BseStorage     *storage);
-BseErrorType   bse_project_store_bse           (BseProject     *project,
+Bse::ErrorType bse_project_store_bse           (BseProject     *project,
                                                 BseSuper       *super,
                                                 const gchar    *bse_file,
                                                 gboolean        self_contained);
diff --git a/bse/bseproject.proc b/bse/bseproject.proc
index 48d7c8d..0fef96a 100644
--- a/bse/bseproject.proc
+++ b/bse/bseproject.proc
@@ -34,14 +34,14 @@ METHOD (BseProject, get-midi-notifier) {
 
   /* check parameters */
   if (!BSE_IS_PROJECT (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   BseMidiNotifier *notifier = bse_project_get_midi_notifier (self);
 
   /* set output parameters */
   bse_value_set_object (out_values++, G_OBJECT (notifier));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 
@@ -60,7 +60,7 @@ METHOD (BseProject, store-bse, "File/Store") {
                           "be stored or whether to include everything in a self-contained .bse file",
                           FALSE, SFI_PARAM_STANDARD);
   OUT   = bse_param_spec_genum ("error", "Error", "Error indicating possible failures",
-                                BSE_TYPE_ERROR_TYPE, BSE_ERROR_NONE,
+                                BSE_TYPE_ERROR_TYPE, Bse::ERROR_NONE,
                                 SFI_PARAM_STANDARD);
 } BODY (BseProcedureClass *proc,
         const GValue      *in_values,
@@ -71,20 +71,20 @@ METHOD (BseProject, store-bse, "File/Store") {
   BseSuper *super = (BseSuper*) bse_value_get_object (in_values++);
   const char *file_name = sfi_value_get_string (in_values++);
   gboolean self_contained = sfi_value_get_bool (in_values++);
-  BseErrorType error;
+  Bse::ErrorType error;
 
   /* check parameters */
   if (!BSE_IS_PROJECT (project) || !file_name)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
   if (super && BSE_ITEM (super)->parent != BSE_ITEM (project))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   error = bse_project_store_bse (project, super, file_name, self_contained);
 
   /* set output parameters */
   g_value_set_enum (out_values++, error);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseProject, create-song) {
@@ -107,7 +107,7 @@ METHOD (BseProject, create-song) {
 
   /* check parameters */
   if (!BSE_IS_PROJECT (container))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   ustack = bse_item_undo_open (container, "create-song");
@@ -120,7 +120,7 @@ METHOD (BseProject, create-song) {
   /* set output parameters */
   bse_value_set_object (out_values++, child);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseProject, get-wave-repo) {
@@ -139,7 +139,7 @@ METHOD (BseProject, get-wave-repo) {
 
   /* check parameters */
   if (!BSE_IS_PROJECT (project))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   wrepo = bse_project_get_wave_repo (project);
@@ -147,7 +147,7 @@ METHOD (BseProject, get-wave-repo) {
   /* set output parameters */
   bse_value_set_object (out_values++, wrepo);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseProject, get-data-pocket) {
@@ -169,7 +169,7 @@ METHOD (BseProject, get-data-pocket) {
 
   /* check parameters */
   if (!BSE_IS_PROJECT (project) || !name)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   item = bse_project_lookup_typed_item (project, BSE_TYPE_DATA_POCKET, name);
@@ -179,7 +179,7 @@ METHOD (BseProject, get-data-pocket) {
   /* set output parameters */
   bse_value_set_object (out_values++, item);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseProject, create-csynth) {
@@ -202,7 +202,7 @@ METHOD (BseProject, create-csynth) {
 
   /* check parameters */
   if (!BSE_IS_PROJECT (container))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   ustack = bse_item_undo_open (container, "create-csynth");
@@ -215,7 +215,7 @@ METHOD (BseProject, create-csynth) {
   /* set output parameters */
   bse_value_set_object (out_values++, child);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseProject, create-midi-synth) {
@@ -238,7 +238,7 @@ METHOD (BseProject, create-midi-synth) {
 
   /* check parameters */
   if (!BSE_IS_PROJECT (container))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   ustack = bse_item_undo_open (container, "create-midi-synth");
@@ -251,7 +251,7 @@ METHOD (BseProject, create-midi-synth) {
   /* set output parameters */
   bse_value_set_object (out_values++, child);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseProject, remove-snet) {
@@ -271,7 +271,7 @@ METHOD (BseProject, remove-snet) {
 
   /* check parameters */
   if (!BSE_IS_PROJECT (self) || !BSE_IS_SNET (child) || child->parent != (BseItem*) self)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   if (!BSE_SOURCE_PREPARED (self))
@@ -287,7 +287,7 @@ METHOD (BseProject, remove-snet) {
       bse_item_undo_close (ustack);
     }
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseProject, list-uname-paths) {
@@ -309,12 +309,12 @@ METHOD (BseProject, list-uname-paths) {
 
   /* check parameters */
   if (!BSE_IS_PROJECT (project) || !g_type_is_a (type, BSE_TYPE_ITEM))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   bse_value_take_boxed (out_values++, bse_project_list_upaths (project, type));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseProject, find-item) {
@@ -335,12 +335,12 @@ METHOD (BseProject, find-item) {
 
   /* check parameters */
   if (!BSE_IS_PROJECT (project) || !string)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   bse_value_set_object (out_values++, bse_container_resolve_upath (BSE_CONTAINER (project), string));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseProject, match-items-by-uname) {
@@ -366,7 +366,7 @@ METHOD (BseProject, match-items-by-uname) {
 
   /* check parameters */
   if (!BSE_IS_PROJECT (project) || !string || !g_type_is_a (type, BSE_TYPE_ITEM))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   iseq = bse_item_seq_new ();
@@ -382,7 +382,7 @@ METHOD (BseProject, match-items-by-uname) {
   /* set output parameters */
   bse_value_take_boxed (out_values++, iseq);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseProject, get-supers) {
@@ -401,7 +401,7 @@ METHOD (BseProject, get-supers) {
 
   /* check parameters */
   if (!BSE_IS_PROJECT (project))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   iseq = bse_item_seq_new ();
@@ -411,7 +411,7 @@ METHOD (BseProject, get-supers) {
   /* set output parameters */
   bse_value_take_boxed (out_values++, iseq);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 
@@ -430,12 +430,12 @@ METHOD (BseProject, get-state) {
 
   /* check parameters */
   if (!BSE_IS_PROJECT (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   g_value_set_enum (out_values++, self->state);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 
diff --git a/bse/bsescripthelper.cc b/bse/bsescripthelper.cc
index e39c753..3ae4b24 100644
--- a/bse/bsescripthelper.cc
+++ b/bse/bsescripthelper.cc
@@ -14,7 +14,7 @@
 /* --- prototypes --- */
 static void            bse_script_procedure_init       (BseScriptProcedureClass *klass,
                                                         BseScriptData           *sdata);
-static BseErrorType    bse_script_procedure_exec       (BseProcedureClass       *proc,
+static Bse::ErrorType  bse_script_procedure_exec       (BseProcedureClass       *proc,
                                                         const GValue            *in_values,
                                                         GValue                  *out_values);
 static GParamSpec*     bse_script_param_spec           (gchar                   *pspec_desc,
@@ -124,7 +124,7 @@ bse_script_proc_register (const gchar *script_file,
   return type;
 }
 
-static BseErrorType
+static Bse::ErrorType
 bse_script_procedure_exec (BseProcedureClass *proc,
                           const GValue      *in_values,
                           GValue            *out_values)
@@ -134,7 +134,7 @@ bse_script_procedure_exec (BseProcedureClass *proc,
   BseServer *server = bse_server_get ();
   SfiRing *params = NULL;
   BseJanitor *janitor;
-  BseErrorType error;
+  Bse::ErrorType error;
   gchar *shellpath;
   guint i;
 
@@ -243,14 +243,14 @@ bse_script_path_list_files (void)
   return ring;
 }
 
-BseErrorType
+Bse::ErrorType
 bse_script_file_register (const gchar *file_name,
                          BseJanitor **janitor_p)
 {
   BseServer *server = bse_server_get ();
   SfiRing *params = NULL;
   const char *proc_name = "registration hook";
-  BseErrorType error;
+  Bse::ErrorType error;
 
   params = sfi_ring_append (params, g_strdup ("--bse-enable-register"));
   params = sfi_ring_append (params, g_strdup ("--bse-eval"));
diff --git a/bse/bsescripthelper.hh b/bse/bsescripthelper.hh
index f5b78f1..7d72f7f 100644
--- a/bse/bsescripthelper.hh
+++ b/bse/bsescripthelper.hh
@@ -35,7 +35,7 @@ GType         bse_script_proc_register        (const gchar    *script_file,
                                                 const gchar    *license,
                                                 SfiRing        *params);
 SfiRing*       bse_script_path_list_files      (void);
-BseErrorType    bse_script_file_register       (const gchar    *file_name,
+Bse::ErrorType    bse_script_file_register     (const gchar    *file_name,
                                                 BseJanitor    **janitor_p);
 GValue*                bse_script_check_client_msg     (SfiGlueDecoder *decoder,
                                                 BseJanitor     *janitor,
diff --git a/bse/bsescripthelper.proc b/bse/bsescripthelper.proc
index 02260cc..e68276b 100644
--- a/bse/bsescripthelper.proc
+++ b/bse/bsescripthelper.proc
@@ -37,5 +37,5 @@ PROCEDURE (bse-proxy-check, "Proxy Check") {
   /* set output parameters */
   sfi_value_set_bool (out_values++, is_a);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
diff --git a/bse/bseserver.cc b/bse/bseserver.cc
index 9898d34..a909e3a 100644
--- a/bse/bseserver.cc
+++ b/bse/bseserver.cc
@@ -459,14 +459,14 @@ pcm_request_callback (BseDevice *device,
   PcmRequest *pr = (PcmRequest*) data;
   bse_pcm_device_request (BSE_PCM_DEVICE (device), pr->n_channels, pr->mix_freq, pr->latency, 
pr->block_size);
 }
-static BseErrorType
+static Bse::ErrorType
 server_open_pcm_device (BseServer *server,
                         guint      mix_freq,
                         guint      latency,
                         guint      block_size)
 {
-  g_return_val_if_fail (server->pcm_device == NULL, BSE_ERROR_INTERNAL);
-  BseErrorType error = BSE_ERROR_UNKNOWN;
+  g_return_val_if_fail (server->pcm_device == NULL, Bse::ERROR_INTERNAL);
+  Bse::ErrorType error = Bse::ERROR_UNKNOWN;
   PcmRequest pr;
   pr.n_channels = 2;
   pr.mix_freq = mix_freq;
@@ -492,13 +492,13 @@ server_open_pcm_device (BseServer *server,
       ServerImpl::instance().send_user_message (umsg);
     }
   server->pcm_input_checked = FALSE;
-  return server->pcm_device ? BSE_ERROR_NONE : error;
+  return server->pcm_device ? Bse::ERROR_NONE : error;
 }
-static BseErrorType
+static Bse::ErrorType
 server_open_midi_device (BseServer *server)
 {
-  g_return_val_if_fail (server->midi_device == NULL, BSE_ERROR_INTERNAL);
-  BseErrorType error;
+  g_return_val_if_fail (server->midi_device == NULL, Bse::ERROR_INTERNAL);
+  Bse::ErrorType error;
   server->midi_device = (BseMidiDevice*) bse_device_open_best (BSE_TYPE_MIDI_DEVICE, TRUE, FALSE, 
bse_main_args->midi_drivers, NULL, NULL, &error);
   if (!server->midi_device)
     {
@@ -519,18 +519,18 @@ server_open_midi_device (BseServer *server)
           ServerImpl::instance().send_user_message (umsg);
         }
     }
-  return server->midi_device ? BSE_ERROR_NONE : error;
+  return server->midi_device ? Bse::ERROR_NONE : error;
 }
-BseErrorType
+Bse::ErrorType
 bse_server_open_devices (BseServer *self)
 {
-  BseErrorType error = BSE_ERROR_NONE;
-  g_return_val_if_fail (BSE_IS_SERVER (self), BSE_ERROR_INTERNAL);
+  Bse::ErrorType error = Bse::ERROR_NONE;
+  g_return_val_if_fail (BSE_IS_SERVER (self), Bse::ERROR_INTERNAL);
   /* check whether devices are already opened */
   if (self->dev_use_count)
     {
       self->dev_use_count++;
-      return BSE_ERROR_NONE;
+      return Bse::ERROR_NONE;
     }
   /* lock playback/capture/latency settings */
   bse_gconfig_lock ();
@@ -545,8 +545,8 @@ bse_server_open_devices (BseServer *self)
     {
       mix_freq = aligned_freq;
       bse_engine_constrain (latency, mix_freq, BSE_GCONFIG (synth_control_freq), &block_size, NULL);
-      BseErrorType new_error = server_open_pcm_device (self, mix_freq, latency, block_size);
-      error = new_error ? error : BSE_ERROR_NONE;
+      Bse::ErrorType new_error = server_open_pcm_device (self, mix_freq, latency, block_size);
+      error = new_error ? error : Bse::ERROR_NONE;
     }
   if (!error)
     error = server_open_midi_device (self);
@@ -558,7 +558,7 @@ bse_server_open_devices (BseServer *self)
       self->pcm_imodule = bse_pcm_imodule_insert (pcm_handle, trans);
       if (self->wave_file)
        {
-         BseErrorType error;
+         Bse::ErrorType error;
          self->pcm_writer = (BsePcmWriter*) bse_object_new (BSE_TYPE_PCM_WRITER, NULL);
           const uint n_channels = 2;
          error = bse_pcm_writer_open (self->pcm_writer, self->wave_file,
@@ -763,7 +763,7 @@ bse_server_remove_io_watch (BseServer *server,
     g_warning (G_STRLOC ": no such io watch installed %p(%p)", watch_func, data);
 }
 
-BseErrorType
+Bse::ErrorType
 bse_server_run_remote (BseServer         *server,
                       const gchar       *process_name,
                       SfiRing           *params,
@@ -774,10 +774,10 @@ bse_server_run_remote (BseServer         *server,
   gint child_pid, command_input, command_output;
   BseJanitor *janitor = NULL;
 
-  g_return_val_if_fail (BSE_IS_SERVER (server), BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (process_name != NULL, BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (script_name != NULL, BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (proc_name != NULL, BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_IS_SERVER (server), Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (process_name != NULL, Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (script_name != NULL, Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (proc_name != NULL, Bse::ERROR_INTERNAL);
 
   child_pid = command_input = command_output = -1;
   const char *reason = sfi_com_spawn_async (process_name,
@@ -818,11 +818,11 @@ bse_server_run_remote (BseServer         *server,
     {
       bse_server_script_error (server, script_name, proc_name, reason);
       g_free (freeme);
-      return BSE_ERROR_SPAWN;
+      return Bse::ERROR_SPAWN;
     }
   g_free (freeme);
   bse_server_script_start (server, janitor);
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 
@@ -1339,7 +1339,7 @@ ServerImpl::start_recording (const String &wave_file, double n_seconds)
 struct ScriptRegistration
 {
   gchar         *script;
-  BseErrorType (*register_func) (const gchar *script, BseJanitor **janitor_p);
+  Bse::ErrorType (*register_func) (const gchar *script, BseJanitor **janitor_p);
   ScriptRegistration *next;
 };
 
@@ -1359,7 +1359,7 @@ register_scripts_handler (gpointer data)
   BseServer *server = (BseServer*) data;
   ScriptRegistration *scr = (ScriptRegistration*) g_object_get_data ((GObject*) server, 
"script-registration-queue");
   BseJanitor *janitor = NULL;
-  BseErrorType error;
+  Bse::ErrorType error;
 
   if (!scr)
     {
diff --git a/bse/bseserver.hh b/bse/bseserver.hh
index 463a846..32dfa41 100644
--- a/bse/bseserver.hh
+++ b/bse/bseserver.hh
@@ -42,7 +42,7 @@ void          bse_server_stop_recording               (BseServer      *server);
 void            bse_server_start_recording              (BseServer      *server,
                                                          const char     *wave_file,
                                                          double          n_seconds);
-BseErrorType   bse_server_open_devices                 (BseServer      *server);
+Bse::ErrorType bse_server_open_devices                 (BseServer      *server);
 void           bse_server_close_devices                (BseServer      *server);
 BseModule*     bse_server_retrieve_pcm_output_module   (BseServer      *server,
                                                         BseSource      *source,
@@ -82,7 +82,7 @@ void          bse_server_script_error                 (BseServer          *server,
                                                         const gchar        *script_name,
                                                         const gchar        *proc_name,
                                                         const gchar        *reason);
-BseErrorType   bse_server_run_remote                   (BseServer          *server,
+Bse::ErrorType bse_server_run_remote                   (BseServer          *server,
                                                         const gchar        *process_name,
                                                         SfiRing            *params,
                                                         const gchar        *script_name,
diff --git a/bse/bsesnet.proc b/bse/bsesnet.proc
index ee9824b..f3c82e2 100644
--- a/bse/bsesnet.proc
+++ b/bse/bsesnet.proc
@@ -26,23 +26,23 @@ METHOD (BseSNet, can-create-source) {
   BseSNet *snet = (BseSNet*) bse_value_get_object (in_values++);
   const gchar *type_name = sfi_value_get_string (in_values++);
   GType type = g_type_from_name (type_name);
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
 
   /* check parameters */
   if (!BSE_IS_SNET (snet))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   if (!BSE_SNET_USER_SYNTH (snet) && !BSE_DBG_EXT)
-    error = BSE_ERROR_NOT_OWNER;
+    error = Bse::ERROR_NOT_OWNER;
   else if (!g_type_is_a (type, BSE_TYPE_SOURCE) ||
           g_type_is_a (type, BSE_TYPE_CONTAINER))
-    error = BSE_ERROR_SOURCE_TYPE_INVALID;
+    error = Bse::ERROR_SOURCE_TYPE_INVALID;
 
   /* set output parameters */
   g_value_set_enum (out_values++, error);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSNet, create-source) {
@@ -62,14 +62,14 @@ METHOD (BseSNet, create-source) {
   const gchar *type_name  = sfi_value_get_string (in_values++);
   BseItem *child;
   BseUndoStack *ustack;
-  BseErrorType error;
+  Bse::ErrorType error;
 
   /* check parameters */
   if (!BSE_IS_SNET (container))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
   if (bse_item_exec (container, "can-create-source", type_name, &error) != 0 ||
       error != 0)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   ustack = bse_item_undo_open (container, "create-source");
@@ -80,7 +80,7 @@ METHOD (BseSNet, create-source) {
   /* set output parameters */
   bse_value_set_object (out_values++, child);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSNet, remove-source) {
@@ -99,13 +99,13 @@ METHOD (BseSNet, remove-source) {
   /* extract parameter values */
   BseSNet *self = (BseSNet*) bse_value_get_object (in_values++);
   BseItem *child = (BseItem*) bse_value_get_object (in_values++);
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
   BseUndoStack *ustack;
 
   /* check parameters */
   if (!BSE_IS_SNET (self) || !BSE_IS_SOURCE (child) || child->parent != (BseItem*) self ||
       (!BSE_SNET_USER_SYNTH (self) && !BSE_DBG_EXT))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   ustack = bse_item_undo_open (self, "remove-child %s", bse_object_debug_name (child));
@@ -121,5 +121,5 @@ METHOD (BseSNet, remove-source) {
   /* set output parameters */
   g_value_set_enum (out_values++, error);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
diff --git a/bse/bsesong.cc b/bse/bsesong.cc
index 279cc2e..c8df914 100644
--- a/bse/bsesong.cc
+++ b/bse/bsesong.cc
@@ -669,7 +669,7 @@ bse_song_compat_finish (BseSuper       *super,
       BseSource *master = bse_song_ensure_master (self);
       for (node = master ? tracks : NULL; node; node = sfi_ring_walk (node, tracks))
         {
-          BseErrorType error = bse_bus_connect (BSE_BUS (master), (BseItem*) node->data);
+          Bse::ErrorType error = bse_bus_connect (BSE_BUS (master), (BseItem*) node->data);
           if (error)
             sfi_warning ("Failed to connect track %s: %s", bse_object_debug_name (node->data), 
bse_error_blurb (error));
           clear_undo = TRUE;
diff --git a/bse/bsesong.proc b/bse/bsesong.proc
index 916abb3..b1b7d55 100644
--- a/bse/bsesong.proc
+++ b/bse/bsesong.proc
@@ -29,17 +29,17 @@ METHOD (BseSong, create-bus) {
 {
   /* extract parameter values */
   BseSong *self = (BseSong*) bse_value_get_object (in_values++);
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
   BseUndoStack *ustack;
   BseItem *child = NULL;
 
   /* check parameters */
   if (!BSE_IS_SONG (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   if (BSE_SOURCE_PREPARED (self))
-    error = BSE_ERROR_SOURCE_BUSY;
+    error = Bse::ERROR_SOURCE_BUSY;
   else
     {
       ustack = bse_item_undo_open (self, "create-bus");
@@ -67,15 +67,15 @@ METHOD (BseSong, remove-bus) {
   /* extract parameter values */
   BseSong *self = (BseSong*) bse_value_get_object (in_values++);
   BseItem *child = (BseItem*) bse_value_get_object (in_values++);
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
 
   /* check parameters */
   if (!BSE_IS_SONG (self) || !BSE_IS_BUS (child) || BSE_ITEM (child)->parent != BSE_ITEM (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   if (BSE_SOURCE_PREPARED (self))
-    error = BSE_ERROR_SOURCE_BUSY;
+    error = Bse::ERROR_SOURCE_BUSY;
   else
     {
       BseUndoStack *ustack = bse_item_undo_open (self, "remove-child %s", bse_object_debug_name (child));
@@ -110,7 +110,7 @@ METHOD (BseSong, ensure-master-bus) {
 
   /* check parameters */
   if (!BSE_IS_SONG (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   child = bse_song_ensure_master (self);
@@ -118,7 +118,7 @@ METHOD (BseSong, ensure-master-bus) {
   /* set output parameters */
   bse_value_set_object (out_values++, child);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSong, get-master-bus) {
@@ -136,7 +136,7 @@ METHOD (BseSong, get-master-bus) {
 
   /* check parameters */
   if (!BSE_IS_SONG (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   BseBus *bus = bse_song_find_master (self);
@@ -144,7 +144,7 @@ METHOD (BseSong, get-master-bus) {
   /* set output parameters */
   bse_value_set_object (out_values++, bus);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 static const gchar*
@@ -202,7 +202,7 @@ METHOD (BseSong, ensure-track-links) {
 
   /* check parameters */
   if (!BSE_IS_SONG (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   gboolean clear_undo = FALSE;
@@ -221,7 +221,7 @@ METHOD (BseSong, ensure-track-links) {
         bse_project_clear_undo (project);
     }
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSong, create-part) {
@@ -241,7 +241,7 @@ METHOD (BseSong, create-part) {
 
   /* check parameters */
   if (!BSE_IS_SONG (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   ustack = bse_item_undo_open (self, "create-part");
@@ -252,7 +252,7 @@ METHOD (BseSong, create-part) {
   /* set output parameters */
   bse_value_set_object (out_values++, child);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSong, remove-part) {
@@ -268,15 +268,15 @@ METHOD (BseSong, remove-part) {
   /* extract parameter values */
   BseSong *self = (BseSong*) bse_value_get_object (in_values++);
   BseItem *child = (BseItem*) bse_value_get_object (in_values++);
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
 
   /* check parameters */
   if (!BSE_IS_SONG (self) || !BSE_IS_PART (child) || BSE_ITEM (child)->parent != BSE_ITEM (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   if (BSE_SOURCE_PREPARED (self))
-    error = BSE_ERROR_SOURCE_BUSY;
+    error = Bse::ERROR_SOURCE_BUSY;
   else
     {
       BseUndoStack *ustack = bse_item_undo_open (self, "remove-child %s", bse_object_debug_name (child));
@@ -305,16 +305,16 @@ METHOD (BseSong, create-track) {
 {
   /* extract parameter values */
   BseSong *self = (BseSong*) bse_value_get_object (in_values++);
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
   BseItem *child = NULL;
 
   /* check parameters */
   if (!BSE_IS_SONG (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   if (BSE_SOURCE_PREPARED (self))
-    error = BSE_ERROR_SOURCE_BUSY;
+    error = Bse::ERROR_SOURCE_BUSY;
   else
     {
       BseUndoStack *ustack = bse_item_undo_open (self, "create-track");
@@ -342,16 +342,16 @@ METHOD (BseSong, remove-track) {
   /* extract parameter values */
   BseSong *self = (BseSong*) bse_value_get_object (in_values++);
   BseItem *child = (BseItem*) bse_value_get_object (in_values++);
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
 
   /* check parameters */
   if (!BSE_IS_SONG (self) || !BSE_IS_TRACK (child) ||
       BSE_ITEM (child)->parent != BSE_ITEM (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   if (BSE_SOURCE_PREPARED (self))
-    error = BSE_ERROR_SOURCE_BUSY;
+    error = Bse::ERROR_SOURCE_BUSY;
   else
     {
       BseUndoStack *ustack = bse_item_undo_open (self, "remove-child %s", bse_object_debug_name (child));
@@ -390,7 +390,7 @@ METHOD (BseSong, find-track-for-part) {
   /* check parameters */
   if (!BSE_IS_SONG (self) || !BSE_IS_PART (part) ||
       BSE_ITEM (part)->parent != BSE_ITEM (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   for (ring = self->tracks_SL; ring; ring = sfi_ring_walk (ring, self->tracks_SL))
@@ -408,7 +408,7 @@ METHOD (BseSong, find-track-for-part) {
   /* set output parameters */
   bse_value_set_object (out_values++, track);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSong, find-any-track-for-part) {
@@ -430,12 +430,12 @@ METHOD (BseSong, find-any-track-for-part) {
   /* check parameters */
   if (!BSE_IS_SONG (self) || !BSE_IS_PART (part) ||
       BSE_ITEM (part)->parent != BSE_ITEM (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   bse_value_set_object (out_values++, bse_song_find_first_track (self, part));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSong, synthesize-note) {
@@ -467,7 +467,7 @@ METHOD (BseSong, synthesize-note) {
   /* check parameters */
   if (!BSE_IS_SONG (self) || !BSE_IS_TRACK (track) ||
       BSE_ITEM (track)->parent != BSE_ITEM (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   if (BSE_SOURCE_PREPARED (self) && self->midi_receiver_SL)
@@ -484,7 +484,7 @@ METHOD (BseSong, synthesize-note) {
       bse_project_keep_activated (BSE_PROJECT (BSE_ITEM (self)->parent), tstamp + duration);
     }
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSong, get-timing) {
@@ -503,7 +503,7 @@ METHOD (BseSong, get-timing) {
 
   /* check parameters */
   if (!BSE_IS_SONG (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   bse_song_get_timing (self, tick, &timing);
@@ -511,5 +511,5 @@ METHOD (BseSong, get-timing) {
   /* set output parameters */
   bse_value_set_boxed (out_values++, &timing);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
diff --git a/bse/bsesource.cc b/bse/bsesource.cc
index f4a1e39..73abca6 100644
--- a/bse/bsesource.cc
+++ b/bse/bsesource.cc
@@ -463,7 +463,7 @@ aprop_array_free (gpointer data)
   g_bsearch_array_free (aparray, &aprop_bconfig);
 }
 
-BseErrorType
+Bse::ErrorType
 bse_source_set_automation_property (BseSource        *source,
                                     const gchar      *prop_name,
                                     guint             midi_channel,
@@ -474,20 +474,20 @@ bse_source_set_automation_property (BseSource        *source,
             BSE_MIDI_CONTROL_CONTINUOUS_31 == BseMidiControlType (BSE_MIDI_SIGNAL_CONTINUOUS_31) &&
             BSE_MIDI_CONTROL_0             == BseMidiControlType (BSE_MIDI_SIGNAL_CONTROL_0) &&
             BSE_MIDI_CONTROL_127           == BseMidiControlType (BSE_MIDI_SIGNAL_CONTROL_127));
-  g_return_val_if_fail (BSE_IS_SOURCE (source), BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (prop_name != NULL, BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_IS_SOURCE (source), Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (prop_name != NULL, Bse::ERROR_INTERNAL);
   if (BSE_SOURCE_PREPARED (source))
-    return BSE_ERROR_SOURCE_BUSY;
+    return Bse::ERROR_SOURCE_BUSY;
   const BseMidiControlType control_type = BseMidiControlType (signal_type);
   if (control_type != BSE_MIDI_CONTROL_NONE &&
       (control_type < BSE_MIDI_CONTROL_CONTINUOUS_0 || control_type > BSE_MIDI_CONTROL_CONTINUOUS_31) &&
       (control_type < BSE_MIDI_CONTROL_0 || control_type > BSE_MIDI_CONTROL_127))
-    return BSE_ERROR_INVALID_MIDI_CONTROL;
+    return Bse::ERROR_INVALID_MIDI_CONTROL;
   source_class_collect_properties (BSE_SOURCE_GET_CLASS (source));
   GParamSpec *pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (source), prop_name);
   SfiRing *ring = sfi_ring_find (BSE_SOURCE_GET_CLASS (source)->automation_properties, pspec);
   if (!ring)    /* !pspec or pspec not found */
-    return BSE_ERROR_INVALID_PROPERTY;
+    return Bse::ERROR_INVALID_PROPERTY;
   GBSearchArray *aparray = (GBSearchArray*) g_object_get_data (source, "BseSource-AutomationProperties"), 
*oarray = aparray;
   if (!aparray)
     aparray = g_bsearch_array_create (&aprop_bconfig);
@@ -511,7 +511,7 @@ bse_source_set_automation_property (BseSource        *source,
       ap->signal_type = signal_type;
       g_object_notify (source, pspec->name);
     }
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 void
@@ -1215,36 +1215,36 @@ check_jchannel_connection (BseSource *source,
     return ochannel == input->idata.ochannel && osource == input->idata.osource ? 0 : -1;
 }
 
-BseErrorType
+Bse::ErrorType
 bse_source_set_input (BseSource *source,
                      guint      ichannel,
                      BseSource *osource,
                      guint      ochannel)
 {
-  g_return_val_if_fail (BSE_IS_SOURCE (source), BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (BSE_IS_SOURCE (osource), BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (BSE_ITEM (source)->parent == BSE_ITEM (osource)->parent, BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_IS_SOURCE (source), Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_IS_SOURCE (osource), Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_ITEM (source)->parent == BSE_ITEM (osource)->parent, Bse::ERROR_INTERNAL);
   if (BSE_SOURCE_PREPARED (source))    /* FIXME: check context sets */
     {
-      g_return_val_if_fail (BSE_SOURCE_PREPARED (osource), BSE_ERROR_INTERNAL); /* paranoid, checked parent 
already */
-      g_return_val_if_fail (BSE_SOURCE_N_CONTEXTS (source) == BSE_SOURCE_N_CONTEXTS (osource), 
BSE_ERROR_INTERNAL);
+      g_return_val_if_fail (BSE_SOURCE_PREPARED (osource), Bse::ERROR_INTERNAL); /* paranoid, checked parent 
already */
+      g_return_val_if_fail (BSE_SOURCE_N_CONTEXTS (source) == BSE_SOURCE_N_CONTEXTS (osource), 
Bse::ERROR_INTERNAL);
     }
   else
-    g_return_val_if_fail (!BSE_SOURCE_PREPARED (osource), BSE_ERROR_INTERNAL);
+    g_return_val_if_fail (!BSE_SOURCE_PREPARED (osource), Bse::ERROR_INTERNAL);
 
   if (ichannel >= BSE_SOURCE_N_ICHANNELS (source))
-    return BSE_ERROR_SOURCE_NO_SUCH_ICHANNEL;
+    return Bse::ERROR_SOURCE_NO_SUCH_ICHANNEL;
   if (ochannel >= BSE_SOURCE_N_OCHANNELS (osource))
-    return BSE_ERROR_SOURCE_NO_SUCH_OCHANNEL;
+    return Bse::ERROR_SOURCE_NO_SUCH_OCHANNEL;
   if (BSE_SOURCE_IS_JOINT_ICHANNEL (source, ichannel))
     {
       if (check_jchannel_connection (source, ichannel, osource, ochannel) >= 0)
-       return BSE_ERROR_SOURCE_CHANNELS_CONNECTED;
+       return Bse::ERROR_SOURCE_CHANNELS_CONNECTED;
     }
   else if (BSE_SOURCE_INPUT (source, ichannel)->idata.osource)
-    return BSE_ERROR_SOURCE_ICHANNEL_IN_USE;
+    return Bse::ERROR_SOURCE_ICHANNEL_IN_USE;
   if (bse_source_test_input_recursive (osource, source))
-    return BSE_ERROR_SOURCE_BAD_LOOPBACK;
+    return Bse::ERROR_SOURCE_BAD_LOOPBACK;
 
   g_object_ref (source);
   g_object_ref (osource);
@@ -1254,7 +1254,7 @@ bse_source_set_input (BseSource *source,
   g_object_unref (source);
   g_object_unref (osource);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 static void
@@ -1321,43 +1321,43 @@ bse_source_real_remove_input (BseSource *source,
     bse_trans_commit (trans);
 }
 
-BseErrorType
+Bse::ErrorType
 bse_source_check_input (BseSource *source,
                        guint      ichannel,
                        BseSource *osource,
                        guint      ochannel)
 {
-  g_return_val_if_fail (BSE_IS_SOURCE (source), BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (BSE_IS_SOURCE (osource), BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_IS_SOURCE (source), Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_IS_SOURCE (osource), Bse::ERROR_INTERNAL);
 
   if (BSE_ITEM (source)->parent != BSE_ITEM (osource)->parent)
-    return BSE_ERROR_SOURCE_PARENT_MISMATCH;
+    return Bse::ERROR_SOURCE_PARENT_MISMATCH;
   if (BSE_SOURCE_PREPARED (source))     /* FIXME: check context sets */
     {
-      g_return_val_if_fail (BSE_SOURCE_PREPARED (osource), BSE_ERROR_INTERNAL);        /* paranoid, checked 
parent already */
-      /* prolly wrong: */ g_return_val_if_fail (BSE_SOURCE_N_CONTEXTS (source) == BSE_SOURCE_N_CONTEXTS 
(osource), BSE_ERROR_INTERNAL);
+      g_return_val_if_fail (BSE_SOURCE_PREPARED (osource), Bse::ERROR_INTERNAL);       /* paranoid, checked 
parent already */
+      /* prolly wrong: */ g_return_val_if_fail (BSE_SOURCE_N_CONTEXTS (source) == BSE_SOURCE_N_CONTEXTS 
(osource), Bse::ERROR_INTERNAL);
     }
   else
-    g_return_val_if_fail (!BSE_SOURCE_PREPARED (osource), BSE_ERROR_INTERNAL);
+    g_return_val_if_fail (!BSE_SOURCE_PREPARED (osource), Bse::ERROR_INTERNAL);
 
   if (ichannel >= BSE_SOURCE_N_ICHANNELS (source))
-    return BSE_ERROR_SOURCE_NO_SUCH_ICHANNEL;
+    return Bse::ERROR_SOURCE_NO_SUCH_ICHANNEL;
   if (ochannel >= BSE_SOURCE_N_OCHANNELS (osource))
-    return BSE_ERROR_SOURCE_NO_SUCH_OCHANNEL;
+    return Bse::ERROR_SOURCE_NO_SUCH_OCHANNEL;
   if (check_jchannel_connection (source, ichannel, osource, ochannel) < 0)
-    return BSE_ERROR_SOURCE_NO_SUCH_CONNECTION;
+    return Bse::ERROR_SOURCE_NO_SUCH_CONNECTION;
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
-BseErrorType
+Bse::ErrorType
 bse_source_unset_input (BseSource *source,
                        guint      ichannel,
                        BseSource *osource,
                        guint      ochannel)
 {
-  BseErrorType error = bse_source_check_input (source, ichannel, osource, ochannel);
-  if (error != BSE_ERROR_NONE)
+  Bse::ErrorType error = bse_source_check_input (source, ichannel, osource, ochannel);
+  if (error != Bse::ERROR_NONE)
     return error;
 
   g_object_ref (source);
@@ -1368,7 +1368,7 @@ bse_source_unset_input (BseSource *source,
   g_object_unref (osource);
   g_object_unref (source);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 gboolean
@@ -1377,7 +1377,7 @@ bse_source_get_input (BseSource      *source,
                       BseSource     **osourcep,
                       guint          *ochannelp)
 {
-  g_return_val_if_fail (BSE_IS_SOURCE (source), BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_IS_SOURCE (source), Bse::ERROR_INTERNAL);
   if (ichannel < BSE_SOURCE_N_ICHANNELS (source) &&
       !BSE_SOURCE_IS_JOINT_ICHANNEL (source, ichannel))
     {
@@ -1427,7 +1427,7 @@ bse_source_must_set_input_loc (BseSource      *source,
                                guint           ochannel,
                                const gchar    *strloc)
 {
-  BseErrorType error = bse_source_set_input (source, ichannel, osource, ochannel);
+  Bse::ErrorType error = bse_source_set_input (source, ichannel, osource, ochannel);
   if (error)
     g_warning ("%s: failed to connect module %s channel %u to module %s channel %u: %s", strloc,
                bse_object_debug_name (source), ichannel,
@@ -1746,11 +1746,11 @@ bse_source_input_backup_to_undo (BseSource      *source,
                                  BseSource      *osource,
                                  guint           ochannel)
 {
-  BseErrorType error = bse_source_check_input (source, ichannel, osource, ochannel);
+  Bse::ErrorType error = bse_source_check_input (source, ichannel, osource, ochannel);
   BseUndoStack *ustack;
   BseStorage *storage;
 
-  g_return_if_fail (error == BSE_ERROR_NONE);
+  g_return_if_fail (error == Bse::ERROR_NONE);
 
   if (BSE_SOURCE_PRIVATE_INPUTS (source))
     return;
@@ -1803,16 +1803,16 @@ resolve_osource_input (gpointer     data,
                      error);
   else
     {
-      BseErrorType cerror;
+      Bse::ErrorType cerror;
 
       if (!osource)
-       cerror = BSE_ERROR_SOURCE_NO_SUCH_MODULE;
+       cerror = Bse::ERROR_SOURCE_NO_SUCH_MODULE;
       else if (!dinput->ichannel_ident)
-       cerror = BSE_ERROR_SOURCE_NO_SUCH_ICHANNEL;
+       cerror = Bse::ERROR_SOURCE_NO_SUCH_ICHANNEL;
       else if (!dinput->ochannel_ident)
-       cerror = BSE_ERROR_SOURCE_NO_SUCH_OCHANNEL;
+       cerror = Bse::ERROR_SOURCE_NO_SUCH_OCHANNEL;
       else if (BSE_SOURCE_PRIVATE_INPUTS (source))
-        cerror = BSE_ERROR_SOURCE_PRIVATE_ICHANNEL;
+        cerror = Bse::ERROR_SOURCE_PRIVATE_ICHANNEL;
       else
         {
           const gchar *itype = bse_storage_item_get_compat_type (BSE_ITEM (source));
diff --git a/bse/bsesource.hh b/bse/bsesource.hh
index 1d6d016..8e5c4b9 100644
--- a/bse/bsesource.hh
+++ b/bse/bsesource.hh
@@ -127,11 +127,11 @@ guint             bse_source_find_ichannel        (BseSource      *source,
                                                 const gchar    *ichannel_ident);
 guint          bse_source_find_ochannel        (BseSource      *source,
                                                 const gchar    *ochannel_ident);
-BseErrorType   bse_source_set_input            (BseSource      *source,
+Bse::ErrorType bse_source_set_input            (BseSource      *source,
                                                 guint           ichannel,
                                                 BseSource      *osource,
                                                 guint           ochannel);
-BseErrorType   bse_source_unset_input          (BseSource      *source,
+Bse::ErrorType bse_source_unset_input          (BseSource      *source,
                                                 guint           ichannel,
                                                 BseSource      *osource,
                                                 guint           ochannel);
@@ -190,7 +190,7 @@ void                bse_source_access_modules       (BseSource      *source,
                                                 gpointer        data,
                                                 BseFreeFunc     data_free_func,
                                                 BseTrans       *trans);
-BseErrorType    bse_source_check_input          (BseSource      *source,
+Bse::ErrorType    bse_source_check_input          (BseSource      *source,
                                                  guint           ichannel,
                                                  BseSource      *osource,
                                                  guint           ochannel);
@@ -223,7 +223,7 @@ typedef struct {
   guint             midi_channel;
   BseMidiSignalType signal_type;
 } BseAutomationProperty;
-BseErrorType                 bse_source_set_automation_property   (BseSource         *source,
+Bse::ErrorType                 bse_source_set_automation_property   (BseSource         *source,
                                                                    const gchar       *prop_name,
                                                                    guint              midi_channel,
                                                                    BseMidiSignalType  signal_type);
diff --git a/bse/bsesource.proc b/bse/bsesource.proc
index 8e88ce6..cca681d 100644
--- a/bse/bsesource.proc
+++ b/bse/bsesource.proc
@@ -22,7 +22,7 @@ METHOD (BseSource, set-input-by-id) {
   IN   = sfi_pspec_int ("output-channel", "Output Channel", NULL,
                         0, 0, G_MAXINT, 1, SFI_PARAM_STANDARD);
   OUT   = bse_param_spec_genum ("error", "Error", NULL,
-                               BSE_TYPE_ERROR_TYPE, BSE_ERROR_NONE,
+                               BSE_TYPE_ERROR_TYPE, Bse::ERROR_NONE,
                                SFI_PARAM_STANDARD);
 }
 BODY (BseProcedureClass *proc,
@@ -34,22 +34,22 @@ BODY (BseProcedureClass *proc,
   guint ichannel     = sfi_value_get_int (in_values++);
   BseSource *osource = (BseSource*) bse_value_get_object (in_values++);
   guint ochannel     = sfi_value_get_int (in_values++);
-  BseErrorType error;
+  Bse::ErrorType error;
 
   /* check parameters */
   if (!BSE_IS_SOURCE (isource) || !BSE_IS_SOURCE (osource) ||
       BSE_ITEM (isource)->parent != BSE_ITEM (osource)->parent)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* connect */
   error = bse_source_set_input (isource, ichannel, osource, ochannel);
-  if (error == BSE_ERROR_NONE)
+  if (error == Bse::ERROR_NONE)
     bse_item_push_undo_proc (isource, "unset-input-by-id", ichannel, osource, ochannel);
 
   /* set output parameters */
   g_value_set_enum (out_values++, error);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, set-input) {
@@ -63,7 +63,7 @@ METHOD (BseSource, set-input) {
   IN   = sfi_pspec_string ("output-channel", "Output Channel", NULL,
                            NULL, SFI_PARAM_STANDARD);
   OUT   = bse_param_spec_genum ("error", "Error", NULL,
-                               BSE_TYPE_ERROR_TYPE, BSE_ERROR_NONE,
+                               BSE_TYPE_ERROR_TYPE, Bse::ERROR_NONE,
                                SFI_PARAM_STANDARD);
 }
 BODY (BseProcedureClass *proc,
@@ -76,25 +76,25 @@ BODY (BseProcedureClass *proc,
   BseSource *osource = (BseSource*) bse_value_get_object (in_values++);
   const char *ochannel_ident = sfi_value_get_string (in_values++);
   guint ichannel, ochannel;
-  BseErrorType error;
+  Bse::ErrorType error;
 
   /* check parameters */
   if (!BSE_IS_SOURCE (isource) || !BSE_IS_SOURCE (osource) ||
       BSE_ITEM (isource)->parent != BSE_ITEM (osource)->parent ||
       !ichannel_ident || !ochannel_ident)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* connect */
   ichannel = bse_source_find_ichannel (isource, ichannel_ident);
   ochannel = bse_source_find_ochannel (osource, ochannel_ident);
   error = bse_source_set_input (isource, ichannel, osource, ochannel);
-  if (error == BSE_ERROR_NONE)
+  if (error == Bse::ERROR_NONE)
     bse_item_push_undo_proc (isource, "unset-input-by-id", ichannel, osource, ochannel);
 
   /* set output parameters */
   g_value_set_enum (out_values++, error);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, unset-input-by-id) {
@@ -108,7 +108,7 @@ METHOD (BseSource, unset-input-by-id) {
   IN   = sfi_pspec_int ("output-channel", "Output Channel", NULL,
                         0, 0, G_MAXINT, 1, SFI_PARAM_STANDARD);
   OUT   = bse_param_spec_genum ("error", "Error", NULL,
-                               BSE_TYPE_ERROR_TYPE, BSE_ERROR_NONE,
+                               BSE_TYPE_ERROR_TYPE, Bse::ERROR_NONE,
                                SFI_PARAM_STANDARD);
 }
 BODY (BseProcedureClass *proc,
@@ -120,15 +120,15 @@ BODY (BseProcedureClass *proc,
   guint ichannel     = sfi_value_get_int (in_values++);
   BseSource *osource = (BseSource*) bse_value_get_object (in_values++);
   guint ochannel     = sfi_value_get_int (in_values++);
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
 
   /* check parameters */
   if (!BSE_IS_SOURCE (isource) || !BSE_IS_SOURCE (osource))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* disconnect */
   error = bse_source_check_input (isource, ichannel, osource, ochannel);
-  if (error == BSE_ERROR_NONE)
+  if (error == Bse::ERROR_NONE)
     {
       BseUndoStack *ustack = bse_item_undo_open (isource, "unset-input-by-id");
       bse_source_input_backup_to_undo (isource, ichannel, osource, ochannel);
@@ -140,7 +140,7 @@ BODY (BseProcedureClass *proc,
   /* set output parameters */
   g_value_set_enum (out_values++, error);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, unset-input) {
@@ -154,7 +154,7 @@ METHOD (BseSource, unset-input) {
   IN    = sfi_pspec_string ("output-channel", "Output Channel", NULL,
                            NULL, SFI_PARAM_STANDARD);
   OUT   = bse_param_spec_genum ("error", "Error", NULL,
-                               BSE_TYPE_ERROR_TYPE, BSE_ERROR_NONE,
+                               BSE_TYPE_ERROR_TYPE, Bse::ERROR_NONE,
                                SFI_PARAM_STANDARD);
 }
 BODY (BseProcedureClass *proc,
@@ -167,18 +167,18 @@ BODY (BseProcedureClass *proc,
   BseSource *osource = (BseSource*) bse_value_get_object (in_values++);
   const char *ochannel_ident = sfi_value_get_string (in_values++);
   guint ichannel, ochannel;
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
 
   /* check parameters */
   if (!BSE_IS_SOURCE (isource) || !BSE_IS_SOURCE (osource) ||
       !ichannel_ident || !ochannel_ident)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* disconnect */
   ichannel = bse_source_find_ichannel (isource, ichannel_ident);
   ochannel = bse_source_find_ochannel (osource, ochannel_ident);
   error = bse_source_check_input (isource, ichannel, osource, ochannel);
-  if (error == BSE_ERROR_NONE)
+  if (error == Bse::ERROR_NONE)
     {
       BseUndoStack *ustack = bse_item_undo_open (isource, "unset-input-by-id");
       bse_source_input_backup_to_undo (isource, ichannel, osource, ochannel);
@@ -190,7 +190,7 @@ BODY (BseProcedureClass *proc,
   /* set output parameters */
   g_value_set_enum (out_values++, error);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, clear-inputs) {
@@ -208,7 +208,7 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_SOURCE (isource))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* disconnect */
   ustack = bse_item_undo_open (isource, "clear-inputs %s", bse_object_debug_name (isource));
@@ -217,7 +217,7 @@ BODY (BseProcedureClass *proc,
   bse_item_undo_close (ustack);
   bse_source_clear_ichannels (isource);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, clear-outputs) {
@@ -235,7 +235,7 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_SOURCE (isource))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* disconnect */
   ustack = bse_item_undo_open (isource, "clear-outputs %s", bse_object_debug_name (isource));
@@ -244,7 +244,7 @@ BODY (BseProcedureClass *proc,
   bse_item_undo_close (ustack);
   bse_source_clear_ochannels (isource);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, has-output) {
@@ -263,12 +263,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_SOURCE (source))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_bool (out_values++, bse_source_has_output (source, ochannel));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, has-outputs) {
@@ -287,12 +287,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_SOURCE (source))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_bool (out_values++, source->outputs != NULL);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, n-ichannels) {
@@ -311,12 +311,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_SOURCE (source))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_int (out_values++, BSE_SOURCE_N_ICHANNELS (source));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, ichannel-label) {
@@ -338,12 +338,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_SOURCE (source) || ichannel >= BSE_SOURCE_N_ICHANNELS (source))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_string (out_values++, BSE_SOURCE_ICHANNEL_LABEL (source, ichannel));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, ichannel-ident) {
@@ -365,12 +365,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_SOURCE (source) || ichannel >= BSE_SOURCE_N_ICHANNELS (source))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_string (out_values++, BSE_SOURCE_ICHANNEL_IDENT (source, ichannel));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, ichannel-blurb) {
@@ -392,12 +392,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_SOURCE (source) || ichannel >= BSE_SOURCE_N_ICHANNELS (source))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_string (out_values++, BSE_SOURCE_ICHANNEL_BLURB (source, ichannel));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, is-joint-ichannel-by-id) {
@@ -419,12 +419,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_SOURCE (source) || ichannel >= BSE_SOURCE_N_ICHANNELS (source))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_bool (out_values++, BSE_SOURCE_IS_JOINT_ICHANNEL (source, ichannel));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, is-joint-ichannel) {
@@ -447,14 +447,14 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_SOURCE (source) || !ichannel)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   id = bse_source_find_ichannel (source, ichannel);
   sfi_value_set_bool (out_values++,
                      id < BSE_SOURCE_N_ICHANNELS (source) ? BSE_SOURCE_IS_JOINT_ICHANNEL (source, id) : 
FALSE);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, ichannel-get-n-joints) {
@@ -477,7 +477,7 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_SOURCE (source) || ichannel >= BSE_SOURCE_N_ICHANNELS (source))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   input = BSE_SOURCE_INPUT (source, ichannel);
@@ -486,7 +486,7 @@ BODY (BseProcedureClass *proc,
   else
     sfi_value_set_int (out_values++, input->idata.osource ? 1 : 0);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, ichannel-get-ochannel) {
@@ -512,7 +512,7 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_SOURCE (source) || ichannel >= BSE_SOURCE_N_ICHANNELS (source))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   input = BSE_SOURCE_INPUT (source, ichannel);
@@ -523,7 +523,7 @@ BODY (BseProcedureClass *proc,
   else
     sfi_value_set_int (out_values++, G_MAXINT);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, n-ochannels) {
@@ -542,12 +542,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_SOURCE (source))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_int (out_values++, BSE_SOURCE_N_OCHANNELS (source));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, ochannel-label) {
@@ -569,12 +569,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_SOURCE (source) || ochannel >= BSE_SOURCE_N_OCHANNELS (source))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_string (out_values++, BSE_SOURCE_OCHANNEL_LABEL (source, ochannel));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, ochannel-ident) {
@@ -596,12 +596,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_SOURCE (source) || ochannel >= BSE_SOURCE_N_OCHANNELS (source))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_string (out_values++, BSE_SOURCE_OCHANNEL_IDENT (source, ochannel));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, ochannel-blurb) {
@@ -623,12 +623,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_SOURCE (source) || ochannel >= BSE_SOURCE_N_OCHANNELS (source))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_string (out_values++, BSE_SOURCE_OCHANNEL_BLURB (source, ochannel));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, set-pos) {
@@ -657,7 +657,7 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_SOURCE (source) || BSE_DOUBLE_IS_NANINF (xpos) || BSE_DOUBLE_IS_NANINF (ypos))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   if (fabs (xpos - source->pos_x) > epsilon ||
@@ -671,7 +671,7 @@ BODY (BseProcedureClass *proc,
       bse_item_undo_close (ustack);
     }
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, set-automation) {
@@ -684,7 +684,7 @@ METHOD (BseSource, set-automation) {
                          0, 0, BSE_MIDI_MAX_CHANNELS, 1, SFI_PARAM_STANDARD ":scale:unprepared");
   IN    = bse_param_spec_genum ("control_type", _("Control Type"), _("The type of control events used for 
automation"),
                                 BSE_TYPE_MIDI_CONTROL_TYPE, BSE_MIDI_CONTROL_CONTINUOUS_16, 
SFI_PARAM_STANDARD);
-  OUT   = bse_param_spec_genum ("error", "Error", NULL, BSE_TYPE_ERROR_TYPE, BSE_ERROR_NONE, 
SFI_PARAM_STANDARD);
+  OUT   = bse_param_spec_genum ("error", "Error", NULL, BSE_TYPE_ERROR_TYPE, Bse::ERROR_NONE, 
SFI_PARAM_STANDARD);
 }
 BODY (BseProcedureClass *proc,
       const GValue      *in_values,
@@ -695,11 +695,11 @@ BODY (BseProcedureClass *proc,
   const char *property = sfi_value_get_string (in_values++);
   guint      midi_channel = sfi_value_get_int (in_values++);
   BseMidiSignalType control_type = (BseMidiSignalType) g_value_get_enum (in_values++);
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
 
   /* check parameters */
   if (!BSE_IS_SOURCE (source) || !property)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* connect */
   guint old_midi_channel = 0;
@@ -708,14 +708,14 @@ BODY (BseProcedureClass *proc,
   if (old_midi_channel != midi_channel || old_control_type != control_type)
     {
       error = bse_source_set_automation_property (source, property, midi_channel, control_type);
-      if (error == BSE_ERROR_NONE)
+      if (error == Bse::ERROR_NONE)
         bse_item_push_undo_proc (source, "set-automation", property, old_midi_channel, old_control_type);
     }
 
   /* set output parameters */
   g_value_set_enum (out_values++, error);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, get-automation-channel) {
@@ -736,7 +736,7 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_SOURCE (source) || !property)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* connect */
   guint midi_channel = 0;
@@ -744,7 +744,7 @@ BODY (BseProcedureClass *proc,
   /* set output parameters */
   g_value_set_int (out_values++, midi_channel);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, get-automation-control) {
@@ -765,7 +765,7 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_SOURCE (source) || !property)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* connect */
   BseMidiSignalType control_type = BseMidiSignalType (0);
@@ -773,7 +773,7 @@ BODY (BseProcedureClass *proc,
   /* set output parameters */
   g_value_set_enum (out_values++, control_type);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseSource, is-prepared) {
@@ -790,10 +790,10 @@ METHOD (BseSource, is-prepared) {
 
   /* check parameters */
   if (!BSE_IS_SOURCE (source))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_bool (out_values++, BSE_SOURCE_PREPARED (source));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
diff --git a/bse/bsestorage.cc b/bse/bsestorage.cc
index 22438e2..8a31b83 100644
--- a/bse/bsestorage.cc
+++ b/bse/bsestorage.cc
@@ -295,22 +295,22 @@ bse_storage_input_text (BseStorage  *self,
   self->restorable_objects = sfi_ppool_new ();
 }
 
-BseErrorType
+Bse::ErrorType
 bse_storage_input_file (BseStorage  *self,
                         const gchar *file_name)
 {
-  g_return_val_if_fail (BSE_IS_STORAGE (self), BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (file_name != NULL, BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_IS_STORAGE (self), Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (file_name != NULL, Bse::ERROR_INTERNAL);
 
   bse_storage_reset (self);
   self->rstore = sfi_rstore_new_open (file_name);
   if (!self->rstore)
-    return bse_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+    return bse_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
   self->rstore->parser_this = self;
   self->path_table = g_hash_table_new_full (uname_child_hash, uname_child_equals, NULL, uname_child_free);
   self->restorable_objects = sfi_ppool_new ();
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 static GTokenType
@@ -689,7 +689,7 @@ restore_source_automation (BseItem    *item,
   BseMidiControlType control_type = (BseMidiControlType) sfi_choice2enum (scanner->value.v_identifier, 
BSE_TYPE_MIDI_CONTROL_TYPE);
   /* close statement */
   parse_or_return (scanner, ')');
-  BseErrorType error = bse_source_set_automation_property (BSE_SOURCE (item), pspec->name, midi_channel, 
BseMidiSignalType (control_type));
+  Bse::ErrorType error = bse_source_set_automation_property (BSE_SOURCE (item), pspec->name, midi_channel, 
BseMidiSignalType (control_type));
   if (error)
     bse_storage_warn (self, "failed to automate property \"%s\": %s", pspec->name, bse_error_blurb (error));
   return G_TOKEN_NONE;
@@ -1263,7 +1263,7 @@ wstore_data_handle_reader (gpointer data,
   GslLong n;
   if (!wh->opened)
     {
-      BseErrorType error = gsl_data_handle_open (wh->dhandle);
+      Bse::ErrorType error = gsl_data_handle_open (wh->dhandle);
       if (error)
         {
           bse_storage_error (wh->storage, "failed to open data handle: %s", bse_error_blurb (error));
@@ -1566,16 +1566,16 @@ bse_storage_parse_data_handle_rest (BseStorage     *self,
   return parse_data_handle_trampoline (self, TRUE, data_handle_p, n_channels_p, mix_freq_p, osc_freq_p);
 }
 
-BseErrorType
+Bse::ErrorType
 bse_storage_flush_fd (BseStorage *self,
                       gint        fd)
 {
-  g_return_val_if_fail (BSE_IS_STORAGE (self), BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (self->wstore, BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (fd >= 0, BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_IS_STORAGE (self), Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (self->wstore, Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (fd >= 0, Bse::ERROR_INTERNAL);
   bse_storage_break (self);
   gint nerrno = sfi_wstore_flush_fd (self->wstore, fd);
-  return bse_error_from_errno (-nerrno, BSE_ERROR_FILE_WRITE_FAILED);
+  return bse_error_from_errno (-nerrno, Bse::ERROR_FILE_WRITE_FAILED);
 }
 
 void
diff --git a/bse/bsestorage.hh b/bse/bsestorage.hh
index 676fae0..5f1a0e7 100644
--- a/bse/bsestorage.hh
+++ b/bse/bsestorage.hh
@@ -87,7 +87,7 @@ void         bse_storage_prepare_write          (BseStorage             *self,
                                                  BseStorageMode          mode);
 void         bse_storage_turn_readable          (BseStorage             *self,
                                                  const gchar            *storage_name);
-BseErrorType bse_storage_input_file             (BseStorage             *self,
+Bse::ErrorType bse_storage_input_file             (BseStorage             *self,
                                                  const gchar            *file_name);
 void         bse_storage_input_text             (BseStorage             *self,
                                                  const gchar            *text,
@@ -120,7 +120,7 @@ void         bse_storage_put_data_handle        (BseStorage             *self,
                                                  GslDataHandle          *dhandle);
 void         bse_storage_put_xinfos             (BseStorage             *self,
                                                  gchar                 **xinfos);
-BseErrorType bse_storage_flush_fd               (BseStorage             *self,
+Bse::ErrorType bse_storage_flush_fd               (BseStorage             *self,
                                                  gint                    fd);
 
 
diff --git a/bse/bsetrack.cc b/bse/bsetrack.cc
index 84677c6..f41fb90 100644
--- a/bse/bsetrack.cc
+++ b/bse/bsetrack.cc
@@ -579,8 +579,8 @@ bse_track_insert_part (BseTrack *self,
 {
   BseTrackEntry *entry;
 
-  g_return_val_if_fail (BSE_IS_TRACK (self), BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (BSE_IS_PART (part), BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_IS_TRACK (self), Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_IS_PART (part), Bse::ERROR_INTERNAL);
 
   entry = track_lookup_entry (self, tick);
   if (entry && entry->tick == tick)
diff --git a/bse/bsetrack.proc b/bse/bsetrack.proc
index 7690d8a..d6fe943 100644
--- a/bse/bsetrack.proc
+++ b/bse/bsetrack.proc
@@ -38,7 +38,7 @@ BODY (BseProcedureClass *proc,
   if (!BSE_IS_TRACK (self) || !BSE_IS_PART (part) ||
       !BSE_ITEM (self)->parent ||
       BSE_ITEM (self)->parent != BSE_ITEM (part)->parent)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   id = bse_track_insert_part (self, tick, part);
@@ -51,7 +51,7 @@ BODY (BseProcedureClass *proc,
   /* set output parameters */
   g_value_set_int (out_values++, id);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseTrack, remove-tick) {
@@ -72,7 +72,7 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_TRACK (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   entry = bse_track_lookup_tick (self, tick);
@@ -82,7 +82,7 @@ BODY (BseProcedureClass *proc,
       bse_track_remove_tick (self, tick);
     }
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseTrack, remove-link) {
@@ -103,16 +103,16 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_TRACK (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
   entry = bse_track_find_link (self, id);
   if (!entry)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   bse_item_push_undo_proc (self, "insert-part", entry->tick, entry->part);
   bse_track_remove_tick (self, entry->tick);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseTrack, list-parts) {
@@ -131,12 +131,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_TRACK (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   bse_value_take_boxed (out_values++, bse_track_list_parts (self));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseTrack, list-parts-uniq) {
@@ -155,7 +155,7 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_TRACK (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   BseTrackPartSeq *tpseq = bse_track_list_parts (self);
@@ -169,7 +169,7 @@ BODY (BseProcedureClass *proc,
   bse_value_take_boxed (out_values++, bse_item_seq_from_ring (ring));
   sfi_ring_free (ring);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseTrack, get-part) {
@@ -192,13 +192,13 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_TRACK (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   entry = bse_track_lookup_tick (self, tick);
   bse_value_set_object (out_values++, entry ? entry->part : NULL);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseTrack, get-timing) {
@@ -218,7 +218,7 @@ METHOD (BseTrack, get-timing) {
 
   /* check parameters */
   if (!BSE_IS_TRACK (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   parent = BSE_ITEM (self)->parent;
@@ -230,7 +230,7 @@ METHOD (BseTrack, get-timing) {
   /* set output parameters */
   bse_value_set_boxed (out_values++, &timing);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseTrack, get-output-source) {
@@ -250,7 +250,7 @@ METHOD (BseTrack, get-output-source) {
 
   /* check parameters */
   if (!BSE_IS_TRACK (track))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   child = bse_track_get_output (track);
@@ -258,7 +258,7 @@ METHOD (BseTrack, get-output-source) {
   /* set output parameters */
   bse_value_set_object (out_values++, child);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseTrack, get-last-tick) {
@@ -276,12 +276,12 @@ METHOD (BseTrack, get-last-tick) {
 
   /* check parameters */
   if (!BSE_IS_TRACK (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_int (out_values++, bse_track_get_last_tick (self));
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseTrack, ensure-output) {
@@ -289,18 +289,18 @@ METHOD (BseTrack, ensure-output) {
   IN    = bse_param_spec_object ("track", "Track", NULL,
                                  BSE_TYPE_TRACK, SFI_PARAM_STANDARD);
   OUT   = bse_param_spec_genum ("error", NULL, NULL,
-                                BSE_TYPE_ERROR_TYPE, BSE_ERROR_NONE, SFI_PARAM_STANDARD);
+                                BSE_TYPE_ERROR_TYPE, Bse::ERROR_NONE, SFI_PARAM_STANDARD);
 } BODY (BseProcedureClass *proc,
         const GValue      *in_values,
         GValue            *out_values)
 {
   /* extract parameter values */
   BseTrack *self = (BseTrack*) bse_value_get_object (in_values++);
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
 
   /* check parameters */
   if (!BSE_IS_TRACK (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   BseItem *parent = BSE_ITEM (self)->parent;
@@ -319,5 +319,5 @@ METHOD (BseTrack, ensure-output) {
   /* set output parameters */
   g_value_set_enum (out_values++, error);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
diff --git a/bse/bsewave.cc b/bse/bsewave.cc
index 777a92b..3cd0dc6 100644
--- a/bse/bsewave.cc
+++ b/bse/bsewave.cc
@@ -126,12 +126,12 @@ bse_wave_finalize (GObject *object)
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }
 
-static BseErrorType
+static Bse::ErrorType
 bse_wave_add_inlined_wave_chunk (BseWave      *self,
                                  GslWaveChunk *wchunk)
 {
-  g_return_val_if_fail (BSE_IS_WAVE (self), BSE_ERROR_INTERNAL);
-  BseErrorType error = gsl_data_handle_open (wchunk->dcache->dhandle);
+  g_return_val_if_fail (BSE_IS_WAVE (self), Bse::ERROR_INTERNAL);
+  Bse::ErrorType error = gsl_data_handle_open (wchunk->dcache->dhandle);
   if (!error)
     self->open_handles = sfi_ring_append (self->open_handles, wchunk->dcache->dhandle);
   return error;
@@ -244,7 +244,7 @@ bse_wave_clear (BseWave *wave)
   wave->xinfos = NULL;
 }
 
-BseErrorType
+Bse::ErrorType
 bse_wave_load_wave_file (BseWave      *self,
                         const gchar  *file_name,
                         const gchar  *wave_name,
@@ -252,10 +252,10 @@ bse_wave_load_wave_file (BseWave      *self,
                         BseFreqArray *skip_array,
                          gboolean      rename_wave)
 {
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
 
-  g_return_val_if_fail (BSE_IS_WAVE (self), BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (file_name != NULL, BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (BSE_IS_WAVE (self), Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (file_name != NULL, Bse::ERROR_INTERNAL);
 
   bse_wave_clear (self);
 
@@ -304,7 +304,7 @@ bse_wave_load_wave_file (BseWave      *self,
              for (i = 0; i < wdsc->n_chunks; i++)
                if (bse_freq_arrays_match_freq (wdsc->chunks[i].osc_freq, list_array, skip_array))
                  {
-                   BseErrorType tmp_error;
+                   Bse::ErrorType tmp_error;
                    GslWaveChunk *wchunk = bse_wave_chunk_create (wdsc, i, &tmp_error);
                    if (wchunk)
                       bse_wave_add_chunk (self, wchunk);
@@ -327,17 +327,17 @@ bse_wave_load_wave_file (BseWave      *self,
              bse_wave_dsc_free (wdsc);
            }
           else if (wdsc)
-            error = BSE_ERROR_FILE_EMPTY;
+            error = Bse::ERROR_FILE_EMPTY;
        }
       else
-       error = BSE_ERROR_FILE_NOT_FOUND;
+       error = Bse::ERROR_FILE_NOT_FOUND;
       bse_wave_file_info_unref (fi);
     }
   else
     {
       error = gsl_file_check (file_name, "fr");
       if (!error)
-       error = BSE_ERROR_FILE_OPEN_FAILED;
+       error = Bse::ERROR_FILE_OPEN_FAILED;
     }
   return error;
 }
@@ -370,7 +370,7 @@ bse_wave_store_private (BseObject  *object,
       for (ring = wave->wave_chunks; ring; ring = sfi_ring_walk (ring, wave->wave_chunks))
         {
           GslWaveChunk *wchunk = (GslWaveChunk*) ring->data;
-          BseErrorType error = gsl_data_handle_open (wchunk->dcache->dhandle);
+          Bse::ErrorType error = gsl_data_handle_open (wchunk->dcache->dhandle);
           if (error)
             {
               bse_storage_warn (storage, "failed to open data handle (%s): %s",
@@ -514,7 +514,7 @@ bse_wave_restore_private (BseObject  *object,
     {
       BseFreqArray *skip_list, *load_list, *array;
       gchar *file_name, *wave_name;
-      BseErrorType error;
+      Bse::ErrorType error;
 
       g_scanner_get_next_token (scanner); /* eat quark identifier */
       parse_or_return (scanner, G_TOKEN_STRING);
@@ -656,7 +656,7 @@ bse_wave_restore_private (BseObject  *object,
                                                      loop_type, loop_start, loop_end, loop_count);
          gsl_data_cache_unref (dcache);
           /* we need to keep inlined data handles open to protect against storage (.bse file) overwriting */
-          BseErrorType error = bse_wave_add_inlined_wave_chunk (wave, wchunk);
+          Bse::ErrorType error = bse_wave_add_inlined_wave_chunk (wave, wchunk);
           if (!error)
             bse_wave_add_chunk (wave, wchunk);
           else
@@ -701,7 +701,7 @@ bse_wave_get_index_for_modules (BseWave *wave)
       SfiRing *ring;
       for (ring = wave->wave_chunks; ring; ring = sfi_ring_walk (ring, wave->wave_chunks))
        {
-         BseErrorType error = gsl_wave_chunk_open ((GslWaveChunk*) ring->data);
+         Bse::ErrorType error = gsl_wave_chunk_open ((GslWaveChunk*) ring->data);
          if (!error)
             {
               index->entries[index->n_entries].wchunk = (GslWaveChunk*) ring->data;
diff --git a/bse/bsewave.hh b/bse/bsewave.hh
index 674fa93..5ee966d 100644
--- a/bse/bsewave.hh
+++ b/bse/bsewave.hh
@@ -43,7 +43,7 @@ struct BseWaveClass : BseSourceClass
 {};
 
 void           bse_wave_clear                  (BseWave        *wave);
-BseErrorType   bse_wave_load_wave_file         (BseWave        *wave,
+Bse::ErrorType bse_wave_load_wave_file         (BseWave        *wave,
                                                 const gchar    *file_name,
                                                 const gchar    *wave_name,
                                                 BseFreqArray   *list_array,
diff --git a/bse/bsewave.proc b/bse/bsewave.proc
index de596a4..64012a7 100644
--- a/bse/bsewave.proc
+++ b/bse/bsewave.proc
@@ -18,7 +18,7 @@ METHOD (BseWave, load-wave) {
   IN    = sfi_pspec_string ("wave_name", "Wave Name", "The name of the wave to read wave chunks from",
                            NULL, SFI_PARAM_STANDARD);
   OUT   = bse_param_spec_genum ("error", "Error", "BSE error type",
-                               BSE_TYPE_ERROR_TYPE, BSE_ERROR_NONE,
+                               BSE_TYPE_ERROR_TYPE, Bse::ERROR_NONE,
                                SFI_PARAM_STANDARD);
 }
 BODY (BseProcedureClass *proc,
@@ -29,18 +29,18 @@ BODY (BseProcedureClass *proc,
   BseWave *wave = (BseWave*) bse_value_get_object (in_values++);
   const char *file_name = sfi_value_get_string (in_values++);
   const char *wave_name = sfi_value_get_string (in_values++);
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
 
   /* check parameters */
   if (!BSE_IS_WAVE (wave) || !file_name || !wave_name)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   error = bse_wave_load_wave_file (wave, file_name, wave_name, NULL, NULL, TRUE);
 
   /* set output parameters */
   g_value_set_enum (out_values++, error);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseWave, n-wave-chunks) {
@@ -59,12 +59,12 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_WAVE (wave))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* set output parameters */
   sfi_value_set_int (out_values++, wave->n_wchunks);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseWave, use-editable) {
@@ -88,7 +88,7 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_WAVE (wave))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   wchunk = (GslWaveChunk*) sfi_ring_nth_data (wave->wave_chunks, chunk_index);
   if (wchunk)
@@ -102,7 +102,7 @@ BODY (BseProcedureClass *proc,
   /* set output parameters */
   bse_value_set_object (out_values++, esample);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseWave, chunk-get-osc-freq) {
@@ -126,13 +126,13 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_WAVE (wave))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   wchunk = (GslWaveChunk*) sfi_ring_nth_data (wave->wave_chunks, chunk_index);
   if (wchunk)
     sfi_value_set_real (out_values++, wchunk->osc_freq);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseWave, chunk-get-mix-freq) {
@@ -156,11 +156,11 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!BSE_IS_WAVE (wave))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   wchunk = (GslWaveChunk*) sfi_ring_nth_data (wave->wave_chunks, chunk_index);
   if (wchunk)
     sfi_value_set_real (out_values++, wchunk->mix_freq);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
diff --git a/bse/bsewaveosc.cc b/bse/bsewaveosc.cc
index 3990e79..52e462c 100644
--- a/bse/bsewaveosc.cc
+++ b/bse/bsewaveosc.cc
@@ -182,7 +182,7 @@ bse_wave_osc_set_from_esample (BseWaveOsc        *self,
     {
       g_return_if_fail (BSE_EDITABLE_SAMPLE (esample));
 
-      if (esample->wchunk && gsl_wave_chunk_open (esample->wchunk) == BSE_ERROR_NONE)
+      if (esample->wchunk && gsl_wave_chunk_open (esample->wchunk) == Bse::ERROR_NONE)
         {
           self->esample_wchunk = esample->wchunk;
           bse_wave_osc_update_config_wchunk (self);
diff --git a/bse/bsewaveosc.proc b/bse/bsewaveosc.proc
index 77f35d0..80f4b01 100644
--- a/bse/bsewaveosc.proc
+++ b/bse/bsewaveosc.proc
@@ -22,11 +22,11 @@ METHOD (BseWaveOsc, request-pcm-position) {
 
   /* check parameters */
   if (!BSE_IS_WAVE_OSC (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   bse_wave_osc_request_pcm_position (self);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 PROCEDURE (bse-wave-osc-mass-seek-perc, "Seek Wave Oscillators") {
@@ -46,13 +46,13 @@ PROCEDURE (bse-wave-osc-mass-seek-perc, "Seek Wave Oscillators") {
   BseWaveOsc **woscs = (BseWaveOsc**) g_alloca (sizeof (BseWaveOsc*) * n);
   for (i = 0; i < n; i++)
     if (!BSE_IS_WAVE_OSC (iseq->items[i]))      /* check parameters */
-      return BSE_ERROR_PROC_PARAM_INVAL;
+      return Bse::ERROR_PROC_PARAM_INVAL;
     else
       woscs[i] = (BseWaveOsc*) iseq->items[i];
   if (n)
     bse_wave_osc_mass_seek (n, woscs, pos);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseWaveOsc, set-from-editable-sample) {
@@ -71,9 +71,9 @@ METHOD (BseWaveOsc, set-from-editable-sample) {
 
   /* check parameters */
   if (!BSE_IS_WAVE_OSC (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   bse_wave_osc_set_from_esample (self, esample);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
diff --git a/bse/bsewaverepo.proc b/bse/bsewaverepo.proc
index 607ceed..c7571bc 100644
--- a/bse/bsewaverepo.proc
+++ b/bse/bsewaverepo.proc
@@ -13,7 +13,7 @@
 
 
 /* --- auxlillary functions --- */
-static BseErrorType
+static Bse::ErrorType
 load_file (BseWaveRepo *wrepo,
           const gchar *file_name,
            BseWave    **wave_p)
@@ -21,17 +21,17 @@ load_file (BseWaveRepo *wrepo,
   gchar *fname = g_path_get_basename (file_name);
   BseWave *wave = (BseWave*) bse_object_new (BSE_TYPE_WAVE, "uname", fname, NULL);
   g_free (fname);
-  BseErrorType error = bse_wave_load_wave_file (wave, file_name, NULL, NULL, NULL, TRUE);
+  Bse::ErrorType error = bse_wave_load_wave_file (wave, file_name, NULL, NULL, NULL, TRUE);
   if (wave->n_wchunks)
     {
       bse_container_add_item (BSE_CONTAINER (wrepo), BSE_ITEM (wave));
       *wave_p = wave;
-      error = BSE_ERROR_NONE;
+      error = Bse::ERROR_NONE;
     }
   else
     {
       if (!error)
-        error = BSE_ERROR_WAVE_NOT_FOUND;
+        error = Bse::ERROR_WAVE_NOT_FOUND;
       *wave_p = NULL;
     }
   g_object_unref (wave);
@@ -51,7 +51,7 @@ METHOD (BseWaveRepo, load-file) {
   IN   = sfi_pspec_string ("file_name", "File Name", "The file to import waves from",
                            NULL, SFI_PARAM_STANDARD);
   OUT   = bse_param_spec_genum ("error", "Error", NULL,
-                               BSE_TYPE_ERROR_TYPE, BSE_ERROR_NONE,
+                               BSE_TYPE_ERROR_TYPE, Bse::ERROR_NONE,
                                SFI_PARAM_STANDARD);
 }
 BODY (BseProcedureClass *proc,
@@ -62,12 +62,12 @@ BODY (BseProcedureClass *proc,
   BseWaveRepo *self = (BseWaveRepo*) bse_value_get_object (in_values++);
   const char *file_name = sfi_value_get_string (in_values++);
   BseUndoStack *ustack;
-  BseErrorType error;
+  Bse::ErrorType error;
   BseWave *wave;
 
   /* check parameters */
   if (!BSE_IS_WAVE_REPO (self) || !file_name)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   ustack = bse_item_undo_open (self, "load-wave");
   error = load_file (self, file_name, &wave);
@@ -78,7 +78,7 @@ BODY (BseProcedureClass *proc,
   /* set output parameters */
   g_value_set_enum (out_values++, error);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 METHOD (BseWaveRepo, remove-wave) {
@@ -99,7 +99,7 @@ METHOD (BseWaveRepo, remove-wave) {
   /* check parameters */
   if (!BSE_IS_WAVE_REPO (self) || !BSE_IS_WAVE (child) ||
       child->parent != BSE_ITEM (self))
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* action */
   ustack = bse_item_undo_open (self, "remove-wave %s", bse_object_debug_name (child));
@@ -112,7 +112,7 @@ METHOD (BseWaveRepo, remove-wave) {
   /* done */
   bse_item_undo_close (ustack);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 PROCEDURE (bse-sample-file-info, "Sample File Info") {
@@ -132,19 +132,19 @@ BODY (BseProcedureClass *proc,
 
   /* check parameters */
   if (!filename)
-    return BSE_ERROR_PROC_PARAM_INVAL;
+    return Bse::ERROR_PROC_PARAM_INVAL;
 
   /* construct info */
   BseSampleFileInfo info = { 0, };
   info.file = (char*) filename;
   info.waves = bse_string_seq_new ();
   if (stat (filename, &sbuf) < 0)
-    info.error = bse_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+    info.error = bse_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
   else
     {
       info.size = sbuf.st_size;
       info.mtime = sbuf.st_mtime * SFI_USEC_FACTOR;
-      wfi = bse_wave_file_info_load (filename, (BseErrorType*) &info.error);
+      wfi = bse_wave_file_info_load (filename, (Bse::ErrorType*) &info.error);
       if (wfi)
        {
          guint i;
@@ -162,5 +162,5 @@ BODY (BseProcedureClass *proc,
   if (wfi)
     bse_wave_file_info_unref (wfi);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
diff --git a/bse/gslcommon.cc b/bse/gslcommon.cc
index a44f2c3..c1b8b28 100644
--- a/bse/gslcommon.cc
+++ b/bse/gslcommon.cc
@@ -194,46 +194,46 @@ gsl_byte_order_from_string (const gchar *string)
   return 0;
 }
 
-BseErrorType
+Bse::ErrorType
 gsl_file_check (const gchar *file_name,
                const gchar *mode)
 {
   if (birnet_file_check (file_name, mode))
-    return BSE_ERROR_NONE;
-  return gsl_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+    return Bse::ERROR_NONE;
+  return gsl_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
 }
 
-BseErrorType
+Bse::ErrorType
 gsl_error_from_errno (gint         sys_errno,
-                     BseErrorType fallback)
+                     Bse::ErrorType fallback)
 {
   switch (sys_errno)
     {
-    case 0:             return BSE_ERROR_NONE;
+    case 0:             return Bse::ERROR_NONE;
     case ELOOP:
     case ENAMETOOLONG:
-    case ENOENT:        return BSE_ERROR_FILE_NOT_FOUND;
-    case EISDIR:        return BSE_ERROR_FILE_IS_DIR;
+    case ENOENT:        return Bse::ERROR_FILE_NOT_FOUND;
+    case EISDIR:        return Bse::ERROR_FILE_IS_DIR;
     case EROFS:
     case EPERM:
-    case EACCES:        return BSE_ERROR_PERMS;
+    case EACCES:        return Bse::ERROR_PERMS;
 #ifdef ENODATA  /* GNU/kFreeBSD lacks this */
     case ENODATA:
 #endif
-    case ENOMSG:        return BSE_ERROR_FILE_EOF;
-    case ENOMEM:       return BSE_ERROR_NO_MEMORY;
-    case ENOSPC:       return BSE_ERROR_NO_SPACE;
-    case ENFILE:       return BSE_ERROR_NO_FILES;
-    case EMFILE:       return BSE_ERROR_MANY_FILES;
+    case ENOMSG:        return Bse::ERROR_FILE_EOF;
+    case ENOMEM:       return Bse::ERROR_NO_MEMORY;
+    case ENOSPC:       return Bse::ERROR_NO_SPACE;
+    case ENFILE:       return Bse::ERROR_NO_FILES;
+    case EMFILE:       return Bse::ERROR_MANY_FILES;
     case EFBIG:
     case ESPIPE:
-    case EIO:           return BSE_ERROR_IO;
-    case EEXIST:        return BSE_ERROR_FILE_EXISTS;
+    case EIO:           return Bse::ERROR_IO;
+    case EEXIST:        return Bse::ERROR_FILE_EXISTS;
     case ETXTBSY:
-    case EBUSY:         return BSE_ERROR_FILE_BUSY;
+    case EBUSY:         return Bse::ERROR_FILE_BUSY;
     case EAGAIN:
-    case EINTR:                return BSE_ERROR_TEMP;
-    case EFAULT:        return BSE_ERROR_INTERNAL;
+    case EINTR:                return Bse::ERROR_TEMP;
+    case EFAULT:        return Bse::ERROR_INTERNAL;
     case EBADF:
     case ENOTDIR:
     case ENODEV:
@@ -243,16 +243,16 @@ gsl_error_from_errno (gint         sys_errno,
 }
 
 static guint
-score_error (BseErrorType error)
+score_error (Bse::ErrorType error)
 {
   /* errors are sorted by increasing descriptiveness */
-  static const BseErrorType error_score[] = {
-    BSE_ERROR_NONE /* least descriptive, indicates 0-initialized error variable */,
-    BSE_ERROR_UNKNOWN, BSE_ERROR_INTERNAL, BSE_ERROR_TEMP,
-    BSE_ERROR_IO, BSE_ERROR_FILE_EOF,
-    BSE_ERROR_FILE_OPEN_FAILED, BSE_ERROR_FILE_SEEK_FAILED,
-    BSE_ERROR_FILE_READ_FAILED, BSE_ERROR_FILE_WRITE_FAILED,
-    BSE_ERROR_FILE_NOT_FOUND, BSE_ERROR_WAVE_NOT_FOUND,
+  static const Bse::ErrorType error_score[] = {
+    Bse::ERROR_NONE /* least descriptive, indicates 0-initialized error variable */,
+    Bse::ERROR_UNKNOWN, Bse::ERROR_INTERNAL, Bse::ERROR_TEMP,
+    Bse::ERROR_IO, Bse::ERROR_FILE_EOF,
+    Bse::ERROR_FILE_OPEN_FAILED, Bse::ERROR_FILE_SEEK_FAILED,
+    Bse::ERROR_FILE_READ_FAILED, Bse::ERROR_FILE_WRITE_FAILED,
+    Bse::ERROR_FILE_NOT_FOUND, Bse::ERROR_WAVE_NOT_FOUND,
   };
   guint i;
   for (i = 0; i < G_N_ELEMENTS (error_score); i++)
@@ -261,12 +261,12 @@ score_error (BseErrorType error)
   return i;
 }
 
-BseErrorType
+Bse::ErrorType
 gsl_error_select (guint           n_errors,
-                  BseErrorType    first_error,
+                  Bse::ErrorType    first_error,
                   ...)
 {
-  BseErrorType *errors = g_new (BseErrorType, MAX (1, n_errors));
+  Bse::ErrorType *errors = g_new (Bse::ErrorType, MAX (1, n_errors));
   va_list args;
   guint i, score;
   /* function used to select a descriptive error in
@@ -276,12 +276,12 @@ gsl_error_select (guint           n_errors,
   for (i = 0; i < n_errors; i++)
     {
       if (i)
-        first_error = (BseErrorType) va_arg (args, int); // BseErrorType
+        first_error = (Bse::ErrorType) va_arg (args, int); // Bse::ErrorType
       errors[i] = first_error;
     }
   va_end (args);
   /* grab first error, unless followed by an error with higher score */
-  BseErrorType e = errors[0];
+  Bse::ErrorType e = errors[0];
   score = score_error (e);
   for (i = 1; i < n_errors; i++)
     {
diff --git a/bse/gslcommon.hh b/bse/gslcommon.hh
index 8f21abb..2add5e8 100644
--- a/bse/gslcommon.hh
+++ b/bse/gslcommon.hh
@@ -10,12 +10,12 @@ void                        gsl_init        (void);
 /* --- misc --- */
 const gchar* gsl_byte_order_to_string   (guint           byte_order);
 guint        gsl_byte_order_from_string (const gchar    *string);
-BseErrorType gsl_error_from_errno      (gint            sys_errno,
-                                        BseErrorType    fallback);
-BseErrorType gsl_error_select           (guint           n_errors,
-                                         BseErrorType    first_error,
+Bse::ErrorType gsl_error_from_errno    (gint            sys_errno,
+                                        Bse::ErrorType  fallback);
+Bse::ErrorType gsl_error_select           (guint           n_errors,
+                                         Bse::ErrorType    first_error,
                                          ...);
-BseErrorType gsl_file_check            (const gchar    *file_name,
+Bse::ErrorType gsl_file_check          (const gchar    *file_name,
                                         const gchar    *mode);
 
 
diff --git a/bse/gsldatacache.cc b/bse/gsldatacache.cc
index 95498df..f8e58c1 100644
--- a/bse/gsldatacache.cc
+++ b/bse/gsldatacache.cc
@@ -94,7 +94,7 @@ gsl_data_cache_open (GslDataCache *dcache)
   dcache->mutex.lock();
   if (!dcache->open_count)
     {
-      BseErrorType error;
+      Bse::ErrorType error;
       error = gsl_data_handle_open (dcache->dhandle);
       if (error)
        {
diff --git a/bse/gsldatahandle-mad.cc b/bse/gsldatahandle-mad.cc
index f61f297..71e5b7b 100644
--- a/bse/gsldatahandle-mad.cc
+++ b/bse/gsldatahandle-mad.cc
@@ -41,7 +41,7 @@ typedef struct
   guint         eof : 1;
   GslHFile     *hfile;
   guint                file_pos;
-  BseErrorType  error;
+  Bse::ErrorType  error;
 
   /* seek table */
   GTime                seek_mtime;
@@ -68,34 +68,34 @@ static GslLong      dh_mad_coarse_seek      (GslDataHandle *dhandle,
 
 
 /* --- functions --- */
-static BseErrorType
+static Bse::ErrorType
 error_from_mad_stream (struct mad_stream *mstream,
-                       BseErrorType       fallback)
+                       Bse::ErrorType       fallback)
 {
   switch (mstream->error)
     {
-    case MAD_ERROR_NONE:                return BSE_ERROR_NONE;
-    case MAD_ERROR_BUFLEN:              return BSE_ERROR_FILE_EOF;
+    case MAD_ERROR_NONE:                return Bse::ERROR_NONE;
+    case MAD_ERROR_BUFLEN:              return Bse::ERROR_FILE_EOF;
     case MAD_ERROR_BUFPTR:              return fallback;
-    case MAD_ERROR_NOMEM:               return BSE_ERROR_NO_MEMORY;
-    case MAD_ERROR_LOSTSYNC:            return BSE_ERROR_DATA_CORRUPT;
-    case MAD_ERROR_BADLAYER:            return BSE_ERROR_FORMAT_UNKNOWN;
-    case MAD_ERROR_BADBITRATE:          return BSE_ERROR_FORMAT_INVALID;
-    case MAD_ERROR_BADSAMPLERATE:       return BSE_ERROR_FORMAT_INVALID;
-    case MAD_ERROR_BADEMPHASIS:         return BSE_ERROR_FORMAT_INVALID;
-    case MAD_ERROR_BADCRC:              return BSE_ERROR_DATA_CORRUPT;
-    case MAD_ERROR_BADBITALLOC:         return BSE_ERROR_FORMAT_INVALID;
-    case MAD_ERROR_BADSCALEFACTOR:      return BSE_ERROR_FORMAT_INVALID;
-    case MAD_ERROR_BADMODE:             return BSE_ERROR_FORMAT_INVALID;
-    case MAD_ERROR_BADFRAMELEN:         return BSE_ERROR_FORMAT_INVALID;
-    case MAD_ERROR_BADBIGVALUES:        return BSE_ERROR_FORMAT_INVALID;
-    case MAD_ERROR_BADBLOCKTYPE:        return BSE_ERROR_FORMAT_UNKNOWN;
-    case MAD_ERROR_BADSCFSI:            return BSE_ERROR_FORMAT_INVALID;
-    case MAD_ERROR_BADDATAPTR:          return BSE_ERROR_FORMAT_INVALID;
-    case MAD_ERROR_BADPART3LEN:         return BSE_ERROR_FORMAT_INVALID;
-    case MAD_ERROR_BADHUFFTABLE:        return BSE_ERROR_FORMAT_INVALID;
-    case MAD_ERROR_BADHUFFDATA:         return BSE_ERROR_DATA_CORRUPT;
-    case MAD_ERROR_BADSTEREO:           return BSE_ERROR_FORMAT_INVALID;
+    case MAD_ERROR_NOMEM:               return Bse::ERROR_NO_MEMORY;
+    case MAD_ERROR_LOSTSYNC:            return Bse::ERROR_DATA_CORRUPT;
+    case MAD_ERROR_BADLAYER:            return Bse::ERROR_FORMAT_UNKNOWN;
+    case MAD_ERROR_BADBITRATE:          return Bse::ERROR_FORMAT_INVALID;
+    case MAD_ERROR_BADSAMPLERATE:       return Bse::ERROR_FORMAT_INVALID;
+    case MAD_ERROR_BADEMPHASIS:         return Bse::ERROR_FORMAT_INVALID;
+    case MAD_ERROR_BADCRC:              return Bse::ERROR_DATA_CORRUPT;
+    case MAD_ERROR_BADBITALLOC:         return Bse::ERROR_FORMAT_INVALID;
+    case MAD_ERROR_BADSCALEFACTOR:      return Bse::ERROR_FORMAT_INVALID;
+    case MAD_ERROR_BADMODE:             return Bse::ERROR_FORMAT_INVALID;
+    case MAD_ERROR_BADFRAMELEN:         return Bse::ERROR_FORMAT_INVALID;
+    case MAD_ERROR_BADBIGVALUES:        return Bse::ERROR_FORMAT_INVALID;
+    case MAD_ERROR_BADBLOCKTYPE:        return Bse::ERROR_FORMAT_UNKNOWN;
+    case MAD_ERROR_BADSCFSI:            return Bse::ERROR_FORMAT_INVALID;
+    case MAD_ERROR_BADDATAPTR:          return Bse::ERROR_FORMAT_INVALID;
+    case MAD_ERROR_BADPART3LEN:         return Bse::ERROR_FORMAT_INVALID;
+    case MAD_ERROR_BADHUFFTABLE:        return Bse::ERROR_FORMAT_INVALID;
+    case MAD_ERROR_BADHUFFDATA:         return Bse::ERROR_DATA_CORRUPT;
+    case MAD_ERROR_BADSTEREO:           return Bse::ERROR_FORMAT_INVALID;
     default:                            return fallback;
     }
 }
@@ -180,7 +180,7 @@ read_next_frame_header (MadHandle *handle)
          /* read on */
          if (!stream_read (handle))
            {
-             handle->error = handle->eof ? BSE_ERROR_NONE : gsl_error_from_errno (errno, BSE_ERROR_FILE_EOF);
+             handle->error = handle->eof ? Bse::ERROR_NONE : gsl_error_from_errno (errno, 
Bse::ERROR_FILE_EOF);
              return FALSE;
            }
          return read_next_frame_header (handle);       /* retry */
@@ -192,7 +192,7 @@ read_next_frame_header (MadHandle *handle)
       succeeded = FALSE;
     }
 
-  handle->error = handle->stream.error ? error_from_mad_stream (&handle->stream, BSE_ERROR_FILE_SEEK_FAILED) 
: BSE_ERROR_NONE;
+  handle->error = handle->stream.error ? error_from_mad_stream (&handle->stream, 
Bse::ERROR_FILE_SEEK_FAILED) : Bse::ERROR_NONE;
 
   return succeeded;
 }
@@ -216,7 +216,7 @@ pcm_frame_read (MadHandle *handle,
          /* read on */
          if (!stream_read (handle))
            {
-             handle->error = handle->eof ? BSE_ERROR_NONE : gsl_error_from_errno (errno, 
BSE_ERROR_FILE_READ_FAILED);
+             handle->error = handle->eof ? Bse::ERROR_NONE : gsl_error_from_errno (errno, 
Bse::ERROR_FILE_READ_FAILED);
              return FALSE;
            }
          return pcm_frame_read (handle, synth);        /* retry */
@@ -235,9 +235,9 @@ pcm_frame_read (MadHandle *handle,
     mad_synth_frame (&handle->synth, &handle->frame);
 
   if (!succeeded && handle->stream.error)
-    handle->error = error_from_mad_stream (&handle->stream, BSE_ERROR_FILE_READ_FAILED);
+    handle->error = error_from_mad_stream (&handle->stream, Bse::ERROR_FILE_READ_FAILED);
   else
-    handle->error = BSE_ERROR_NONE;
+    handle->error = Bse::ERROR_NONE;
   return succeeded;
 }
 
@@ -302,7 +302,7 @@ create_seek_table (MadHandle *handle,
          g_free (seeks);
          /* frame read failed for a reason other than eof */
           if (!handle->error)
-            handle->error = BSE_ERROR_IO;
+            handle->error = Bse::ERROR_IO;
          MDEBUG ("failed to read seektable frame: %s", handle->stream.error ? mad_stream_errorstr 
(&handle->stream) : bse_error_blurb (handle->error));
          return NULL;
        }
@@ -322,7 +322,7 @@ create_seek_table (MadHandle *handle,
   return seeks;
 }
 
-static BseErrorType
+static Bse::ErrorType
 dh_mad_open (GslDataHandle      *dhandle,
             GslDataHandleSetup *setup)
 {
@@ -330,11 +330,11 @@ dh_mad_open (GslDataHandle      *dhandle,
   GslHFile *hfile;
   GslLong n;
   gboolean seek_invalidated = FALSE;
-  BseErrorType error;
+  Bse::ErrorType error;
 
   hfile = gsl_hfile_open (handle->dhandle.name);
   if (!hfile)
-    return gsl_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+    return gsl_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
   handle->hfile = hfile;
 
   seek_invalidated |= handle->seek_mtime != hfile->mtime;
@@ -352,7 +352,7 @@ dh_mad_open (GslDataHandle      *dhandle,
   /* fetch first frame */
   if (!read_next_frame_header (handle))
     {
-      error = BSE_ERROR_NO_HEADER;
+      error = Bse::ERROR_NO_HEADER;
       goto OPEN_FAILED;
     }
 
@@ -368,7 +368,7 @@ dh_mad_open (GslDataHandle      *dhandle,
       handle->frame_size < 1 ||
       handle->sample_rate < 1)
     {
-      error = BSE_ERROR_FORMAT_INVALID;
+      error = Bse::ERROR_FORMAT_INVALID;
       goto OPEN_FAILED;
     }
 
@@ -394,7 +394,7 @@ dh_mad_open (GslDataHandle      *dhandle,
          handle->seeks = create_seek_table (handle, &handle->n_seeks);
          if (!handle->seeks)
            {
-             error = BSE_ERROR_NO_SEEK_INFO;
+             error = Bse::ERROR_NO_SEEK_INFO;
              goto OPEN_FAILED;
            }
          MDEBUG ("frames in seektable: %u", handle->n_seeks);
@@ -407,7 +407,7 @@ dh_mad_open (GslDataHandle      *dhandle,
     setup->n_values = n;
   else
     {
-      error = BSE_ERROR_NO_DATA;
+      error = Bse::ERROR_NO_DATA;
       goto OPEN_FAILED;
     }
 
@@ -416,7 +416,7 @@ dh_mad_open (GslDataHandle      *dhandle,
 
   if (dh_mad_coarse_seek (&handle->dhandle, 0) != 0)
     {
-      error = BSE_ERROR_FILE_SEEK_FAILED;
+      error = Bse::ERROR_FILE_SEEK_FAILED;
       goto OPEN_FAILED;
     }
 
@@ -424,7 +424,7 @@ dh_mad_open (GslDataHandle      *dhandle,
   setup->mix_freq = handle->sample_rate;
   setup->needs_cache = TRUE;
   setup->xinfos = bse_xinfos_add_float (setup->xinfos, "osc-freq", handle->osc_freq);
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 
  OPEN_FAILED:
   if (handle->error)
@@ -649,7 +649,7 @@ static GslDataHandle*
 dh_mad_new (const gchar  *file_name,
             gfloat        osc_freq,
            gboolean      skip_seek_keep_open,
-            BseErrorType *errorp)
+            Bse::ErrorType *errorp)
 {
   MadHandle *handle;
   gboolean success;
@@ -667,7 +667,7 @@ dh_mad_new (const gchar  *file_name,
       handle->eof = FALSE;
       handle->hfile = NULL;
       handle->file_pos = 0;
-      handle->error = BSE_ERROR_NONE;
+      handle->error = Bse::ERROR_NONE;
       handle->n_seeks = 0;
       handle->seeks = NULL;
       handle->seek_mtime = -1;
@@ -677,12 +677,12 @@ dh_mad_new (const gchar  *file_name,
       /* we can only check matters upon opening
        */
       handle->skip_seek_table = skip_seek_keep_open != FALSE;
-      BseErrorType error = gsl_data_handle_open (&handle->dhandle);
+      Bse::ErrorType error = gsl_data_handle_open (&handle->dhandle);
       if (!error)
        {
          if (!skip_seek_keep_open)
            gsl_data_handle_close (&handle->dhandle);
-          *errorp = BSE_ERROR_NONE;
+          *errorp = Bse::ERROR_NONE;
          return &handle->dhandle;
        }
       MDEBUG ("failed to open \"%s\": %s", file_name, handle->stream.error ? mad_stream_errorstr 
(&handle->stream) : bse_error_blurb (error));
@@ -694,7 +694,7 @@ dh_mad_new (const gchar  *file_name,
     {
       g_free (handle->seeks);
       sfi_delete_struct (MadHandle, handle);
-      *errorp = BSE_ERROR_INTERNAL;
+      *errorp = Bse::ERROR_INTERNAL;
       return NULL;
     }
 }
@@ -702,16 +702,16 @@ dh_mad_new (const gchar  *file_name,
 GslDataHandle*
 gsl_data_handle_new_mad_err (const gchar  *file_name,
                              gfloat        osc_freq,
-                             BseErrorType *errorp)
+                             Bse::ErrorType *errorp)
 {
   g_return_val_if_fail (file_name != NULL, NULL);
   g_return_val_if_fail (osc_freq > 0, NULL);
 
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
   return dh_mad_new (file_name, osc_freq, FALSE, errorp ? errorp : &error);
 }
 
-BseErrorType
+Bse::ErrorType
 gsl_data_handle_mad_testopen (const gchar *file_name,
                              guint       *n_channels,
                              gfloat      *mix_freq)
@@ -719,12 +719,12 @@ gsl_data_handle_mad_testopen (const gchar *file_name,
   GslDataHandle *dhandle;
   MadHandle *handle;
 
-  g_return_val_if_fail (file_name != NULL, BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (file_name != NULL, Bse::ERROR_INTERNAL);
 
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
   dhandle = dh_mad_new (file_name, 439, TRUE, &error);
   if (!dhandle)
-    return error ? error : BSE_ERROR_FILE_OPEN_FAILED;
+    return error ? error : Bse::ERROR_FILE_OPEN_FAILED;
 
   handle = (MadHandle*) dhandle;
   if (n_channels)
@@ -734,7 +734,7 @@ gsl_data_handle_mad_testopen (const gchar *file_name,
   gsl_data_handle_close (dhandle);
   gsl_data_handle_unref (dhandle);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 const gchar*
@@ -748,19 +748,19 @@ gsl_data_handle_mad_version (void)
 GslDataHandle*
 gsl_data_handle_new_mad_err (const gchar  *file_name,
                              gfloat        osc_freq,
-                             BseErrorType *errorp)
+                             Bse::ErrorType *errorp)
 {
   if (errorp)
-    *errorp = BSE_ERROR_FORMAT_UNKNOWN;
+    *errorp = Bse::ERROR_FORMAT_UNKNOWN;
   return NULL;
 }
 
-BseErrorType
+Bse::ErrorType
 gsl_data_handle_mad_testopen (const gchar *file_name,
                               guint       *n_channels,
                               gfloat      *mix_freq)
 {
-  return BSE_ERROR_FORMAT_UNKNOWN;
+  return Bse::ERROR_FORMAT_UNKNOWN;
 }
 const gchar*
 gsl_data_handle_mad_version (void)
diff --git a/bse/gsldatahandle-mad.hh b/bse/gsldatahandle-mad.hh
index 521b699..27cae57 100644
--- a/bse/gsldatahandle-mad.hh
+++ b/bse/gsldatahandle-mad.hh
@@ -13,8 +13,8 @@ GslDataHandle*        gsl_data_handle_new_mad         (const gchar  *file_name,
                                                  gfloat        osc_freq);
 GslDataHandle* gsl_data_handle_new_mad_err     (const gchar  *file_name,
                                                  gfloat        osc_freq,
-                                                 BseErrorType *error);
-BseErrorType   gsl_data_handle_mad_testopen    (const gchar  *file_name,
+                                                 Bse::ErrorType *error);
+Bse::ErrorType gsl_data_handle_mad_testopen    (const gchar  *file_name,
                                                 guint        *n_channels,
                                                 gfloat       *mix_freq);
 const gchar*    gsl_data_handle_mad_version     (void);
diff --git a/bse/gsldatahandle-vorbis.cc b/bse/gsldatahandle-vorbis.cc
index 3df9d95..67b68d1 100644
--- a/bse/gsldatahandle-vorbis.cc
+++ b/bse/gsldatahandle-vorbis.cc
@@ -41,25 +41,25 @@ typedef struct {
 
 
 /* --- functions --- */
-static BseErrorType
+static Bse::ErrorType
 ov_errno_to_error (gint         ov_errno,
-                  BseErrorType fallback)
+                  Bse::ErrorType fallback)
 {
   switch (ov_errno)
     {
-    case OV_EOF:       return BSE_ERROR_FILE_EOF;
+    case OV_EOF:       return Bse::ERROR_FILE_EOF;
     case OV_EBADLINK:
     case OV_EBADPACKET:
-    case OV_HOLE:      return BSE_ERROR_DATA_CORRUPT;
-    case OV_EREAD:     return BSE_ERROR_FILE_READ_FAILED;
-    case OV_ENOSEEK:   return BSE_ERROR_FILE_SEEK_FAILED;
+    case OV_HOLE:      return Bse::ERROR_DATA_CORRUPT;
+    case OV_EREAD:     return Bse::ERROR_FILE_READ_FAILED;
+    case OV_ENOSEEK:   return Bse::ERROR_FILE_SEEK_FAILED;
     case OV_EFAULT:
-    case OV_EIMPL:     return BSE_ERROR_CODEC_FAILURE;
-    case OV_EINVAL:    return BSE_ERROR_INTERNAL;
+    case OV_EIMPL:     return Bse::ERROR_CODEC_FAILURE;
+    case OV_EINVAL:    return Bse::ERROR_INTERNAL;
     case OV_ENOTAUDIO:
     case OV_EVERSION:
     case OV_EBADHEADER:
-    case OV_ENOTVORBIS:        return BSE_ERROR_FORMAT_INVALID;
+    case OV_ENOTVORBIS:        return Bse::ERROR_FORMAT_INVALID;
     case OV_FALSE:
     default:           return fallback;
     }
@@ -135,7 +135,7 @@ static ov_callbacks vfile_ov_callbacks = {
   vfile_tell,
 };
 
-static BseErrorType
+static Bse::ErrorType
 dh_vorbis_open (GslDataHandle      *dhandle,
                GslDataHandleSetup *setup)
 {
@@ -150,7 +150,7 @@ dh_vorbis_open (GslDataHandle      *dhandle,
   if (!vfile->rfile)
     {
       g_free (vfile);
-      return gsl_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+      return gsl_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
     }
   vfile->byte_length = gsl_rfile_length (vfile->rfile);
   if (vhandle->rfile_add_zoffset)
@@ -175,9 +175,9 @@ dh_vorbis_open (GslDataHandle      *dhandle,
                     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_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);
+      return ov_errno_to_error (err, Bse::ERROR_FILE_OPEN_FAILED);
     }
 
   n = ov_streams (&vhandle->ofile);
@@ -191,7 +191,7 @@ dh_vorbis_open (GslDataHandle      *dhandle,
   else
     {
       ov_clear (&vhandle->ofile); /* closes file */
-      return BSE_ERROR_NO_DATA;        /* requested bitstream not available */
+      return Bse::ERROR_NO_DATA;       /* requested bitstream not available */
     }
 
   vhandle->soffset = 0;
@@ -208,7 +208,7 @@ dh_vorbis_open (GslDataHandle      *dhandle,
   else
     {
       ov_clear (&vhandle->ofile); /* closes file */
-      return BSE_ERROR_NO_DATA;
+      return Bse::ERROR_NO_DATA;
     }
 
   vhandle->max_block_size = vorbis_info_blocksize (vi, 0);
@@ -221,7 +221,7 @@ dh_vorbis_open (GslDataHandle      *dhandle,
   setup->mix_freq = vi->rate;
   setup->needs_cache = TRUE;
   setup->xinfos = bse_xinfos_add_float (setup->xinfos, "osc-freq", vhandle->osc_freq);
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 static GslLong
@@ -372,7 +372,7 @@ gsl_data_handle_new_ogg_vorbis_any (const gchar *file_name,
   gboolean success = gsl_data_handle_common_init (&vhandle->dhandle, file_name);
   if (success)
     {
-      BseErrorType error;
+      Bse::ErrorType error;
 
       vhandle->dhandle.vtable = &dh_vorbis_vtable;
       vhandle->n_bitstreams = 0;
@@ -456,7 +456,7 @@ gsl_vorbis1_handle_new (GslDataHandle *ogg_vorbis_handle,
 {
   GslVorbis1Handle *v1h = NULL;
   if (ogg_vorbis_handle->vtable == &dh_vorbis_vtable &&
-      gsl_data_handle_open (ogg_vorbis_handle) == BSE_ERROR_NONE)
+      gsl_data_handle_open (ogg_vorbis_handle) == Bse::ERROR_NONE)
     {
       v1h = g_new0 (GslVorbis1Handle, 1);
       v1h->dhandle = ogg_vorbis_handle;
@@ -479,7 +479,7 @@ gsl_vorbis1_handle_read (GslVorbis1Handle *v1h, /* returns -errno || length */
     {
       v1h->rfile = gsl_rfile_open (v1h->dhandle->name);
       if (!v1h->rfile)
-        return gsl_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+        return gsl_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
       v1h->byte_length = gsl_rfile_length (v1h->rfile);
       if (v1h->rfile_add_zoffset)
         {
diff --git a/bse/gsldatahandle.cc b/bse/gsldatahandle.cc
index e0d24d6..ce4c499 100644
--- a/bse/gsldatahandle.cc
+++ b/bse/gsldatahandle.cc
@@ -70,23 +70,23 @@ gsl_data_handle_unref (GslDataHandle *dhandle)
       dhandle->vtable->destroy (dhandle);
     }
 }
-BseErrorType
+Bse::ErrorType
 gsl_data_handle_open (GslDataHandle *dhandle)
 {
-  g_return_val_if_fail (dhandle != NULL, BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (dhandle->ref_count > 0, BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (dhandle != NULL, Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (dhandle->ref_count > 0, Bse::ERROR_INTERNAL);
   dhandle->spinlock.lock();
   if (dhandle->open_count == 0)
     {
       GslDataHandleSetup setup = { 0, };
-      BseErrorType error = dhandle->vtable->open (dhandle, &setup);
+      Bse::ErrorType error = dhandle->vtable->open (dhandle, &setup);
       if (!error && (setup.n_values < 0 ||
                     setup.n_channels < 1))
        {
          sfi_warning ("invalid parameters in data handle open() (%p()): nv=%lld nc=%u",
                        dhandle->vtable->open, setup.n_values, setup.n_channels);
          dhandle->vtable->close (dhandle);
-         error = BSE_ERROR_FORMAT_INVALID;
+         error = Bse::ERROR_FORMAT_INVALID;
        }
       if (error)
        {
@@ -102,7 +102,7 @@ gsl_data_handle_open (GslDataHandle *dhandle)
   else
     dhandle->open_count++;
   dhandle->spinlock.unlock();
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 void
 gsl_data_handle_close (GslDataHandle *dhandle)
@@ -284,7 +284,7 @@ typedef struct {
   guint             bit_depth : 8;
 } MemHandle;
 
-static BseErrorType
+static Bse::ErrorType
 mem_handle_open (GslDataHandle      *dhandle,
                 GslDataHandleSetup *setup)
 {
@@ -296,7 +296,7 @@ mem_handle_open (GslDataHandle      *dhandle,
   setup->mix_freq = mhandle->mix_freq;
   setup->bit_depth = mhandle->bit_depth;
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 static void
@@ -416,14 +416,14 @@ ring_remove_dups (SfiRing        *ring,
   return ring;
 }
 
-static BseErrorType
+static Bse::ErrorType
 xinfo_handle_open (GslDataHandle      *dhandle,
                    GslDataHandleSetup *setup)
 {
   XInfoHandle *chandle = (XInfoHandle*) dhandle;
   GslDataHandle *src_handle = chandle->src_handle;
-  BseErrorType error = gsl_data_handle_open (src_handle);
-  if (error != BSE_ERROR_NONE)
+  Bse::ErrorType error = gsl_data_handle_open (src_handle);
+  if (error != Bse::ERROR_NONE)
     return error;
   *setup = src_handle->setup;
   setup->xinfos = NULL;
@@ -456,7 +456,7 @@ xinfo_handle_open (GslDataHandle      *dhandle,
         }
       setup->xinfos[i] = NULL;
     }
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 static int64 
@@ -669,19 +669,19 @@ gsl_data_handle_new_clear_xinfos (GslDataHandle *src_handle)
 
 
 /* --- chain handle --- */
-static BseErrorType
+static Bse::ErrorType
 chain_handle_open (GslDataHandle      *dhandle,
                   GslDataHandleSetup *setup)
 {
   ChainHandle *chandle = (ChainHandle*) dhandle;
-  BseErrorType error;
+  Bse::ErrorType error;
 
   error = gsl_data_handle_open (chandle->src_handle);
-  if (error != BSE_ERROR_NONE)
+  if (error != Bse::ERROR_NONE)
     return error;
   *setup = chandle->src_handle->setup; /* copies setup.xinfos by pointer */
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 static void
@@ -858,21 +858,21 @@ typedef struct {
   int64            tail_cut;
 } CutHandle;
 
-static BseErrorType
+static Bse::ErrorType
 cut_handle_open (GslDataHandle      *dhandle,
                 GslDataHandleSetup *setup)
 {
   CutHandle *chandle = (CutHandle*) dhandle;
-  BseErrorType error;
+  Bse::ErrorType error;
 
   error = gsl_data_handle_open (chandle->src_handle);
-  if (error != BSE_ERROR_NONE)
+  if (error != Bse::ERROR_NONE)
     return error;
   *setup = chandle->src_handle->setup; /* copies setup.xinfos by pointer */
   setup->n_values -= MIN (setup->n_values, chandle->tail_cut);
   setup->n_values -= MIN (setup->n_values, chandle->n_cut_values);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 static void
@@ -1009,15 +1009,15 @@ typedef struct {
   void            (*free_values) (gpointer);
 } InsertHandle;
 
-static BseErrorType
+static Bse::ErrorType
 insert_handle_open (GslDataHandle      *dhandle,
                    GslDataHandleSetup *setup)
 {
   InsertHandle *ihandle = (InsertHandle*) dhandle;
-  BseErrorType error;
+  Bse::ErrorType error;
 
   error = gsl_data_handle_open (ihandle->src_handle);
-  if (error != BSE_ERROR_NONE)
+  if (error != Bse::ERROR_NONE)
     return error;
   *setup = ihandle->src_handle->setup; /* copies setup.xinfos by pointer */
   ihandle->paste_offset = ihandle->requested_paste_offset < 0 ? setup->n_values : 
ihandle->requested_paste_offset;
@@ -1028,7 +1028,7 @@ insert_handle_open (GslDataHandle      *dhandle,
   guint n = gsl_data_handle_bit_depth (ihandle->src_handle);
   setup->bit_depth = MAX (n, ihandle->paste_bit_depth);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 static void
@@ -1176,15 +1176,15 @@ typedef struct {
   int64            loop_width;
 } LoopHandle;
 
-static BseErrorType
+static Bse::ErrorType
 loop_handle_open (GslDataHandle      *dhandle,
                  GslDataHandleSetup *setup)
 {
   LoopHandle *lhandle = (LoopHandle*) dhandle;
-  BseErrorType error;
+  Bse::ErrorType error;
 
   error = gsl_data_handle_open (lhandle->src_handle);
-  if (error != BSE_ERROR_NONE)
+  if (error != Bse::ERROR_NONE)
     return error;
 
   *setup = lhandle->src_handle->setup; /* copies setup.xinfos by pointer */
@@ -1200,7 +1200,7 @@ loop_handle_open (GslDataHandle      *dhandle,
       lhandle->loop_width = 0;
     }
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 static void
@@ -1298,21 +1298,21 @@ dcache_handle_destroy (GslDataHandle *dhandle)
   sfi_delete_struct (DCacheHandle, chandle);
 }
 
-static BseErrorType
+static Bse::ErrorType
 dcache_handle_open (GslDataHandle      *dhandle,
                    GslDataHandleSetup *setup)
 {
   DCacheHandle *chandle = (DCacheHandle*) dhandle;
-  BseErrorType error;
+  Bse::ErrorType error;
 
   error = gsl_data_handle_open (chandle->dcache->dhandle);
-  if (error != BSE_ERROR_NONE)
+  if (error != Bse::ERROR_NONE)
     return error;
   gsl_data_cache_open (chandle->dcache);
   *setup = chandle->dcache->dhandle->setup; /* copies setup.xinfos by pointer */
   gsl_data_handle_close (chandle->dcache->dhandle);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 static void
@@ -1468,7 +1468,7 @@ wave_handle_destroy (GslDataHandle *dhandle)
   sfi_delete_struct (WaveHandle, whandle);
 }
 
-static BseErrorType
+static Bse::ErrorType
 wave_handle_open (GslDataHandle      *dhandle,
                  GslDataHandleSetup *setup)
 {
@@ -1476,7 +1476,7 @@ wave_handle_open (GslDataHandle      *dhandle,
 
   whandle->hfile = gsl_hfile_open (whandle->dhandle.name);
   if (!whandle->hfile)
-    return gsl_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+    return gsl_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
   else
     {
       int64 l, fwidth = wave_format_byte_width (whandle->format);
@@ -1508,7 +1508,7 @@ wave_handle_open (GslDataHandle      *dhandle,
       /* linux does proper caching and WAVs are easily readable */
       setup->needs_cache = TRUE;
 #endif
-      return BSE_ERROR_NONE;
+      return Bse::ERROR_NONE;
     }
 }
 
diff --git a/bse/gsldatahandle.hh b/bse/gsldatahandle.hh
index 521f8b7..da50e18 100644
--- a/bse/gsldatahandle.hh
+++ b/bse/gsldatahandle.hh
@@ -37,7 +37,7 @@ typedef void (*GslDataHandleRecurse)  (GslDataHandle          *data_handle,
                                         gpointer                data);
 struct _GslDataHandleFuncs
 {
-  BseErrorType  (*open)                (GslDataHandle          *data_handle,
+  Bse::ErrorType        (*open)                (GslDataHandle          *data_handle,
                                         GslDataHandleSetup     *setup);
   int64                 (*read)                (GslDataHandle          *data_handle,
                                         int64                   voffset, /* in values */
@@ -54,7 +54,7 @@ struct _GslDataHandleFuncs
 /* --- standard functions --- */
 GslDataHandle*   gsl_data_handle_ref               (GslDataHandle        *dhandle);
 void             gsl_data_handle_unref             (GslDataHandle        *dhandle);
-BseErrorType     gsl_data_handle_open              (GslDataHandle        *dhandle);
+Bse::ErrorType   gsl_data_handle_open              (GslDataHandle        *dhandle);
 void             gsl_data_handle_close             (GslDataHandle        *dhandle);
 int64            gsl_data_handle_length            (GslDataHandle        *data_handle);
 #define                  gsl_data_handle_n_values(          dh) \
diff --git a/bse/gsldatautils.cc b/bse/gsldatautils.cc
index b30458e..a194c6a 100644
--- a/bse/gsldatautils.cc
+++ b/bse/gsldatautils.cc
@@ -337,7 +337,7 @@ wstore_context_reader (gpointer data,
 
   if (!wc->opened)
     {
-      BseErrorType error = gsl_data_handle_open (wc->dhandle);
+      Bse::ErrorType error = gsl_data_handle_open (wc->dhandle);
       if (error)
        return -ENOENT; /* approximation of OPEN_FAILED */
       wc->opened = TRUE;
@@ -480,7 +480,7 @@ gsl_data_find_sample (GslDataHandle *dhandle,
   g_return_val_if_fail (dhandle != NULL, -1);
   g_return_val_if_fail (direction == -1 || direction == +1, -1);
 
-  if (gsl_data_handle_open (dhandle) != BSE_ERROR_NONE ||
+  if (gsl_data_handle_open (dhandle) != Bse::ERROR_NONE ||
       start_offset >= dhandle->setup.n_values)
     return -1;
 
@@ -564,7 +564,7 @@ gsl_data_find_tailmatch (GslDataHandle     *dhandle,
   g_return_val_if_fail (lspec->max_loop >= lspec->min_loop, FALSE);
   g_return_val_if_fail (lspec->tail_cut >= lspec->max_loop, FALSE);
 
-  if (gsl_data_handle_open (dhandle) != BSE_ERROR_NONE)
+  if (gsl_data_handle_open (dhandle) != Bse::ERROR_NONE)
     return FALSE;
   length = dhandle->setup.n_values;
   if (lspec->head_skip < length)
@@ -751,17 +751,17 @@ gsl_data_make_fade_ramp (GslDataHandle *handle,
  * according to a given threshold and optionally produce
  * a fade ramp.
  */
-BseErrorType
+Bse::ErrorType
 gsl_data_clip_sample (GslDataHandle     *dhandle,
                       GslDataClipConfig *cconfig,
                       GslDataClipResult *result)
 {
-  g_return_val_if_fail (result != NULL, BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (result != NULL, Bse::ERROR_INTERNAL);
   memset (result, 0, sizeof (*result));
-  result->error = BSE_ERROR_INTERNAL;
-  g_return_val_if_fail (dhandle, BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (GSL_DATA_HANDLE_OPENED (dhandle), BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (cconfig != NULL, BSE_ERROR_INTERNAL);
+  result->error = Bse::ERROR_INTERNAL;
+  g_return_val_if_fail (dhandle, Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (GSL_DATA_HANDLE_OPENED (dhandle), Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (cconfig != NULL, Bse::ERROR_INTERNAL);
   gboolean info = cconfig->produce_info != FALSE;
 
   SfiNum last_value = gsl_data_handle_n_values (dhandle);
@@ -769,7 +769,7 @@ gsl_data_clip_sample (GslDataHandle     *dhandle,
     {
       if (info)
         sfi_info ("Signal too short");
-      result->error = BSE_ERROR_FILE_EMPTY;
+      result->error = Bse::ERROR_FILE_EMPTY;
       return result->error;
     }
   last_value -= 1;
@@ -781,7 +781,7 @@ gsl_data_clip_sample (GslDataHandle     *dhandle,
       if (info)
         sfi_info ("All of signal below threshold");
       result->clipped_to_0length = TRUE;
-      result->error = BSE_ERROR_DATA_UNMATCHED;
+      result->error = Bse::ERROR_DATA_UNMATCHED;
       return result->error;
     }
   SfiNum tail = gsl_data_find_sample (dhandle, +cconfig->threshold, -cconfig->threshold,  -1, -1);
@@ -792,7 +792,7 @@ gsl_data_clip_sample (GslDataHandle     *dhandle,
     {
       if (info)
         sfi_info ("Signal tail above threshold, # samples below: %llu", last_value - tail);
-      result->error = BSE_ERROR_DATA_UNMATCHED;
+      result->error = Bse::ERROR_DATA_UNMATCHED;
       return result->error;
     }
   result->tail_detected = TRUE;
@@ -800,7 +800,7 @@ gsl_data_clip_sample (GslDataHandle     *dhandle,
     {
       if (info)
         sfi_info ("Signal head above threshold, # samples below: %llu", head);
-      result->error = BSE_ERROR_DATA_UNMATCHED;
+      result->error = Bse::ERROR_DATA_UNMATCHED;
       return result->error;
     }
   result->head_detected = TRUE;
@@ -829,7 +829,7 @@ gsl_data_clip_sample (GslDataHandle     *dhandle,
   if (head == 0 && last_value == tail)
     {
       result->dhandle = gsl_data_handle_ref (dhandle);
-      result->error = BSE_ERROR_NONE;
+      result->error = Bse::ERROR_NONE;
       return result->error;
     }
 
@@ -878,7 +878,7 @@ gsl_data_clip_sample (GslDataHandle     *dhandle,
   result->dhandle = gsl_data_handle_ref (fade_handle);
   gsl_data_handle_close (fade_handle);
   gsl_data_handle_close (clip_handle);
-  result->error = BSE_ERROR_NONE;
+  result->error = Bse::ERROR_NONE;
   return result->error;
 }
 
diff --git a/bse/gsldatautils.hh b/bse/gsldatautils.hh
index 60710c8..6462d8a 100644
--- a/bse/gsldatautils.hh
+++ b/bse/gsldatautils.hh
@@ -146,10 +146,10 @@ typedef struct
   guint          tail_detected : 1;             /* found tail_samples silence */
   guint          clipped_head : 1;
   guint          clipped_tail : 1;
-  BseErrorType   error;
+  Bse::ErrorType   error;
 } GslDataClipResult;
 
-BseErrorType    gsl_data_clip_sample    (GslDataHandle     *dhandle,
+Bse::ErrorType    gsl_data_clip_sample    (GslDataHandle     *dhandle,
                                          GslDataClipConfig *cconfig,
                                          GslDataClipResult *result);
 
diff --git a/bse/gslvorbis-enc.cc b/bse/gslvorbis-enc.cc
index 50775f4..2add06b 100644
--- a/bse/gslvorbis-enc.cc
+++ b/bse/gslvorbis-enc.cc
@@ -241,7 +241,7 @@ gsl_vorbis_encoder_reset (GslVorbisEncoder *self)
   self->have_vblock = FALSE;
 }
 
-BseErrorType
+Bse::ErrorType
 gsl_vorbis_encoder_setup_stream (GslVorbisEncoder *self,
                                 guint             serial)
 {
@@ -249,8 +249,8 @@ gsl_vorbis_encoder_setup_stream (GslVorbisEncoder *self,
   ogg_page opage;
   gint result;
 
-  g_return_val_if_fail (self != NULL, BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (self->stream_setup == FALSE, BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (self != NULL, Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (self->stream_setup == FALSE, Bse::ERROR_INTERNAL);
 
   self->serial = serial;
   vorbis_info_init (&self->vinfo);
@@ -273,7 +273,7 @@ gsl_vorbis_encoder_setup_stream (GslVorbisEncoder *self,
   if (result != 0)
     {
       vorbis_info_clear (&self->vinfo);
-      return BSE_ERROR_CODEC_FAILURE;
+      return Bse::ERROR_CODEC_FAILURE;
     }
 
   self->stream_setup = TRUE;
@@ -289,7 +289,7 @@ gsl_vorbis_encoder_setup_stream (GslVorbisEncoder *self,
   while (ogg_stream_flush (&self->ostream, &opage))
     gsl_vorbis_encoder_enqueue_page (self, &opage);
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 static void
diff --git a/bse/gslvorbis-enc.hh b/bse/gslvorbis-enc.hh
index 6bc0acc..ecfd6bb 100644
--- a/bse/gslvorbis-enc.hh
+++ b/bse/gslvorbis-enc.hh
@@ -37,7 +37,7 @@ void              gsl_vorbis_encoder_set_n_channels     (GslVorbisEncoder
 void              gsl_vorbis_encoder_set_sample_freq    (GslVorbisEncoder       *self,
                                                          guint                   sample_freq);
 /* start encoding */
-BseErrorType      gsl_vorbis_encoder_setup_stream       (GslVorbisEncoder       *self,
+Bse::ErrorType      gsl_vorbis_encoder_setup_stream       (GslVorbisEncoder       *self,
                                                          guint                   serial);
 /* write unencoded data (must be channel aligned) */
 void              gsl_vorbis_encoder_write_pcm          (GslVorbisEncoder       *self,
diff --git a/bse/gslwavechunk.cc b/bse/gslwavechunk.cc
index 9ea0cee..190fe5a 100644
--- a/bse/gslwavechunk.cc
+++ b/bse/gslwavechunk.cc
@@ -661,23 +661,23 @@ gsl_wave_chunk_unref (GslWaveChunk *wchunk)
     }
 }
 
-BseErrorType
+Bse::ErrorType
 gsl_wave_chunk_open (GslWaveChunk *wchunk)
 {
-  g_return_val_if_fail (wchunk != NULL, BSE_ERROR_INTERNAL);
-  g_return_val_if_fail (wchunk->ref_count > 0, BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (wchunk != NULL, Bse::ERROR_INTERNAL);
+  g_return_val_if_fail (wchunk->ref_count > 0, Bse::ERROR_INTERNAL);
 
   if (wchunk->open_count == 0)
     {
-      BseErrorType error;
+      Bse::ErrorType error;
 
       error = gsl_data_handle_open (wchunk->dcache->dhandle);
-      if (error != BSE_ERROR_NONE)
+      if (error != Bse::ERROR_NONE)
        return error;
       if (gsl_data_handle_n_values (wchunk->dcache->dhandle) < gsl_data_handle_n_channels 
(wchunk->dcache->dhandle))
        {
          gsl_data_handle_close (wchunk->dcache->dhandle);
-         return BSE_ERROR_FILE_EMPTY;
+         return Bse::ERROR_FILE_EMPTY;
        }
       wchunk->mix_freq = gsl_data_handle_mix_freq (wchunk->dcache->dhandle);
       wchunk->osc_freq = gsl_data_handle_osc_freq (wchunk->dcache->dhandle);
@@ -689,7 +689,7 @@ gsl_wave_chunk_open (GslWaveChunk *wchunk)
       wchunk->fine_tune_factor = bse_cent_tune (gsl_data_handle_fine_tune (wchunk->dcache->dhandle));
       gsl_data_cache_open (wchunk->dcache);
       gsl_data_handle_close (wchunk->dcache->dhandle);
-      g_return_val_if_fail (wchunk->dcache->padding >= wchunk->n_pad_values, BSE_ERROR_INTERNAL);
+      g_return_val_if_fail (wchunk->dcache->padding >= wchunk->n_pad_values, Bse::ERROR_INTERNAL);
       wchunk->open_count++;
       wchunk->ref_count++;
       wave_chunk_setup_loop (wchunk);
@@ -697,7 +697,7 @@ gsl_wave_chunk_open (GslWaveChunk *wchunk)
     }
   else
     wchunk->open_count++;
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 void
diff --git a/bse/gslwavechunk.hh b/bse/gslwavechunk.hh
index 787889f..1ccef68 100644
--- a/bse/gslwavechunk.hh
+++ b/bse/gslwavechunk.hh
@@ -94,7 +94,7 @@ GslWaveChunk* gsl_wave_chunk_new              (GslDataCache           *dcache,
                                                 guint                   loop_count);
 GslWaveChunk*  gsl_wave_chunk_ref              (GslWaveChunk           *wchunk);
 void           gsl_wave_chunk_unref            (GslWaveChunk           *wchunk);
-BseErrorType   gsl_wave_chunk_open             (GslWaveChunk           *wchunk);
+Bse::ErrorType gsl_wave_chunk_open             (GslWaveChunk           *wchunk);
 void           gsl_wave_chunk_close            (GslWaveChunk           *wchunk);
 void           gsl_wave_chunk_debug_block      (GslWaveChunk           *wchunk,
                                                 GslLong                 offset,
diff --git a/bse/mkcproc.pl b/bse/mkcproc.pl
index e4f9650..075dc7f 100755
--- a/bse/mkcproc.pl
+++ b/bse/mkcproc.pl
@@ -254,7 +254,7 @@ while (<>) {
        $last_node = "(BseExportNode*) &__enode_". ncanon ($proc_name);
 
        print "#line $line \"$file\"\n$1 }\n";
-       print "static BseErrorType\n";
+       print "static Bse::ErrorType\n";
        print "#line $line \"$file\"\n";
        print ncanon ($proc_name) . "_exec (" . $2 . ")\n";
        
diff --git a/bse/tests/firhandle.cc b/bse/tests/firhandle.cc
index 6c470e7..1e01a79 100644
--- a/bse/tests/firhandle.cc
+++ b/bse/tests/firhandle.cc
@@ -163,7 +163,7 @@ test_with_sine_sweep (FirHandleType type)
       fir_handle_cos = bse_data_handle_new_fir_lowpass (ihandle_cos, 6000.0, order);
     }
 
-  BseErrorType error;
+  Bse::ErrorType error;
   error = gsl_data_handle_open (fir_handle_sin);
   TASSERT (error == 0);
   error = gsl_data_handle_open (fir_handle_cos);
@@ -319,7 +319,7 @@ test_multi_channel (FirHandleType type)
       else
        fir_handle = bse_data_handle_new_fir_lowpass (ihandle, cutoff_freq, order);
 
-      BseErrorType error;
+      Bse::ErrorType error;
       error = gsl_data_handle_open (fir_handle);
       TASSERT (error == 0);
 
@@ -365,7 +365,7 @@ test_seek (FirHandleType type)
       else
        fir_handle = bse_data_handle_new_fir_lowpass (ihandle, cutoff_freq, order);
 
-      BseErrorType error;
+      Bse::ErrorType error;
       error = gsl_data_handle_open (fir_handle);
       TASSERT (error == 0);
 
diff --git a/bse/tests/loophandle.cc b/bse/tests/loophandle.cc
index 7295560..0c1210f 100644
--- a/bse/tests/loophandle.cc
+++ b/bse/tests/loophandle.cc
@@ -15,15 +15,15 @@ typedef struct {
   GslLong          loop_width;
 } LoopHandleReference;
 
-static BseErrorType
+static Bse::ErrorType
 loop_handle_reference_open (GslDataHandle      *dhandle,
                            GslDataHandleSetup *setup)
 {
   LoopHandleReference *lhandle = (LoopHandleReference*) dhandle;
-  BseErrorType error;
+  Bse::ErrorType error;
 
   error = gsl_data_handle_open (lhandle->src_handle);
-  if (error != BSE_ERROR_NONE)
+  if (error != Bse::ERROR_NONE)
     return error;
 
   *setup = lhandle->src_handle->setup; /* copies setup.xinfos by pointer */
@@ -39,7 +39,7 @@ loop_handle_reference_open (GslDataHandle      *dhandle,
       lhandle->loop_width = 0;
     }
 
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 
 static void
@@ -155,7 +155,7 @@ check_loop (GslDataHandle *src_handle,
   GslDataPeekBuffer peek_buffer_reference = { +1 /* incremental direction */, 0, };
   sfi_info ("check_loop<%lld,%lld>", loop_start, loop_end);
 
-  BseErrorType error;
+  Bse::ErrorType error;
   error = gsl_data_handle_open (loop_handle);
   if (error)
     {
diff --git a/bse/tests/resamplehandle.cc b/bse/tests/resamplehandle.cc
index a77f369..dab2e25 100644
--- a/bse/tests/resamplehandle.cc
+++ b/bse/tests/resamplehandle.cc
@@ -63,7 +63,7 @@ check (const char           *up_down,
     }
   gsl_data_handle_unref (ihandle);
 
-  BseErrorType error = gsl_data_handle_open (rhandle);
+  Bse::ErrorType error = gsl_data_handle_open (rhandle);
   TASSERT (error == 0);
 
   double worst_diff, worst_diff_db;
@@ -388,7 +388,7 @@ test_state_length (const char *run_type)
     const guint precision_bits = 16;
     GslDataHandle *ihandle = gsl_data_handle_new_mem (1, 32, 44100, 440, input.size(), &input[0], NULL);
     GslDataHandle *rhandle = bse_data_handle_new_upsample2 (ihandle, precision_bits);
-    BseErrorType open_error = gsl_data_handle_open (rhandle);
+    Bse::ErrorType open_error = gsl_data_handle_open (rhandle);
     TASSERT (open_error == 0);
     TASSERT (gsl_data_handle_get_state_length (ihandle) == 0);
 
@@ -437,7 +437,7 @@ test_state_length (const char *run_type)
     const guint precision_bits = 16;
     GslDataHandle *ihandle = gsl_data_handle_new_mem (1, 32, 44100, 440, input.size(), &input[0], NULL);
     GslDataHandle *rhandle = bse_data_handle_new_downsample2 (ihandle, precision_bits);
-    BseErrorType open_error = gsl_data_handle_open (rhandle);
+    Bse::ErrorType open_error = gsl_data_handle_open (rhandle);
     TASSERT (open_error == 0);
     TASSERT (gsl_data_handle_get_state_length (ihandle) == 0);
 
diff --git a/drivers/bse-portaudio/bsepcmdevice-portaudio.cc b/drivers/bse-portaudio/bsepcmdevice-portaudio.cc
index e80cf5c..8b79858 100644
--- a/drivers/bse-portaudio/bsepcmdevice-portaudio.cc
+++ b/drivers/bse-portaudio/bsepcmdevice-portaudio.cc
@@ -46,40 +46,40 @@ bse_pcm_device_port_audio_init (BsePcmDevicePortAudio *self)
   Pa_Initialize();
 }
 
-static BseErrorType
+static Bse::ErrorType
 bse_error_from_pa_error (PaError      pa_error,
-                         BseErrorType fallback)
+                         Bse::ErrorType fallback)
 {
   switch (pa_error)
     {
-    case paNoError:                                    return BSE_ERROR_NONE;
-    case paNotInitialized:                             return BSE_ERROR_INTERNAL;      /* wrong portaudio 
usage */
+    case paNoError:                                    return Bse::ERROR_NONE;
+    case paNotInitialized:                             return Bse::ERROR_INTERNAL;      /* wrong portaudio 
usage */
     case paUnanticipatedHostError:                     return fallback;
-    case paInvalidChannelCount:                        return BSE_ERROR_DEVICE_CHANNELS;
-    case paInvalidSampleRate:                          return BSE_ERROR_DEVICE_FREQUENCY;
-    case paInvalidDevice:                              return BSE_ERROR_DEVICE_NOT_AVAILABLE;
+    case paInvalidChannelCount:                        return Bse::ERROR_DEVICE_CHANNELS;
+    case paInvalidSampleRate:                          return Bse::ERROR_DEVICE_FREQUENCY;
+    case paInvalidDevice:                              return Bse::ERROR_DEVICE_NOT_AVAILABLE;
     case paInvalidFlag:                                return fallback;
-    case paSampleFormatNotSupported:                   return BSE_ERROR_DEVICE_FORMAT;
-    case paBadIODeviceCombination:                     return BSE_ERROR_DEVICES_MISMATCH;
-    case paInsufficientMemory:                         return BSE_ERROR_NO_MEMORY;
-    case paBufferTooBig:                               return BSE_ERROR_DEVICE_BUFFER;
-    case paBufferTooSmall:                              return BSE_ERROR_DEVICE_BUFFER;
-    case paNullCallback:                                return BSE_ERROR_INTERNAL;      /* wrong portaudio 
usage */
-    case paBadStreamPtr:                                return BSE_ERROR_INTERNAL;      /* wrong portaudio 
usage */
+    case paSampleFormatNotSupported:                   return Bse::ERROR_DEVICE_FORMAT;
+    case paBadIODeviceCombination:                     return Bse::ERROR_DEVICES_MISMATCH;
+    case paInsufficientMemory:                         return Bse::ERROR_NO_MEMORY;
+    case paBufferTooBig:                               return Bse::ERROR_DEVICE_BUFFER;
+    case paBufferTooSmall:                              return Bse::ERROR_DEVICE_BUFFER;
+    case paNullCallback:                                return Bse::ERROR_INTERNAL;      /* wrong portaudio 
usage */
+    case paBadStreamPtr:                                return Bse::ERROR_INTERNAL;      /* wrong portaudio 
usage */
     case paTimedOut:                                    return fallback;
     case paInternalError:                               return fallback;                /* puhh, portaudio 
internal... */
-    case paDeviceUnavailable:                           return BSE_ERROR_DEVICE_NOT_AVAILABLE;
+    case paDeviceUnavailable:                           return Bse::ERROR_DEVICE_NOT_AVAILABLE;
     case paIncompatibleHostApiSpecificStreamInfo:       return fallback;                /* portaudio has odd 
errors... */
     case paStreamIsStopped:                             return fallback;
     case paStreamIsNotStopped:                          return fallback;
-    case paInputOverflowed:                             return BSE_ERROR_IO;            /* driver should 
recover */
-    case paOutputUnderflowed:                           return BSE_ERROR_IO;            /* driver should 
recover */
-    case paHostApiNotFound:                             return BSE_ERROR_DEVICE_NOT_AVAILABLE;
-    case paInvalidHostApi:                              return BSE_ERROR_DEVICE_NOT_AVAILABLE;
-    case paCanNotReadFromACallbackStream:               return BSE_ERROR_INTERNAL;      /* wrong portaudio 
usage */
-    case paCanNotWriteToACallbackStream:                return BSE_ERROR_INTERNAL;      /* wrong portaudio 
usage */
-    case paCanNotReadFromAnOutputOnlyStream:            return BSE_ERROR_INTERNAL;      /* wrong portaudio 
usage */
-    case paCanNotWriteToAnInputOnlyStream:              return BSE_ERROR_INTERNAL;      /* wrong portaudio 
usage */
+    case paInputOverflowed:                             return Bse::ERROR_IO;            /* driver should 
recover */
+    case paOutputUnderflowed:                           return Bse::ERROR_IO;            /* driver should 
recover */
+    case paHostApiNotFound:                             return Bse::ERROR_DEVICE_NOT_AVAILABLE;
+    case paInvalidHostApi:                              return Bse::ERROR_DEVICE_NOT_AVAILABLE;
+    case paCanNotReadFromACallbackStream:               return Bse::ERROR_INTERNAL;      /* wrong portaudio 
usage */
+    case paCanNotWriteToACallbackStream:                return Bse::ERROR_INTERNAL;      /* wrong portaudio 
usage */
+    case paCanNotReadFromAnOutputOnlyStream:            return Bse::ERROR_INTERNAL;      /* wrong portaudio 
usage */
+    case paCanNotWriteToAnInputOnlyStream:              return Bse::ERROR_INTERNAL;      /* wrong portaudio 
usage */
     case paIncompatibleStreamHostApi:                   return fallback;
     }
   return fallback;
@@ -159,7 +159,7 @@ bse_pcm_device_port_audio_list_devices (BseDevice *device)
   return ring;
 }
 
-static BseErrorType
+static Bse::ErrorType
 bse_pcm_device_port_audio_open (BseDevice     *device,
                                gboolean       require_readable,
                                gboolean       require_writable,
@@ -193,7 +193,7 @@ bse_pcm_device_port_audio_open (BseDevice     *device,
        }
     }
 
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
 
   PaStreamParameters inputParameters = { 0, };
   inputParameters.device = Pa_GetDefaultInputDevice();
@@ -212,7 +212,7 @@ bse_pcm_device_port_audio_open (BseDevice     *device,
           device_name = args[0];
        }
       else
-       error = BSE_ERROR_DEVICE_NOT_AVAILABLE;
+       error = Bse::ERROR_DEVICE_NOT_AVAILABLE;
     }
   if (!error)
     {
@@ -233,14 +233,14 @@ bse_pcm_device_port_audio_open (BseDevice     *device,
                                         NULL,  /* no callback -> blocking api */
                                         NULL);
       if (pa_error != paNoError || !portaudio->stream)
-        error = bse_error_from_pa_error (pa_error, BSE_ERROR_FILE_OPEN_FAILED);
+        error = bse_error_from_pa_error (pa_error, Bse::ERROR_FILE_OPEN_FAILED);
     }
   if (!error)
     {
       PaError pa_error = Pa_StartStream (portaudio->stream);
       if (pa_error != paNoError)
         {
-          error = bse_error_from_pa_error (pa_error, BSE_ERROR_FILE_OPEN_FAILED);
+          error = bse_error_from_pa_error (pa_error, Bse::ERROR_FILE_OPEN_FAILED);
           Pa_CloseStream (portaudio->stream);
           portaudio->stream = NULL;
         }
diff --git a/drivers/bsemididevice-alsa.cc b/drivers/bsemididevice-alsa.cc
index 00de175..314deb6 100644
--- a/drivers/bsemididevice-alsa.cc
+++ b/drivers/bsemididevice-alsa.cc
@@ -176,7 +176,7 @@ silent_error_handler (const char *file,
 {
 }
 
-static BseErrorType
+static Bse::ErrorType
 bse_midi_device_alsa_open (BseDevice     *device,
                           gboolean       require_readable,
                           gboolean       require_writable,
@@ -202,12 +202,12 @@ bse_midi_device_alsa_open (BseDevice     *device,
     }
 
   /* try setup */
-  BseErrorType error = !aerror ? BSE_ERROR_NONE : bse_error_from_errno (-aerror, BSE_ERROR_FILE_OPEN_FAILED);
+  Bse::ErrorType error = !aerror ? Bse::ERROR_NONE : bse_error_from_errno (-aerror, 
Bse::ERROR_FILE_OPEN_FAILED);
   snd_rawmidi_params_t *mparams = alsa_alloca0 (snd_rawmidi_params);
   if (alsa->read_handle)
     {
       if (!error && snd_rawmidi_params_current (alsa->read_handle, mparams) < 0)
-        error = BSE_ERROR_FILE_OPEN_FAILED;
+        error = Bse::ERROR_FILE_OPEN_FAILED;
       if (0)
         g_printerr ("midiread:  buffer=%zd active_sensing=%d min_avail=%zd\n",
                     snd_rawmidi_params_get_buffer_size (mparams),
@@ -217,7 +217,7 @@ bse_midi_device_alsa_open (BseDevice     *device,
   if (alsa->write_handle)
     {
       if (!error && snd_rawmidi_params_current (alsa->write_handle, mparams) < 0)
-        error = BSE_ERROR_FILE_OPEN_FAILED;
+        error = Bse::ERROR_FILE_OPEN_FAILED;
       if (0)
         g_printerr ("midiwrite: buffer=%zd active_sensing=%d min_avail=%zd\n",
                     snd_rawmidi_params_get_buffer_size (mparams),
@@ -225,7 +225,7 @@ bse_midi_device_alsa_open (BseDevice     *device,
                     snd_rawmidi_params_get_avail_min (mparams));
     }
   if (!error && alsa->read_handle && snd_rawmidi_poll_descriptors_count (alsa->read_handle) <= 0)
-    error = BSE_ERROR_FILE_OPEN_FAILED;
+    error = Bse::ERROR_FILE_OPEN_FAILED;
 
   /* setup MIDI handle or shutdown */
   if (!error)
diff --git a/drivers/bsepcmdevice-alsa.cc b/drivers/bsepcmdevice-alsa.cc
index 1114721..67aab92 100644
--- a/drivers/bsepcmdevice-alsa.cc
+++ b/drivers/bsepcmdevice-alsa.cc
@@ -36,7 +36,7 @@ typedef struct
 /* --- prototypes --- */
 static void             bse_pcm_device_alsa_class_init  (BsePcmDeviceALSAClass  *klass);
 static void             bse_pcm_device_alsa_init        (BsePcmDeviceALSA       *self);
-static BseErrorType     alsa_device_setup               (AlsaPcmHandle          *alsa,
+static Bse::ErrorType     alsa_device_setup               (AlsaPcmHandle          *alsa,
                                                          snd_pcm_t              *phandle,
                                                          guint                   latency_ms,
                                                          guint                  *mix_freq,
@@ -200,7 +200,7 @@ silent_error_handler (const char *file,
 {
 }
 
-static BseErrorType
+static Bse::ErrorType
 bse_pcm_device_alsa_open (BseDevice     *device,
                           gboolean       require_readable,
                           gboolean       require_writable,
@@ -225,7 +225,7 @@ bse_pcm_device_alsa_open (BseDevice     *device,
   snd_lib_error_set_handler (NULL);
   /* try setup */
   const guint period_size = BSE_PCM_DEVICE (device)->req_block_length;
-  BseErrorType error = !aerror ? BSE_ERROR_NONE : bse_error_from_errno (-aerror, BSE_ERROR_FILE_OPEN_FAILED);
+  Bse::ErrorType error = !aerror ? Bse::ERROR_NONE : bse_error_from_errno (-aerror, 
Bse::ERROR_FILE_OPEN_FAILED);
   guint rh_freq = BSE_PCM_DEVICE (device)->req_mix_freq, rh_n_periods = 0, rh_period_size = period_size;
   if (!aerror && alsa->read_handle)
     error = alsa_device_setup (alsa, alsa->read_handle, BSE_PCM_DEVICE (device)->req_latency_ms, &rh_freq, 
&rh_n_periods, &rh_period_size);
@@ -234,19 +234,19 @@ bse_pcm_device_alsa_open (BseDevice     *device,
     error = alsa_device_setup (alsa, alsa->write_handle, BSE_PCM_DEVICE (device)->req_latency_ms, &wh_freq, 
&wh_n_periods, &wh_period_size);
   /* check duplex */
   if (!error && alsa->read_handle && alsa->write_handle && rh_freq != wh_freq)
-    error = BSE_ERROR_DEVICES_MISMATCH;
+    error = Bse::ERROR_DEVICES_MISMATCH;
   handle->mix_freq = alsa->read_handle ? rh_freq : wh_freq;
   if (!error && alsa->read_handle && alsa->write_handle && rh_n_periods != wh_n_periods)
-    error = BSE_ERROR_DEVICES_MISMATCH;
+    error = Bse::ERROR_DEVICES_MISMATCH;
   alsa->n_periods = alsa->read_handle ? rh_n_periods : wh_n_periods;
   if (!error && alsa->read_handle && alsa->write_handle && rh_period_size != wh_period_size)
-    error = BSE_ERROR_DEVICES_MISMATCH;
+    error = Bse::ERROR_DEVICES_MISMATCH;
   alsa->period_size = alsa->read_handle ? rh_period_size : wh_period_size;
   if (!error && alsa->read_handle && alsa->write_handle &&
       snd_pcm_link (alsa->read_handle, alsa->write_handle) < 0)
-    error = BSE_ERROR_DEVICES_MISMATCH;
+    error = Bse::ERROR_DEVICES_MISMATCH;
   if (!error && snd_pcm_prepare (alsa->read_handle ? alsa->read_handle : alsa->write_handle) < 0)
-    error = BSE_ERROR_FILE_OPEN_FAILED;
+    error = Bse::ERROR_FILE_OPEN_FAILED;
 
   /* setup PCM handle or shutdown */
   if (!error)
@@ -305,7 +305,7 @@ bse_pcm_device_alsa_finalize (GObject *object)
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }
 
-static BseErrorType
+static Bse::ErrorType
 alsa_device_setup (AlsaPcmHandle       *alsa,
                    snd_pcm_t           *phandle,
                    guint                latency_ms,
@@ -316,61 +316,61 @@ alsa_device_setup (AlsaPcmHandle       *alsa,
   BsePcmHandle *handle = &alsa->handle;
   /* turn on blocking behaviour since we may end up in read() with an unfilled buffer */
   if (snd_pcm_nonblock (phandle, 0) < 0)
-    return BSE_ERROR_FILE_OPEN_FAILED;
+    return Bse::ERROR_FILE_OPEN_FAILED;
   /* setup hardware configuration */
   snd_pcm_hw_params_t *hparams = alsa_alloca0 (snd_pcm_hw_params);
   if (snd_pcm_hw_params_any (phandle, hparams) < 0)
-    return BSE_ERROR_FILE_OPEN_FAILED;
+    return Bse::ERROR_FILE_OPEN_FAILED;
   if (snd_pcm_hw_params_set_channels (phandle, hparams, handle->n_channels) < 0)
-    return BSE_ERROR_DEVICE_CHANNELS;
+    return Bse::ERROR_DEVICE_CHANNELS;
   if (snd_pcm_hw_params_set_access (phandle, hparams, SND_PCM_ACCESS_RW_INTERLEAVED) < 0)
-    return BSE_ERROR_DEVICE_FORMAT;
+    return Bse::ERROR_DEVICE_FORMAT;
   if (snd_pcm_hw_params_set_format (phandle, hparams, SND_PCM_FORMAT_S16_HE) < 0)
-    return BSE_ERROR_DEVICE_FORMAT;
+    return Bse::ERROR_DEVICE_FORMAT;
   if (alsa->frame_size != handle->n_channels * 2) /* 16bit samples */
-    return BSE_ERROR_DEVICE_FORMAT;
+    return Bse::ERROR_DEVICE_FORMAT;
   unsigned int rate = *mix_freq;
   if (snd_pcm_hw_params_set_rate_near (phandle, hparams, &rate, NULL) < 0)
-    return BSE_ERROR_DEVICE_FREQUENCY;
+    return Bse::ERROR_DEVICE_FREQUENCY;
   if (MAX (rate, *mix_freq) - MIN (rate, *mix_freq) > *mix_freq / 100)
-    return BSE_ERROR_DEVICE_FREQUENCY;
+    return Bse::ERROR_DEVICE_FREQUENCY;
   snd_pcm_uframes_t period_size = *period_sizep;
   if (snd_pcm_hw_params_set_period_size_near (phandle, hparams, &period_size, 0) < 0)
-    return BSE_ERROR_DEVICE_LATENCY;
+    return Bse::ERROR_DEVICE_LATENCY;
   guint buffer_time_us = latency_ms * 1000;
   if (snd_pcm_hw_params_set_buffer_time_near (phandle, hparams, &buffer_time_us, NULL) < 0)
-    return BSE_ERROR_DEVICE_LATENCY;
+    return Bse::ERROR_DEVICE_LATENCY;
   if (snd_pcm_hw_params (phandle, hparams) < 0)
-    return BSE_ERROR_FILE_OPEN_FAILED;
+    return Bse::ERROR_FILE_OPEN_FAILED;
   /* verify hardware settings */
   unsigned int nperiods = 0;
   if (snd_pcm_hw_params_get_periods (hparams, &nperiods, NULL) < 0 || nperiods < 2)
-    return BSE_ERROR_DEVICE_BUFFER;
+    return Bse::ERROR_DEVICE_BUFFER;
   snd_pcm_uframes_t buffer_size = 0;
   if (snd_pcm_hw_params_get_buffer_size (hparams, &buffer_size) < 0 || buffer_size != nperiods * period_size)
-    return BSE_ERROR_DEVICE_BUFFER;
+    return Bse::ERROR_DEVICE_BUFFER;
   /* setup software configuration */
   snd_pcm_sw_params_t *sparams = alsa_alloca0 (snd_pcm_sw_params);
   if (snd_pcm_sw_params_current (phandle, sparams) < 0)
-    return BSE_ERROR_FILE_OPEN_FAILED;
+    return Bse::ERROR_FILE_OPEN_FAILED;
   if (snd_pcm_sw_params_set_start_threshold (phandle, sparams, (buffer_size / period_size) * period_size) < 
0)
-    return BSE_ERROR_DEVICE_BUFFER;
+    return Bse::ERROR_DEVICE_BUFFER;
   if (snd_pcm_sw_params_set_avail_min (phandle, sparams, period_size) < 0)
-    return BSE_ERROR_DEVICE_LATENCY;
+    return Bse::ERROR_DEVICE_LATENCY;
   snd_pcm_uframes_t boundary;
   if (snd_pcm_sw_params_get_boundary (sparams, &boundary) < 0)
-    return BSE_ERROR_FILE_OPEN_FAILED;
+    return Bse::ERROR_FILE_OPEN_FAILED;
   gboolean stop_on_xrun = FALSE;                                                /* ignore XRUN */
   guint threshold = stop_on_xrun ? buffer_size : MIN (buffer_size * 2, boundary);
   // constrain boundary for stop_threshold, to work around 64bit alsa lib setting boundary to 
0x5000000000000000
   if (snd_pcm_sw_params_set_stop_threshold (phandle, sparams, threshold) < 0)
-    return BSE_ERROR_DEVICE_BUFFER;
+    return Bse::ERROR_DEVICE_BUFFER;
   if (snd_pcm_sw_params_set_silence_threshold (phandle, sparams, 0) < 0 ||
       snd_pcm_sw_params_set_silence_size (phandle, sparams, boundary) < 0)      /* play silence on XRUN */
-    return BSE_ERROR_DEVICE_BUFFER;
-  // if (snd_pcm_sw_params_set_xfer_align (phandle, sparams, 1) < 0) return BSE_ERROR_DEVICE_BUFFER;
+    return Bse::ERROR_DEVICE_BUFFER;
+  // if (snd_pcm_sw_params_set_xfer_align (phandle, sparams, 1) < 0) return Bse::ERROR_DEVICE_BUFFER;
   if (snd_pcm_sw_params (phandle, sparams) < 0)
-    return BSE_ERROR_FILE_OPEN_FAILED;
+    return Bse::ERROR_FILE_OPEN_FAILED;
   /* assign out values */
   *mix_freq = rate;
   *n_periodsp = nperiods;
@@ -384,7 +384,7 @@ alsa_device_setup (AlsaPcmHandle       *alsa,
           (guint) (nperiods * period_size),
           (guint) buffer_size);
   // snd_pcm_dump (phandle, snd_output);
-  return BSE_ERROR_NONE;
+  return Bse::ERROR_NONE;
 }
 static void
 alsa_device_retrigger (AlsaPcmHandle *alsa)
diff --git a/sfi/sfidl-corecxx.cc b/sfi/sfidl-corecxx.cc
index 9a5a0db..23d3c8b 100644
--- a/sfi/sfidl-corecxx.cc
+++ b/sfi/sfidl-corecxx.cc
@@ -1240,7 +1240,7 @@ public:
         printf (");\n");
 
         /* marshal */
-        printf ("  static BseErrorType marshal (BseProcedureClass *procedure,\n"
+        printf ("  static Bse::ErrorType marshal (BseProcedureClass *procedure,\n"
                 "                               const GValue      *in_values,\n"
                 "                               GValue            *out_values)\n");
         printf ("  {\n");
@@ -1258,12 +1258,12 @@ public:
           printf ("      %s (out_values, __return_value);\n", func_value_set_param (mi->result.type));
         printf ("    } catch (std::exception &e) {\n");
         printf ("      sfi_diag (\"%%s: %%s\", \"%s\", e.what());\n", name);
-        printf ("      return BSE_ERROR_PROC_EXECUTION;\n");
+        printf ("      return Bse::ERROR_PROC_EXECUTION;\n");
         printf ("    } catch (...) {\n");
         printf ("      sfi_diag (\"%%s: %%s\", \"%s\", \"uncaught exception\");\n", name);
-        printf ("      return BSE_ERROR_PROC_EXECUTION;\n");
+        printf ("      return Bse::ERROR_PROC_EXECUTION;\n");
         printf ("    }\n");
-        printf ("    return BSE_ERROR_NONE;\n");
+        printf ("    return Bse::ERROR_NONE;\n");
         printf ("  }\n");
 
         /* init */
diff --git a/tests/testwavechunk.cc b/tests/testwavechunk.cc
index b0f016b..389588a 100644
--- a/tests/testwavechunk.cc
+++ b/tests/testwavechunk.cc
@@ -43,7 +43,7 @@ run_loop_test (GslWaveLoopType loop_type,
   GslDataCache *dcache;
   GslWaveChunkBlock block = { 0, };
   GslWaveChunk *wchunk;
-  BseErrorType error;
+  Bse::ErrorType error;
   myhandle = gsl_data_handle_new_mem (1, 32, 44100, 440, my_data_length, my_data, NULL);
   dcache = gsl_data_cache_new (myhandle, 1);
   gsl_data_handle_unref (myhandle);
@@ -160,7 +160,7 @@ reversed_datahandle_test (void)
   GslDataHandle *myhandle;
   GslDataHandle *rhandle1, *rhandle2;
   GslLong o, l, i, e;
-  BseErrorType error;
+  Bse::ErrorType error;
   TSTART ("reversed datahandle");
   myhandle = gsl_data_handle_new_mem (1, 32, 44100, 440, my_data_length, my_data, NULL);
   rhandle1 = gsl_data_handle_new_reverse (myhandle);
@@ -261,7 +261,7 @@ multi_channel_test_one (int pingpong,
   GslDataHandle *myhandle;
   GslDataCache *dcache;
   GslWaveChunk *wchunk;
-  BseErrorType error;
+  Bse::ErrorType error;
   const int LOOP_COUNT = 20;
   const int LOOP_TYPE = pingpong ? GSL_WAVE_LOOP_PINGPONG : GSL_WAVE_LOOP_JUMP;
   size_t my_data_length = channels * frames;
diff --git a/tools/bsefextract.cc b/tools/bsefextract.cc
index 9fac1db..d4932f3 100644
--- a/tools/bsefextract.cc
+++ b/tools/bsefextract.cc
@@ -1523,7 +1523,7 @@ main (int    argc,
     }
 
   /* open input */
-  BseErrorType error;
+  Bse::ErrorType error;
 
   BseWaveFileInfo *wave_file_info = bse_wave_file_info_load (argv[1], &error);
   if (!wave_file_info)
diff --git a/tools/bseloopfuncs.cc b/tools/bseloopfuncs.cc
index 54de04a..2794d01 100644
--- a/tools/bseloopfuncs.cc
+++ b/tools/bseloopfuncs.cc
@@ -125,7 +125,7 @@ gsl_data_find_loop5 (GslDataHandle     *dhandle,
   config->n_details = 0;
 
   /* check out data handle */
-  if (gsl_data_handle_open (dhandle) != BSE_ERROR_NONE)
+  if (gsl_data_handle_open (dhandle) != Bse::ERROR_NONE)
     return FALSE;
   dhandle_n_values = gsl_data_handle_n_values (dhandle);
 
@@ -272,7 +272,7 @@ gsl_data_find_loop4 (GslDataHandle     *dhandle,
   config->n_details = 0;
 
   /* check out data handle */
-  if (gsl_data_handle_open (dhandle) != BSE_ERROR_NONE)
+  if (gsl_data_handle_open (dhandle) != Bse::ERROR_NONE)
     return FALSE;
   dhandle_n_values = gsl_data_handle_n_values (dhandle);
 
@@ -387,7 +387,7 @@ gsl_data_find_loop3 (GslDataHandle     *dhandle,
   g_return_val_if_fail (config != NULL, FALSE);
   config->n_details = 0;
 
-  if (gsl_data_handle_open (dhandle) != BSE_ERROR_NONE)
+  if (gsl_data_handle_open (dhandle) != Bse::ERROR_NONE)
     return FALSE;
   dhandle_n_values = gsl_data_handle_n_values (dhandle);
   config->block_start = CLAMP (config->block_start, 0, dhandle_n_values - 1);
@@ -452,7 +452,7 @@ gsl_data_find_loop2 (GslDataHandle     *dhandle,
   g_return_val_if_fail (config != NULL, FALSE);
   config->n_details = 0;
 
-  if (gsl_data_handle_open (dhandle) != BSE_ERROR_NONE)
+  if (gsl_data_handle_open (dhandle) != Bse::ERROR_NONE)
     return FALSE;
   dhandle_n_values = gsl_data_handle_n_values (dhandle);
   config->block_start = CLAMP (config->block_start, 0, dhandle_n_values - 1);
@@ -636,7 +636,7 @@ gsl_data_find_loop1 (GslDataHandle    *dhandle,
   g_return_val_if_fail (config != NULL, FALSE);
   config->n_details = 0;
 
-  if (gsl_data_handle_open (dhandle) != BSE_ERROR_NONE)
+  if (gsl_data_handle_open (dhandle) != Bse::ERROR_NONE)
     return FALSE;
   dhandle_n_values = gsl_data_handle_n_values (dhandle);
   config->block_start = CLAMP (config->block_start, 0, dhandle_n_values - 1);
@@ -858,7 +858,7 @@ gsl_data_find_loop0 (GslDataHandle         *dhandle,
   g_return_val_if_fail (loop_end_p != NULL, 0);
   g_return_val_if_fail (cfg->min_loop >= 1, 0);
 
-  if (gsl_data_handle_open (dhandle) != BSE_ERROR_NONE)
+  if (gsl_data_handle_open (dhandle) != Bse::ERROR_NONE)
     return 0;
   dhandle_n_values = gsl_data_handle_n_values (dhandle);
 
diff --git a/tools/bsewavetool.cc b/tools/bsewavetool.cc
index 4eca60c..50549aa 100644
--- a/tools/bsewavetool.cc
+++ b/tools/bsewavetool.cc
@@ -118,7 +118,7 @@ main (int   argc,
   /* load wave file */
   g_printerr ("LOAD: %s\n", input_file.c_str());
   Wave *wave = command->create ();
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
   if (!wave)
     {
       BseWaveFileInfo *winfo = bse_wave_file_info_load (input_file.c_str(), &error);
@@ -137,7 +137,7 @@ main (int   argc,
                       sfi_warning ("failed to load wave chunk (%.3f) of wave \"%s\" in file \"%s\": %s 
(loader: %s)",
                                    wdsc->chunks[i].osc_freq, wdsc->name, input_file.c_str(), bse_error_blurb 
(error), bse_wave_file_info_loader (winfo));
                       if (skip_errors)
-                        error = BSE_ERROR_NONE;
+                        error = Bse::ERROR_NONE;
                       else
                         {
                           delete wave;
@@ -157,13 +157,13 @@ main (int   argc,
             {
               sfi_warning ("failed to load wave description from file \"%s\": %s (loader: %s)",
                            input_file.c_str(), bse_error_blurb (error), bse_wave_file_info_loader (winfo));
-              error = BSE_ERROR_NONE;
+              error = Bse::ERROR_NONE;
             }
           bse_wave_file_info_unref (winfo);
         }
     }
   if (!wave && !error)
-    error = BSE_ERROR_IO;       /* unknown */
+    error = Bse::ERROR_IO;       /* unknown */
   if (error)
     {
       sfi_error ("problems encountered loading bsewave file \"%s\": %s", input_file.c_str(), bse_error_blurb 
(error));
@@ -767,7 +767,7 @@ public:
         gsl_vorbis_encoder_set_quality (enc, quality);
         gsl_vorbis_encoder_set_n_channels (enc, wave->n_channels);
         gsl_vorbis_encoder_set_sample_freq (enc, guint (gsl_data_handle_mix_freq (dhandle)));
-        BseErrorType error = gsl_vorbis_encoder_setup_stream (enc, gsl_vorbis_make_serialno());
+        Bse::ErrorType error = gsl_vorbis_encoder_setup_stream (enc, gsl_vorbis_make_serialno());
         if (error)
           {
             sfi_error ("chunk % 7.2f/%.0f: failed to encode: %s",
@@ -1043,7 +1043,7 @@ public:
   }
   GslDataHandle*
   load_file_auto (const OptChunk &opt,
-                  BseErrorType   &error)
+                  Bse::ErrorType   &error)
   {
     GslDataHandle *dhandle = NULL;
     const char *sample_file = opt.sample_file;
@@ -1055,12 +1055,12 @@ public:
         if (wdsc && wdsc->n_chunks == 1)
           dhandle = bse_wave_handle_create (wdsc, 0, &error);
         else if (wdsc)
-          error = BSE_ERROR_FORMAT_INVALID;
+          error = Bse::ERROR_FORMAT_INVALID;
         if (wdsc)
           bse_wave_dsc_free (wdsc);
       }
     else if (winfo)
-      error = BSE_ERROR_FORMAT_INVALID;
+      error = Bse::ERROR_FORMAT_INVALID;
     if (winfo)
       bse_wave_file_info_unref (winfo);
     return dhandle;
@@ -1069,7 +1069,7 @@ public:
   load_file_raw (const OptChunk &opt,
                  guint           n_channels,
                  gfloat          osc_freq,
-                 BseErrorType   &error)
+                 Bse::ErrorType   &error)
   {
     GslDataHandle *dhandle = NULL;
     const char *sample_file = opt.sample_file;
@@ -1077,7 +1077,7 @@ public:
     dhandle = gsl_wave_handle_new (sample_file, n_channels,
                                    opt.load_format, opt.load_byte_order, opt.load_mix_freq, osc_freq,
                                    0, -1, NULL);
-    error = dhandle ? BSE_ERROR_NONE : BSE_ERROR_IO;
+    error = dhandle ? Bse::ERROR_NONE : Bse::ERROR_IO;
     return dhandle;
   }
   bool
@@ -1141,7 +1141,7 @@ public:
               exit (1);
             }
           /* add sample file */
-          BseErrorType error = BSE_ERROR_NONE;
+          Bse::ErrorType error = Bse::ERROR_NONE;
           GslDataHandle *dhandle;
           sfi_info ("LOAD: osc-freq=%g file=%s", osc_freq, ochunk.sample_file);
           if (load_raw)
@@ -1869,13 +1869,13 @@ public:
           cconfig.tail_silence = tail_silence;
           GslDataClipResult cresult;
           GslDataHandle *dhandle = chunk->dhandle;
-          BseErrorType error;
+          Bse::ErrorType error;
           error = gsl_data_clip_sample (dhandle, &cconfig, &cresult);
-          if (error == BSE_ERROR_DATA_UNMATCHED && cresult.clipped_to_0length)
+          if (error == Bse::ERROR_DATA_UNMATCHED && cresult.clipped_to_0length)
             {
               sfi_info ("Deleting 0-length chunk");
               deleted.push_back (it);
-              error = BSE_ERROR_NONE;
+              error = Bse::ERROR_NONE;
             }
           else if (error)
             {
@@ -1967,7 +1967,7 @@ public:
           sfi_info ("NORMALIZE: chunk %f", osc_freq);
           double absmax = gsl_data_find_min_max (chunk->dhandle, NULL, NULL);
           gchar **xinfos = bse_xinfos_dup_consolidated (chunk->dhandle->setup.xinfos, FALSE);
-          BseErrorType error = BSE_ERROR_NONE;
+          Bse::ErrorType error = Bse::ERROR_NONE;
           if (absmax > 4.6566e-10) /* 32bit threshold */
             {
               if (use_volume_xinfo)
@@ -2074,7 +2074,7 @@ public:
              xinfos = bse_xinfos_add_value (xinfos, "loop-algorithm", loop_algorithm);
 
              gsl_data_handle_ref (dhandle);
-             BseErrorType error = chunk->change_dhandle (dhandle, gsl_data_handle_osc_freq (dhandle), 
xinfos);
+             Bse::ErrorType error = chunk->change_dhandle (dhandle, gsl_data_handle_osc_freq (dhandle), 
xinfos);
              if (error)
                sfi_error ("looping failed: %s", bse_error_blurb (error));
              g_strfreev (xinfos);
@@ -2501,10 +2501,10 @@ public:
       }
     return (m_cutoff_freq <= 0); // missing args
   }
-  BseErrorType
+  Bse::ErrorType
   print_effective_stopband_start (GslDataHandle *fir_handle)
   {
-    BseErrorType error = gsl_data_handle_open (fir_handle);
+    Bse::ErrorType error = gsl_data_handle_open (fir_handle);
     if (error)
       return error;
     int64 freq_inc = 5; // FIXME
@@ -2525,7 +2525,7 @@ public:
        bse_data_handle_fir_response_db (fir_handle, best_freq), best_freq);
     gsl_data_handle_close (fir_handle);
 
-    return BSE_ERROR_NONE;
+    return Bse::ERROR_NONE;
   }
   bool
   exec (Wave *wave)
@@ -2548,7 +2548,7 @@ public:
          {
            GslDataHandle *fir_handle = create_fir_handle (dhandle);
 
-           BseErrorType error = print_effective_stopband_start (fir_handle);
+           Bse::ErrorType error = print_effective_stopband_start (fir_handle);
            if (!error)
              error = chunk->change_dhandle (fir_handle, 0, 0);
 
@@ -2656,7 +2656,7 @@ public:
           sfi_info ("  using resampler precision: %s\n",
                     bse_resampler2_precision_name (bse_resampler2_find_precision_for_bits 
(m_precision_bits)));
 
-          BseErrorType error = chunk->change_dhandle (bse_data_handle_new_upsample2 (dhandle, 
m_precision_bits), 0, 0);
+          Bse::ErrorType error = chunk->change_dhandle (bse_data_handle_new_upsample2 (dhandle, 
m_precision_bits), 0, 0);
           if (error)
             {
               sfi_error ("chunk % 7.2f/%.0f: %s",
@@ -2732,7 +2732,7 @@ public:
           sfi_info ("  using resampler precision: %s\n",
                     bse_resampler2_precision_name (bse_resampler2_find_precision_for_bits 
(m_precision_bits)));
 
-          BseErrorType error = chunk->change_dhandle (bse_data_handle_new_downsample2 (dhandle, 24), 0, 0);
+          Bse::ErrorType error = chunk->change_dhandle (bse_data_handle_new_downsample2 (dhandle, 24), 0, 0);
           if (error)
             {
               sfi_error ("chunk % 7.2f/%.0f: %s",
@@ -2918,14 +2918,14 @@ public:
          int fd = open (filename.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0666);
          if (fd < 0)
            {
-             BseErrorType error = bse_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+             Bse::ErrorType error = bse_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
              sfi_error ("export to file %s failed: %s", filename.c_str(), bse_error_blurb (error));
            }
 
          int xerrno = gsl_data_handle_dump_wav (dhandle, fd, 16, dhandle->setup.n_channels, (guint) 
dhandle->setup.mix_freq);
          if (xerrno)
            {
-             BseErrorType error = bse_error_from_errno (xerrno, BSE_ERROR_FILE_WRITE_FAILED);
+             Bse::ErrorType error = bse_error_from_errno (xerrno, Bse::ERROR_FILE_WRITE_FAILED);
              sfi_error ("export to file %s failed: %s", filename.c_str(), bse_error_blurb (error));
            }
          close (fd);
diff --git a/tools/bwtwave.cc b/tools/bwtwave.cc
index e51ebe3..d4ea403 100644
--- a/tools/bwtwave.cc
+++ b/tools/bwtwave.cc
@@ -40,7 +40,7 @@ WaveChunk::WaveChunk (const WaveChunk &rhs)
     gsl_data_handle_open (dhandle);
 }
 
-BseErrorType
+Bse::ErrorType
 WaveChunk::change_dhandle (GslDataHandle *xhandle,
                            gdouble        osc_freq,
                            gchar        **copy_xinfos)
@@ -55,25 +55,25 @@ WaveChunk::change_dhandle (GslDataHandle *xhandle,
       gsl_data_handle_unref (xhandle);
       xhandle = tmp_handle;
     }
-  BseErrorType error = gsl_data_handle_open (xhandle);
+  Bse::ErrorType error = gsl_data_handle_open (xhandle);
   gsl_data_handle_unref (xhandle);
   if (!error)
     {
       if (dhandle)
         gsl_data_handle_close (dhandle);
       dhandle = xhandle;
-      return BSE_ERROR_NONE;
+      return Bse::ERROR_NONE;
     }
   else
     return error;
 }
 
-BseErrorType
+Bse::ErrorType
 WaveChunk::set_dhandle_from_file (const string &fname,
                                   gdouble       osc_freq,
                                   gchar       **xinfos)
 {
-  BseErrorType error = BSE_ERROR_NONE;
+  Bse::ErrorType error = Bse::ERROR_NONE;
   BseWaveFileInfo *wfi = bse_wave_file_info_load (fname.c_str(), &error);
   GslDataHandle *xhandle = NULL;
   if (wfi)
@@ -107,11 +107,11 @@ Wave::Wave (const gchar    *wave_name,
 {
 }
 
-BseErrorType
+Bse::ErrorType
 Wave::add_chunk (GslDataHandle  *dhandle,
                  gchar         **xinfos)
 {
-  g_return_val_if_fail (dhandle != NULL, BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (dhandle != NULL, Bse::ERROR_INTERNAL);
 
   if (xinfos)
     {
@@ -122,7 +122,7 @@ Wave::add_chunk (GslDataHandle  *dhandle,
   else
     gsl_data_handle_ref (dhandle);
 
-  BseErrorType error = gsl_data_handle_open (dhandle);
+  Bse::ErrorType error = gsl_data_handle_open (dhandle);
   if (!error)
     {
       WaveChunk wc;
@@ -233,10 +233,10 @@ Wave::sort ()
 #endif
 }
 
-BseErrorType
+Bse::ErrorType
 Wave::store (const string file_name)
 {
-  g_return_val_if_fail (file_name.c_str() != NULL, BSE_ERROR_INTERNAL);
+  g_return_val_if_fail (file_name.c_str() != NULL, Bse::ERROR_INTERNAL);
 
   /* save to temporary file */
   gint fd;
@@ -252,7 +252,7 @@ Wave::store (const string file_name)
   if (fd < 0)
     {
       g_free (temp_file);
-      return bse_error_from_errno (errno, BSE_ERROR_FILE_OPEN_FAILED);
+      return bse_error_from_errno (errno, Bse::ERROR_FILE_OPEN_FAILED);
     }
 
   /* figure default mix_freq */
@@ -397,19 +397,19 @@ Wave::store (const string file_name)
 
   sfi_wstore_puts (wstore, "}\n");
   gint nerrno = sfi_wstore_flush_fd (wstore, fd);
-  BseErrorType error = bse_error_from_errno (-nerrno, BSE_ERROR_FILE_WRITE_FAILED);
-  if (close (fd) < 0 && error == BSE_ERROR_NONE)
-    error = bse_error_from_errno (errno, BSE_ERROR_FILE_WRITE_FAILED);
+  Bse::ErrorType error = bse_error_from_errno (-nerrno, Bse::ERROR_FILE_WRITE_FAILED);
+  if (close (fd) < 0 && error == Bse::ERROR_NONE)
+    error = bse_error_from_errno (errno, Bse::ERROR_FILE_WRITE_FAILED);
   sfi_wstore_destroy (wstore);
 
   /* replace output file by temporary file */
-  if (error != BSE_ERROR_NONE)
+  if (error != Bse::ERROR_NONE)
     {
       unlink (temp_file);
     }
   else if (rename (temp_file, file_name.c_str()) < 0)
     {
-      error = bse_error_from_errno (errno, BSE_ERROR_FILE_WRITE_FAILED);
+      error = bse_error_from_errno (errno, Bse::ERROR_FILE_WRITE_FAILED);
       unlink (temp_file);
     }
   g_free (temp_file);
diff --git a/tools/bwtwave.hh b/tools/bwtwave.hh
index 318d0dd..1c0246d 100644
--- a/tools/bwtwave.hh
+++ b/tools/bwtwave.hh
@@ -18,10 +18,10 @@ public:
   /*Con*/         WaveChunk();
   /*Copy*/        WaveChunk (const WaveChunk &rhs);
   WaveChunk&      operator= (const WaveChunk &);
-  BseErrorType    set_dhandle_from_file (const string &fname,
+  Bse::ErrorType    set_dhandle_from_file (const string &fname,
                                          gdouble       osc_freq,
                                          gchar       **xinfos);
-  BseErrorType    change_dhandle        (GslDataHandle *xhandle,
+  Bse::ErrorType    change_dhandle        (GslDataHandle *xhandle,
                                          gdouble        osc_freq,
                                          gchar        **xinfos);
   /*Des*/         ~WaveChunk();
@@ -53,14 +53,14 @@ public:
   {
     set_chunks_xinfo (key, value, osc_freq, false);
   }
-  BseErrorType          add_chunk       (GslDataHandle  *dhandle,
+  Bse::ErrorType          add_chunk       (GslDataHandle  *dhandle,
                                          gchar         **xinfos = NULL);
   GslDataHandle*        lookup          (gfloat          osc_freq);
   bool                  match           (const WaveChunk &wchunk,
                                          vector<float>   &sorted_freqs);
   void                  remove          (list<WaveChunk>::iterator it);
   void                  sort            ();
-  BseErrorType          store           (const string    file_name);
+  Bse::ErrorType          store           (const string    file_name);
   /*Des*/               ~Wave           ();
 };
 
diff --git a/tools/magictest.cc b/tools/magictest.cc
index 1438b31..ec00d76 100644
--- a/tools/magictest.cc
+++ b/tools/magictest.cc
@@ -83,7 +83,7 @@ main (gint   argc,
                   if (test_open)
                     {
                       BseWaveFileInfo *wfi;
-                      BseErrorType error = BSE_ERROR_NONE;
+                      Bse::ErrorType error = Bse::ERROR_NONE;
                       g_print ("\n  LOADER: %s\n", loader->name);
                       wfi = bse_wave_file_info_load (argv[i], &error);
                       if (wfi)
diff --git a/tools/mathtool.cc b/tools/mathtool.cc
index b0dea29..18a0a24 100644
--- a/tools/mathtool.cc
+++ b/tools/mathtool.cc
@@ -92,7 +92,7 @@ main (int   argc,
       while (file)
        {
          BseWaveFileInfo *fi;
-         BseErrorType error;
+         Bse::ErrorType error;
 
          fi = bse_wave_file_info_load (file, &error);
          if (fi)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]