[beast: 3/29] BSE: use Bse::Error::* instead of Bse::ERROR_*



commit fbb6dd0f06f812d1858ab4c372dd76e2e0682260
Author: Tim Janik <timj gnu org>
Date:   Thu Jan 28 00:36:09 2016 +0100

    BSE: use Bse::Error::* instead of Bse::ERROR_*
    
    Signed-off-by: Tim Janik <timj gnu org>

 bse/bsebus.cc                                   |   18 ++--
 bse/bsecategories.proc                          |    8 +-
 bse/bsecontainer.proc                           |    8 +-
 bse/bsedatahandle-fir.cc                        |    4 +-
 bse/bsedatahandle-flac.cc                       |   16 ++--
 bse/bsedatahandle-resample.cc                   |    4 +-
 bse/bsedevice.cc                                |   18 ++--
 bse/bseeditablesample.proc                      |   30 +++---
 bse/bseenums.hh                                 |  136 +++++++++++-----------
 bse/bseitem.cc                                  |   12 +-
 bse/bseitem.hh                                  |    4 +-
 bse/bseitem.proc                                |   92 ++++++++--------
 bse/bsejanitor.proc                             |   70 ++++++------
 bse/bseloader-aiff.cc                           |   52 +++++-----
 bse/bseloader-bsewave.cc                        |   36 +++---
 bse/bseloader-flac.cc                           |    6 +-
 bse/bseloader-guspatch.cc                       |   22 ++--
 bse/bseloader-mad.cc                            |    2 +-
 bse/bseloader-oggvorbis.cc                      |    6 +-
 bse/bseloader-wav.cc                            |   48 ++++----
 bse/bseloader.cc                                |   30 +++---
 bse/bsemididevice-null.cc                       |    4 +-
 bse/bsemididevice-oss.cc                        |   12 +-
 bse/bsemidifile.cc                              |   30 +++---
 bse/bsepart.cc                                  |   10 +-
 bse/bsepcmdevice-null.cc                        |    4 +-
 bse/bsepcmdevice-oss.cc                         |   36 +++---
 bse/bsepcmwriter.cc                             |   16 ++--
 bse/bseplugin.cc                                |    2 +-
 bse/bseprocedure.cc                             |   32 +++---
 bse/bseproject.cc                               |   40 ++++----
 bse/bseproject.proc                             |   40 ++++----
 bse/bseserver.cc                                |   32 +++---
 bse/bsesnet.cc                                  |   12 +-
 bse/bsesong.cc                                  |   14 +-
 bse/bsesong.proc                                |   20 ++--
 bse/bsesource.cc                                |   72 ++++++------
 bse/bsesource.proc                              |  126 +++++++++++-----------
 bse/bsestorage.cc                               |   16 ++--
 bse/bsetrack.cc                                 |    4 +-
 bse/bsewave.cc                                  |   14 +-
 bse/bsewave.proc                                |   16 ++--
 bse/bsewaveosc.cc                               |    2 +-
 bse/bsewaveosc.proc                             |   12 +-
 bse/bsewaverepo.proc                            |   14 +-
 bse/gslcommon.cc                                |   44 ++++----
 bse/gsldatahandle-mad.cc                        |   88 ++++++++--------
 bse/gsldatahandle-vorbis.cc                     |   30 +++---
 bse/gsldatahandle.cc                            |   38 +++---
 bse/gsldatautils.cc                             |   26 ++--
 bse/gslvorbis-enc.cc                            |    8 +-
 bse/gslwavechunk.cc                             |   12 +-
 bse/tests/loophandle.cc                         |    4 +-
 drivers/bse-portaudio/bsepcmdevice-portaudio.cc |   50 ++++----
 drivers/bsemididevice-alsa.cc                   |    8 +-
 drivers/bsepcmdevice-alsa.cc                    |   56 +++++-----
 tests/bse/cxxbinding.cc                         |    2 +-
 tools/bseloopfuncs.cc                           |   12 +-
 tools/bsewavetool.cc                            |   28 +++---
 tools/bwtwave.cc                                |   20 ++--
 tools/magictest.cc                              |    2 +-
 61 files changed, 815 insertions(+), 815 deletions(-)
---
diff --git a/bse/bsebus.cc b/bse/bsebus.cc
index 2926788..8c40f69 100644
--- a/bse/bsebus.cc
+++ b/bse/bsebus.cc
@@ -667,7 +667,7 @@ 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;
 }
 
 Bse::ErrorType
@@ -680,10 +680,10 @@ 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;
+    return Bse::Error::SOURCE_PARENT_MISMATCH;
   Bse::ErrorType error = bse_source_set_input (self->summation, 0, osource, 0);
   if (!error)
     {
@@ -709,9 +709,9 @@ 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);
@@ -754,7 +754,7 @@ bus_restore_add_input (gpointer     data,
       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",
@@ -942,7 +942,7 @@ ErrorType
 BusImpl::ensure_output ()
 {
   BseBus *self = as<BseBus*>();
-  ErrorType error = ERROR_NONE;
+  ErrorType error = Error::NONE;
   BseItem *parent = self->parent;
   if (BSE_IS_SONG (parent) && !self->bus_outputs)
     {
@@ -963,7 +963,7 @@ BusImpl::connect_bus (BusIface &busi)
   BseBus *self = as<BseBus*>();
   BusImpl &bus = dynamic_cast<BusImpl&> (busi);
   if (!this->parent() || this->parent() != bus.parent())
-    return ERROR_SOURCE_PARENT_MISMATCH;
+    return Error::SOURCE_PARENT_MISMATCH;
 
   ErrorType error = bse_bus_connect (self, bus.as<BseItem*>());
   if (!error)
@@ -984,7 +984,7 @@ BusImpl::connect_track (TrackIface &tracki)
   BseBus *self = as<BseBus*>();
   TrackImpl &track = dynamic_cast<TrackImpl&> (tracki);
   if (!this->parent() || this->parent() != track.parent())
-    return ERROR_SOURCE_PARENT_MISMATCH;
+    return Error::SOURCE_PARENT_MISMATCH;
 
   ErrorType error = bse_bus_connect (self, track.as<BseItem*>());
   if (!error)
diff --git a/bse/bsecategories.proc b/bse/bsecategories.proc
index 6cdd0ad..f65f8e5 100644
--- a/bse/bsecategories.proc
+++ b/bse/bsecategories.proc
@@ -30,7 +30,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);
@@ -40,7 +40,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") {
@@ -59,7 +59,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)
@@ -68,5 +68,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 221f1b2..e2c68cf 100644
--- a/bse/bsecontainer.proc
+++ b/bse/bsecontainer.proc
@@ -23,12 +23,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) {
@@ -51,10 +51,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 d98b158..121c3c3 100644
--- a/bse/bsedatahandle-fir.cc
+++ b/bse/bsedatahandle-fir.cc
@@ -68,7 +68,7 @@ public:
   open (GslDataHandleSetup *setup)
   {
     Bse::ErrorType error = gsl_data_handle_open (m_src_handle);
-    if (error != Bse::ERROR_NONE)
+    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
diff --git a/bse/bsedatahandle-flac.cc b/bse/bsedatahandle-flac.cc
index 6f22176..ec6147d 100644
--- a/bse/bsedatahandle-flac.cc
+++ b/bse/bsedatahandle-flac.cc
@@ -172,11 +172,11 @@ public:
   {
     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()
@@ -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 076012e..05e40b2 100644
--- a/bse/bsedatahandle-resample.cc
+++ b/bse/bsedatahandle-resample.cc
@@ -127,7 +127,7 @@ public:
   open (GslDataHandleSetup *setup)
   {
     Bse::ErrorType error = gsl_data_handle_open (m_src_handle);
-    if (error != Bse::ERROR_NONE)
+    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()
diff --git a/bse/bsedevice.cc b/bse/bsedevice.cc
index a05a8fe..d9d265f 100644
--- a/bse/bsedevice.cc
+++ b/bse/bsedevice.cc
@@ -58,21 +58,21 @@ device_open_args (BseDevice      *self,
 
   if (!error)
     {
-      assert_return (BSE_DEVICE_OPEN (self), Bse::ERROR_INTERNAL);
-      assert_return (self->open_device_name != NULL, Bse::ERROR_INTERNAL); /* bse_device_set_opened() was 
not called */
+      assert_return (BSE_DEVICE_OPEN (self), Bse::Error::INTERNAL);
+      assert_return (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
-    assert_return (!BSE_DEVICE_OPEN (self), Bse::ERROR_INTERNAL);
+    assert_return (!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;
@@ -84,9 +84,9 @@ bse_device_open (BseDevice      *self,
                  gboolean        need_writable,
                  const char     *arg_string)
 {
-  assert_return (BSE_IS_DEVICE (self), Bse::ERROR_INTERNAL);
-  assert_return (!BSE_DEVICE_OPEN (self), Bse::ERROR_INTERNAL);
-  Bse::ErrorType error = Bse::ERROR_DEVICE_NOT_AVAILABLE;
+  assert_return (BSE_IS_DEVICE (self), Bse::Error::INTERNAL);
+  assert_return (!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
@@ -378,7 +378,7 @@ bse_device_open_auto (GType           base_type,
                       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);
@@ -422,7 +422,7 @@ bse_device_open_best (GType           base_type,
                       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;
diff --git a/bse/bseeditablesample.proc b/bse/bseeditablesample.proc
index 43b19b3..a0e6a1f 100644
--- a/bse/bseeditablesample.proc
+++ b/bse/bseeditablesample.proc
@@ -14,7 +14,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,
@@ -26,15 +26,15 @@ METHOD (BseEditableSample, open) {
 
   /* 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
     {
@@ -46,7 +46,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) {
@@ -62,14 +62,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) {
@@ -88,14 +88,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) {
@@ -113,12 +113,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) {
@@ -136,12 +136,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, collect-stats) {
@@ -174,7 +174,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))
@@ -220,5 +220,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.hh b/bse/bseenums.hh
index e17bc15..b489498 100644
--- a/bse/bseenums.hh
+++ b/bse/bseenums.hh
@@ -55,74 +55,74 @@ typedef enum
 #ifdef  BSE_IDL_SURROGATES
 typedef enum
 {
-  BSE_ERROR_NONE = Bse::ERROR_NONE,
-  BSE_ERROR_INTERNAL = Bse::ERROR_INTERNAL,
-  BSE_ERROR_UNKNOWN = Bse::ERROR_UNKNOWN,
-  BSE_ERROR_IO = Bse::ERROR_IO,
-  BSE_ERROR_PERMS = Bse::ERROR_PERMS,
-  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,
-  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,
-  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,
-  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,
-  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,
-  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,
-  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,
-  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,
+  BSE_ERROR_INTERNAL = Bse::Error::INTERNAL,
+  BSE_ERROR_UNKNOWN = Bse::Error::UNKNOWN,
+  BSE_ERROR_IO = Bse::Error::IO,
+  BSE_ERROR_PERMS = Bse::Error::PERMS,
+  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,
+  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,
+  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,
+  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,
+  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,
+  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,
+  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,
+  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,
 } BseErrorType;
 typedef enum
 {
diff --git a/bse/bseitem.cc b/bse/bseitem.cc
index 70ec79d..5b1cba9 100644
--- a/bse/bseitem.cc
+++ b/bse/bseitem.cc
@@ -758,7 +758,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) */
@@ -780,8 +780,8 @@ bse_item_exec (void       *_item,
   va_list var_args;
   Bse::ErrorType error;
 
-  assert_return (BSE_IS_ITEM (item), Bse::ERROR_INTERNAL);
-  assert_return (procedure != NULL, Bse::ERROR_INTERNAL);
+  assert_return (BSE_IS_ITEM (item), Bse::Error::INTERNAL);
+  assert_return (procedure != NULL, Bse::Error::INTERNAL);
 
   va_start (var_args, procedure);
   error = bse_item_execva_i (item, procedure, var_args, FALSE);
@@ -799,8 +799,8 @@ bse_item_exec_void (void       *_item,
   va_list var_args;
   Bse::ErrorType error;
 
-  assert_return (BSE_IS_ITEM (item), Bse::ERROR_INTERNAL);
-  assert_return (procedure != NULL, Bse::ERROR_INTERNAL);
+  assert_return (BSE_IS_ITEM (item), Bse::Error::INTERNAL);
+  assert_return (procedure != NULL, Bse::Error::INTERNAL);
 
   va_start (var_args, procedure);
   error = bse_item_execva_i (item, procedure, var_args, TRUE);
@@ -1343,7 +1343,7 @@ ItemImpl::push_property_undo (const String &property_name)
         const bool success = self.__aida_set__ (property_name, saved_value);
         if (!success)
           critical ("%s: failed to undo property change for '%s': %s", __func__, property_name, 
saved_value.repr());
-        return ERROR_NONE;
+        return Error::NONE;
       };
       push_undo (__func__, *this, lambda);
     }
diff --git a/bse/bseitem.hh b/bse/bseitem.hh
index 65414da..0dced22 100644
--- a/bse/bseitem.hh
+++ b/bse/bseitem.hh
@@ -189,7 +189,7 @@ public:
     UndoLambda lambda = [function, args...] (ItemImpl &item, BseUndoStack *ustack) {
       ItemT &self = dynamic_cast<ItemT&> (item);
       (self.*function) (args...); // ignoring return type R
-      return ERROR_NONE;
+      return Error::NONE;
     };
     push_item_undo (blurb, lambda);
   }
@@ -213,7 +213,7 @@ public:
     RAPICORN_ASSERT_RETURN (this == &self);
     auto lambda = [blurb, undo_lambda] (ItemT &self, BseUndoStack *ustack) -> ErrorType {
       self.push_undo (blurb, self, undo_lambda);
-      return ERROR_NONE;
+      return Error::NONE;
     };
     push_undo (blurb, self, lambda);
   }
diff --git a/bse/bseitem.proc b/bse/bseitem.proc
index 7a02962..a57999f 100644
--- a/bse/bseitem.proc
+++ b/bse/bseitem.proc
@@ -28,12 +28,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) {
@@ -52,12 +52,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) {
@@ -76,12 +76,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) {
@@ -100,12 +100,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) {
@@ -124,12 +124,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) {
@@ -147,12 +147,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) {
@@ -170,12 +170,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) {
@@ -194,7 +194,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);
 
@@ -202,7 +202,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) {
@@ -220,12 +220,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) {
@@ -243,7 +243,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);
@@ -251,7 +251,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) {
@@ -267,15 +267,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) {
@@ -294,13 +294,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;
 }
 
 
@@ -319,12 +319,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) {
@@ -343,7 +343,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);
@@ -352,7 +352,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) {
@@ -372,12 +372,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) {
@@ -409,7 +409,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) {
@@ -429,7 +429,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();
@@ -440,7 +440,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) {
@@ -460,12 +460,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, group-undo) {
@@ -485,13 +485,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) {
@@ -508,13 +508,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) {
@@ -530,13 +530,13 @@ METHOD (BseItem, undo) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (self))
-    return Bse::ERROR_PROC_PARAM_INVAL;
+    return Bse::Error::PROC_PARAM_INVAL;
 
   Bse::ProjectIface *project = bse_item_get_project (self)->as<Bse::ProjectIface*>();
   if (project)
     project->undo();
 
-  return Bse::ERROR_NONE;
+  return Bse::Error::NONE;
 }
 
 METHOD (BseItem, redo) {
@@ -552,13 +552,13 @@ METHOD (BseItem, redo) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (self))
-    return Bse::ERROR_PROC_PARAM_INVAL;
+    return Bse::Error::PROC_PARAM_INVAL;
 
   Bse::ProjectIface *project = bse_item_get_project (self)->as<Bse::ProjectIface*>();
   if (project)
     project->redo();
 
-  return Bse::ERROR_NONE;
+  return Bse::Error::NONE;
 }
 
 METHOD (BseItem, clear-undo) {
@@ -574,11 +574,11 @@ METHOD (BseItem, clear-undo) {
 
   /* check parameters */
   if (!BSE_IS_ITEM (self))
-    return Bse::ERROR_PROC_PARAM_INVAL;
+    return Bse::Error::PROC_PARAM_INVAL;
 
   Bse::ProjectIface *project = bse_item_get_project (self)->as<Bse::ProjectIface*>();
   if (project)
     project->clear_undo();
 
-  return Bse::ERROR_NONE;
+  return Bse::Error::NONE;
 }
diff --git a/bse/bsejanitor.proc b/bse/bsejanitor.proc
index 81c268e..927482f 100644
--- a/bse/bsejanitor.proc
+++ b/bse/bsejanitor.proc
@@ -28,12 +28,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) {
@@ -52,12 +52,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) {
@@ -76,12 +76,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) {
@@ -100,12 +100,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) {
@@ -127,13 +127,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) {
@@ -155,14 +155,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) {
@@ -184,13 +184,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) {
@@ -207,12 +207,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") {
@@ -228,12 +228,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") {
@@ -257,16 +257,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") {
@@ -284,16 +284,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") {
@@ -310,18 +310,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") {
@@ -339,16 +339,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") {
@@ -368,7 +368,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++);
@@ -403,10 +403,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;
   (void) domain;
 }
 
@@ -421,11 +421,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 30cfadb..88831c1 100644
--- a/bse/bseloader-aiff.cc
+++ b/bse/bseloader-aiff.cc
@@ -154,21 +154,21 @@ 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 Bse::ErrorType
@@ -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,7 +198,7 @@ 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 Bse::ErrorType
@@ -209,7 +209,7 @@ 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);
@@ -227,7 +227,7 @@ 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 Bse::ErrorType
@@ -238,21 +238,21 @@ 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 Bse::ErrorType
@@ -274,7 +274,7 @@ 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 Bse::ErrorType
@@ -283,13 +283,13 @@ aiff_file_load (int       fd,
 {
   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 */
@@ -299,7 +299,7 @@ aiff_file_load (int       fd,
       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
@@ -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);
diff --git a/bse/bseloader-bsewave.cc b/bse/bseloader-bsewave.cc
index c0ab4ff..6f3f5f5 100644
--- a/bse/bseloader-bsewave.cc
+++ b/bse/bseloader-bsewave.cc
@@ -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;
@@ -574,7 +574,7 @@ bsewave_load_wave_dsc (void            *data,
   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;
     }
 
@@ -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;
 }
 
@@ -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 7b4f228..4998a4e 100644
--- a/bse/bseloader-flac.cc
+++ b/bse/bseloader-flac.cc
@@ -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;
       }
 
diff --git a/bse/bseloader-guspatch.cc b/bse/bseloader-guspatch.cc
index 72e29d8..14d947c 100644
--- a/bse/bseloader-guspatch.cc
+++ b/bse/bseloader-guspatch.cc
@@ -38,11 +38,11 @@ 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 Bse::ErrorType
 skip (FILE *file,
@@ -54,7 +54,7 @@ skip (FILE *file,
       read_or_return_error (fread_block (file, 1, &junk));
       len--;
     }
-  return Bse::ERROR_NONE;
+  return Bse::Error::NONE;
 }
 
 static inline Bse::ErrorType
@@ -92,7 +92,7 @@ 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 Bse::ErrorType
@@ -104,7 +104,7 @@ 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 */
@@ -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
@@ -159,7 +159,7 @@ struct PatHeader
 
     read_or_return_error (fread_string (file, reserved, 36));
 
-    return Bse::ERROR_NONE;
+    return Bse::Error::NONE;
   }
 };
 
@@ -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;
   }
 };
 
@@ -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
@@ -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;
       }
 
diff --git a/bse/bseloader-mad.cc b/bse/bseloader-mad.cc
index 48803bd..dec4e4c 100644
--- a/bse/bseloader-mad.cc
+++ b/bse/bseloader-mad.cc
@@ -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 90f04c8..0502dba 100644
--- a/bse/bseloader-oggvorbis.cc
+++ b/bse/bseloader-oggvorbis.cc
@@ -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;
     }
 
@@ -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 c611f86..20fa4f2 100644
--- a/bse/bseloader-wav.cc
+++ b/bse/bseloader-wav.cc
@@ -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
@@ -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
@@ -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
@@ -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;
     }
 
@@ -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 < ssize_t (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",
diff --git a/bse/bseloader.cc b/bse/bseloader.cc
index 2dfb330..15ad675 100644
--- a/bse/bseloader.cc
+++ b/bse/bseloader.cc
@@ -134,11 +134,11 @@ bse_wave_file_info_load (const char   *file_name,
                         Bse::ErrorType *error_p)
 {
   BseWaveFileInfo *finfo = NULL;
-  Bse::ErrorType 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;
   assert_return (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)
@@ -237,12 +237,12 @@ bse_wave_dsc_load (BseWaveFileInfo *wave_file_info,
                    gboolean         accept_empty,
                    Bse::ErrorType    *error_p)
 {
-  Bse::ErrorType 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;
   assert_return (wave_file_info != NULL, NULL);
   assert_return (wave_file_info->loader != NULL, NULL);
   assert_return (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;
        }
     }
 
@@ -300,12 +300,12 @@ bse_wave_handle_create (BseWaveDsc   *wave_dsc,
                        uint          nth_chunk,
                        Bse::ErrorType *error_p)
 {
-  Bse::ErrorType 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;
   assert_return (wave_dsc != NULL, NULL);
   assert_return (wave_dsc->file_info != NULL, NULL);
   assert_return (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;
@@ -341,7 +341,7 @@ bse_wave_chunk_create (BseWaveDsc   *wave_dsc,
   GslWaveChunk *wchunk;
 
   if (error_p)
-    *error_p = Bse::ERROR_INTERNAL;
+    *error_p = Bse::Error::INTERNAL;
   assert_return (wave_dsc != NULL, NULL);
   assert_return (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/bsemididevice-null.cc b/bse/bsemididevice-null.cc
index 3d711b0..09358fc 100644
--- a/bse/bsemididevice-null.cc
+++ b/bse/bsemididevice-null.cc
@@ -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 221a2e7..ccd39c8 100644
--- a/bse/bsemididevice-oss.cc
+++ b/bse/bsemididevice-oss.cc
@@ -57,7 +57,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);
     }
@@ -76,17 +76,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),
@@ -147,10 +147,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 4bcd93e..adade17 100644
--- a/bse/bsemidifile.cc
+++ b/bse/bsemidifile.cc
@@ -55,7 +55,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);
@@ -67,40 +67,40 @@ 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 Bse::ErrorType
@@ -115,7 +115,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);
@@ -124,7 +124,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;
@@ -135,12 +135,12 @@ 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*
@@ -155,7 +155,7 @@ bse_midi_file_load (const char   *file_name,
     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;
     }
 
@@ -212,7 +212,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;
 }
 
diff --git a/bse/bsepart.cc b/bse/bsepart.cc
index 3b71a6c..1b0c342 100644
--- a/bse/bsepart.cc
+++ b/bse/bsepart.cc
@@ -775,7 +775,7 @@ bse_part_insert_note (BsePart *self,
 {
   BsePartEventNote key = { 0 };
   const bool use_any_channel = channel == ~uint (0);
-  assert_return (BSE_IS_PART (self), Bse::ERROR_INTERNAL);
+  assert_return (BSE_IS_PART (self), Bse::Error::INTERNAL);
   if (use_any_channel)
     channel = 0;
   else if (channel >= self->n_channels)
@@ -839,7 +839,7 @@ bse_part_insert_control (BsePart          *self,
   BsePartTickNode *node;
   BsePartEventControl *cev;
   guint id;
-  assert_return (BSE_IS_PART (self), Bse::ERROR_INTERNAL);
+  assert_return (BSE_IS_PART (self), Bse::Error::INTERNAL);
 
   if (!(value >= -1 && value <= +1 &&
         tick < BSE_PART_MAX_TICK &&
@@ -2216,7 +2216,7 @@ PartImpl::change_control (int id, int tick, MidiSignalType control_type, double
           default: ;
           }
     }
-  return success ? ERROR_NONE : ERROR_NO_EVENT;
+  return success ? Error::NONE : Error::NO_EVENT;
 }
 
 ErrorType
@@ -2241,7 +2241,7 @@ PartImpl::change_note (int id, int tick, int duration, int note, int fine_tune,
       else
         success = true;
     }
-  return success ? ERROR_NONE : ERROR_NO_EVENT;
+  return success ? Error::NONE : Error::NO_EVENT;
 }
 
 ErrorType
@@ -2265,7 +2265,7 @@ PartImpl::delete_event (int id)
         push_undo ("Delete MIDI Control", *this, &PartImpl::insert_control, equery.tick,
                    equery.control_type, equery.control_value);
     }
-  return deleted ? ERROR_NONE : ERROR_NO_EVENT;
+  return deleted ? Error::NONE : Error::NO_EVENT;
 }
 
 void
diff --git a/bse/bsepcmdevice-null.cc b/bse/bsepcmdevice-null.cc
index 6bc2b3e..f5b8aa2 100644
--- a/bse/bsepcmdevice-null.cc
+++ b/bse/bsepcmdevice-null.cc
@@ -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 5a58d72..8e0655f 100644
--- a/bse/bsepcmdevice-oss.cc
+++ b/bse/bsepcmdevice-oss.cc
@@ -86,7 +86,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);
     }
@@ -105,12 +105,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),
@@ -183,7 +183,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)
@@ -244,32 +244,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);
@@ -285,24 +285,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;
     }
@@ -331,7 +331,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 189161f..70cd6ce 100644
--- a/bse/bsepcmwriter.cc
+++ b/bse/bsepcmwriter.cc
@@ -69,11 +69,11 @@ bse_pcm_writer_open (BsePcmWriter *self,
                      uint64        recorded_maximum)
 {
   gint fd;
-  assert_return (BSE_IS_PCM_WRITER (self), Bse::ERROR_INTERNAL);
-  assert_return (!self->open, Bse::ERROR_INTERNAL);
-  assert_return (file != NULL, Bse::ERROR_INTERNAL);
-  assert_return (n_channels > 0, Bse::ERROR_INTERNAL);
-  assert_return (sample_freq >= 1000, Bse::ERROR_INTERNAL);
+  assert_return (BSE_IS_PCM_WRITER (self), Bse::Error::INTERNAL);
+  assert_return (!self->open, Bse::Error::INTERNAL);
+  assert_return (file != NULL, Bse::Error::INTERNAL);
+  assert_return (n_channels > 0, Bse::Error::INTERNAL);
+  assert_return (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/bseplugin.cc b/bse/bseplugin.cc
index d8c48d5..e381c8d 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 f888c69..e8e1ec0 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;
-  assert_return (ret_type != NULL, bse_error_blurb (Bse::ERROR_INTERNAL));
+  assert_return (ret_type != NULL, bse_error_blurb (Bse::Error::INTERNAL));
   *ret_type = 0;
-  assert_return (name != NULL, bse_error_blurb (Bse::ERROR_INTERNAL));
-  assert_return (plugin != NULL, bse_error_blurb (Bse::ERROR_INTERNAL));
+  assert_return (name != NULL, bse_error_blurb (Bse::Error::INTERNAL));
+  assert_return (plugin != NULL, bse_error_blurb (Bse::Error::INTERNAL));
   GType type = g_type_from_name (name);
   if (type)
     return "Procedure already registered";
@@ -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())
@@ -278,7 +278,7 @@ 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;
   Bse::ErrorType error;
-  assert_return (BSE_TYPE_IS_PROCEDURE (proc_type), Bse::ERROR_INTERNAL);
+  assert_return (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);
@@ -338,7 +338,7 @@ bse_procedure_call_collect (BseProcedureClass  *proc,
                             va_list             var_args)
 {
   guint i, bail_out = FALSE;
-  Bse::ErrorType 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));
@@ -455,7 +455,7 @@ bse_procedure_marshal_valist (GType               proc_type,
                               gboolean            skip_ovalues,
                               va_list             var_args)
 {
-  assert_return (BSE_TYPE_IS_PROCEDURE (proc_type), Bse::ERROR_INTERNAL);
+  assert_return (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);
   Bse::ErrorType error = bse_procedure_call_collect (proc, first_value, marshal, marshal_data,
@@ -486,7 +486,7 @@ bse_procedure_collect_input_args (BseProcedureClass  *proc,
                                   GValue              ivalues[BSE_PROCEDURE_MAX_IN_PARAMS])
 {
   Bse::ErrorType error;
-  assert_return (BSE_IS_PROCEDURE_CLASS (proc), Bse::ERROR_INTERNAL);
+  assert_return (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));
@@ -503,13 +503,13 @@ bse_procedure_exec (const gchar *proc_name,
 {
   GType proc_type;
 
-  assert_return (proc_name != NULL, Bse::ERROR_INTERNAL);
+  assert_return (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
     {
@@ -529,13 +529,13 @@ bse_procedure_exec_void (const gchar *proc_name,
 {
   GType proc_type;
 
-  assert_return (proc_name != NULL, Bse::ERROR_INTERNAL);
+  assert_return (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
     {
@@ -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/bseproject.cc b/bse/bseproject.cc
index 8d12538..6d2951a 100644
--- a/bse/bseproject.cc
+++ b/bse/bseproject.cc
@@ -459,17 +459,17 @@ bse_project_store_bse (BseProject  *self,
   guint l, flags;
   gint fd;
 
-  assert_return (BSE_IS_PROJECT (self), Bse::ERROR_INTERNAL);
+  assert_return (BSE_IS_PROJECT (self), Bse::Error::INTERNAL);
   if (super)
     {
-      assert_return (BSE_IS_SUPER (super), Bse::ERROR_INTERNAL);
-      assert_return (BSE_ITEM (super)->parent == BSE_ITEM (self), Bse::ERROR_INTERNAL);
+      assert_return (BSE_IS_SUPER (super), Bse::Error::INTERNAL);
+      assert_return (BSE_ITEM (super)->parent == BSE_ITEM (self), Bse::Error::INTERNAL);
     }
-  assert_return (bse_file != NULL, Bse::ERROR_INTERNAL);
+  assert_return (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;
@@ -495,8 +495,8 @@ bse_project_store_bse (BseProject  *self,
   g_free (string);
 
   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);
+  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);
 
@@ -510,11 +510,11 @@ bse_project_restore (BseProject *self,
   GScanner *scanner;
   GTokenType expected_token = G_TOKEN_NONE;
 
-  assert_return (BSE_IS_PROJECT (self), Bse::ERROR_INTERNAL);
-  assert_return (BSE_IS_STORAGE (storage), Bse::ERROR_INTERNAL);
+  assert_return (BSE_IS_PROJECT (self), Bse::Error::INTERNAL);
+  assert_return (BSE_IS_STORAGE (storage), Bse::Error::INTERNAL);
 
   scanner = bse_storage_get_scanner (storage);
-  assert_return (scanner != NULL, Bse::ERROR_INTERNAL);
+  assert_return (scanner != NULL, Bse::Error::INTERNAL);
 
   g_object_ref (self);
 
@@ -538,8 +538,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*
@@ -639,7 +639,7 @@ bse_project_create_intern_synth (BseProject  *self,
   if (bse_synth)
     {
       BseStorage *storage = (BseStorage*) bse_object_new (BSE_TYPE_STORAGE, NULL);
-      Bse::ErrorType 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);
@@ -653,7 +653,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);
@@ -755,12 +755,12 @@ bse_project_activate (BseProject *self)
   BseTrans *trans;
   GSList *slist;
 
-  assert_return (BSE_IS_PROJECT (self), Bse::ERROR_INTERNAL);
+  assert_return (BSE_IS_PROJECT (self), Bse::Error::INTERNAL);
 
   if (self->state != BSE_PROJECT_INACTIVE)
-    return Bse::ERROR_NONE;
+    return Bse::Error::NONE;
 
-  assert_return (BSE_SOURCE_PREPARED (self) == FALSE, Bse::ERROR_INTERNAL);
+  assert_return (BSE_SOURCE_PREPARED (self) == FALSE, Bse::Error::INTERNAL);
 
   error = bse_server_open_devices (bse_server_get ());
   if (error)
@@ -787,7 +787,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
@@ -1136,7 +1136,7 @@ ErrorType
 ProjectImpl::import_midi_file (const String &file_name)
 {
   BseProject *self = as<BseProject*>();
-  Bse::ErrorType error = Bse::ERROR_NONE;
+  Bse::ErrorType error = Bse::Error::NONE;
   BseMidiFile *smf = bse_midi_file_load (file_name.c_str(), &error);
   if (!error)
     {
@@ -1173,7 +1173,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.proc b/bse/bseproject.proc
index 87fea3f..0c9f61d 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,
@@ -75,16 +75,16 @@ METHOD (BseProject, store-bse, "File/Store") {
 
   /* 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, create-csynth) {
@@ -170,7 +170,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");
@@ -183,7 +183,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) {
@@ -206,7 +206,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");
@@ -219,7 +219,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) {
@@ -239,7 +239,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))
@@ -255,7 +255,7 @@ METHOD (BseProject, remove-snet) {
       bse_item_undo_close (ustack);
     }
 
-  return Bse::ERROR_NONE;
+  return Bse::Error::NONE;
 }
 
 METHOD (BseProject, get-supers) {
@@ -274,7 +274,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_it3m_seq_new ();
@@ -284,7 +284,7 @@ METHOD (BseProject, get-supers) {
   /* set output parameters */
   bse_value_take_boxed (out_values++, iseq);
 
-  return Bse::ERROR_NONE;
+  return Bse::Error::NONE;
 }
 
 
@@ -303,10 +303,10 @@ 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/bseserver.cc b/bse/bseserver.cc
index c8ef4ef..7badaea 100644
--- a/bse/bseserver.cc
+++ b/bse/bseserver.cc
@@ -465,8 +465,8 @@ server_open_pcm_device (BseServer *server,
                         guint      latency,
                         guint      block_size)
 {
-  assert_return (server->pcm_device == NULL, Bse::ERROR_INTERNAL);
-  Bse::ErrorType error = Bse::ERROR_UNKNOWN;
+  assert_return (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,12 +492,12 @@ 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 Bse::ErrorType
 server_open_midi_device (BseServer *server)
 {
-  assert_return (server->midi_device == NULL, Bse::ERROR_INTERNAL);
+  assert_return (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;
 }
 Bse::ErrorType
 bse_server_open_devices (BseServer *self)
 {
-  Bse::ErrorType error = Bse::ERROR_NONE;
-  assert_return (BSE_IS_SERVER (self), Bse::ERROR_INTERNAL);
+  Bse::ErrorType error = Bse::Error::NONE;
+  assert_return (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 ();
@@ -546,7 +546,7 @@ bse_server_open_devices (BseServer *self)
       mix_freq = aligned_freq;
       bse_engine_constrain (latency, mix_freq, BSE_GCONFIG (synth_control_freq), &block_size, NULL);
       Bse::ErrorType new_error = server_open_pcm_device (self, mix_freq, latency, block_size);
-      error = new_error ? error : Bse::ERROR_NONE;
+      error = new_error ? error : Bse::Error::NONE;
     }
   if (!error)
     error = server_open_midi_device (self);
@@ -774,10 +774,10 @@ bse_server_run_remote (BseServer         *server,
   gint child_pid, command_input, command_output;
   BseJanitor *janitor = NULL;
 
-  assert_return (BSE_IS_SERVER (server), Bse::ERROR_INTERNAL);
-  assert_return (process_name != NULL, Bse::ERROR_INTERNAL);
-  assert_return (script_name != NULL, Bse::ERROR_INTERNAL);
-  assert_return (proc_name != NULL, Bse::ERROR_INTERNAL);
+  assert_return (BSE_IS_SERVER (server), Bse::Error::INTERNAL);
+  assert_return (process_name != NULL, Bse::Error::INTERNAL);
+  assert_return (script_name != NULL, Bse::Error::INTERNAL);
+  assert_return (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;
 }
 
 
@@ -1554,7 +1554,7 @@ ServerImpl::sample_file_info (const String &filename)
   info.file = filename;
   struct stat sbuf = { 0, };
   if (stat (filename.c_str(), &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;
diff --git a/bse/bsesnet.cc b/bse/bsesnet.cc
index 83ea142..a2a62da 100644
--- a/bse/bsesnet.cc
+++ b/bse/bsesnet.cc
@@ -931,12 +931,12 @@ SNetImpl::can_create_source (const String &module_type)
 {
   BseSNet *self = as<BseSNet*>();
   GType type = g_type_from_name (module_type.c_str());
-  ErrorType error = ERROR_NONE;
+  ErrorType error = Error::NONE;
   if (!BSE_SNET_USER_SYNTH (self) && !BSE_DBG_EXT)
-    error = ERROR_NOT_OWNER;
+    error = Error::NOT_OWNER;
   else if (!g_type_is_a (type, BSE_TYPE_SOURCE) ||
           g_type_is_a (type, BSE_TYPE_CONTAINER))
-    error = ERROR_SOURCE_TYPE_INVALID;
+    error = Error::SOURCE_TYPE_INVALID;
   return error;
 }
 
@@ -944,7 +944,7 @@ SourceIfaceP
 SNetImpl::create_source (const String &module_type)
 {
   BseSNet *self = as<BseSNet*>();
-  if (can_create_source (module_type) != ERROR_NONE)
+  if (can_create_source (module_type) != Error::NONE)
     return NULL;
   BseUndoStack *ustack = bse_item_undo_open (self, __func__);
   BseSource *child = (BseSource*) bse_container_new_child (self, g_type_from_name (module_type.c_str()), 
NULL);
@@ -966,9 +966,9 @@ SNetImpl::remove_source (SourceIface &module)
 {
   BseSNet *self = as<BseSNet*>();
   BseSource *child = module.as<BseSource*>();
-  Bse::ErrorType error = Bse::ERROR_NONE;
+  Bse::ErrorType error = Bse::Error::NONE;
   if (!BSE_IS_SOURCE (child) || child->parent != self || (!BSE_SNET_USER_SYNTH (self) && !BSE_DBG_EXT))
-    return ERROR_PROC_PARAM_INVAL;
+    return Error::PROC_PARAM_INVAL;
   BseUndoStack *ustack = bse_item_undo_open (self, string_format ("%s: %s", __func__, bse_object_debug_name 
(child)).c_str());
   bse_container_uncross_undoable (self, child);
   {
diff --git a/bse/bsesong.cc b/bse/bsesong.cc
index 89e97bb..f2ce9cc 100644
--- a/bse/bsesong.cc
+++ b/bse/bsesong.cc
@@ -614,7 +614,7 @@ bse_song_ensure_master (BseSong *self)
       auto lambda = [bus_descriptor] (Bse::SongImpl &self, BseUndoStack *ustack) -> Bse::ErrorType {
         Bse::BusImpl &bus = self.undo_resolve (bus_descriptor);
         self.remove_bus (bus);
-        return Bse::ERROR_NONE;
+        return Bse::Error::NONE;
       };
       this_->push_undo (__func__, *this_, lambda);
       bse_item_undo_close (ustack);
@@ -786,7 +786,7 @@ SongImpl::create_bus ()
   auto lambda = [bus_descriptor] (SongImpl &self, BseUndoStack *ustack) -> ErrorType {
     BusImpl &bus = self.undo_resolve (bus_descriptor);
     self.remove_bus (bus);
-    return ERROR_NONE;
+    return Error::NONE;
   };
   push_undo (__func__, *this, lambda);
   return bus->as<BusIfaceP>();
@@ -811,7 +811,7 @@ SongImpl::remove_bus (BusIface &bus_iface)
   auto lambda = [bus_descriptor] (SongImpl &self, BseUndoStack *ustack) -> ErrorType {
     BusImpl &bus = self.undo_resolve (bus_descriptor);
     self.remove_bus (bus);
-    return ERROR_NONE;
+    return Error::NONE;
   };
   push_undo_to_redo (__func__, *this, lambda);
   // backup and remove (without redo queueing)
@@ -830,7 +830,7 @@ SongImpl::create_part ()
   auto lambda = [part_descriptor] (SongImpl &self, BseUndoStack *ustack) -> ErrorType {
     PartImpl &part = self.undo_resolve (part_descriptor);
     self.remove_part (part);
-    return ERROR_NONE;
+    return Error::NONE;
   };
   push_undo (__func__, *this, lambda);
   return part->as<PartIfaceP>();
@@ -853,7 +853,7 @@ SongImpl::remove_part (PartIface &part_iface)
   auto lambda = [part_descriptor] (SongImpl &self, BseUndoStack *ustack) -> ErrorType {
     PartImpl &part = self.undo_resolve (part_descriptor);
     self.remove_part (part);
-    return ERROR_NONE;
+    return Error::NONE;
   };
   push_undo_to_redo (__func__, *this, lambda);
   // remove (without redo queueing)
@@ -873,7 +873,7 @@ SongImpl::create_track ()
   auto lambda = [track_descriptor] (SongImpl &self, BseUndoStack *ustack) -> ErrorType {
     TrackImpl &track = self.undo_resolve (track_descriptor);
     self.remove_track (track);
-    return ERROR_NONE;
+    return Error::NONE;
   };
   push_undo (__func__, *this, lambda);
   return track->as<TrackIfaceP>();
@@ -896,7 +896,7 @@ SongImpl::remove_track (TrackIface &track_iface)
   auto lambda = [track_descriptor] (SongImpl &self, BseUndoStack *ustack) -> ErrorType {
     TrackImpl &track = self.undo_resolve (track_descriptor);
     self.remove_track (track);
-    return ERROR_NONE;
+    return Error::NONE;
   };
   push_undo_to_redo (__func__, *this, lambda);
   // remove (without redo queueing)
diff --git a/bse/bsesong.proc b/bse/bsesong.proc
index 965848e..c0885e6 100644
--- a/bse/bsesong.proc
+++ b/bse/bsesong.proc
@@ -34,7 +34,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);
@@ -42,7 +42,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) {
@@ -60,7 +60,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);
@@ -68,7 +68,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*
@@ -110,7 +110,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;
@@ -129,7 +129,7 @@ METHOD (BseSong, ensure-track-links) {
         bse_project_clear_undo (project);
     }
 
-  return Bse::ERROR_NONE;
+  return Bse::Error::NONE;
 }
 
 METHOD (BseSong, find-track-for-part) {
@@ -154,7 +154,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))
@@ -172,7 +172,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, synthesize-note) {
@@ -204,7 +204,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)
@@ -221,5 +221,5 @@ METHOD (BseSong, synthesize-note) {
       bse_project_keep_activated (BSE_PROJECT (BSE_ITEM (self)->parent), tstamp + duration);
     }
 
-  return Bse::ERROR_NONE;
+  return Bse::Error::NONE;
 }
diff --git a/bse/bsesource.cc b/bse/bsesource.cc
index b33f004..f1dd9f6 100644
--- a/bse/bsesource.cc
+++ b/bse/bsesource.cc
@@ -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));
-  assert_return (BSE_IS_SOURCE (source), Bse::ERROR_INTERNAL);
-  assert_return (prop_name != NULL, Bse::ERROR_INTERNAL);
+  assert_return (BSE_IS_SOURCE (source), Bse::Error::INTERNAL);
+  assert_return (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
@@ -1221,30 +1221,30 @@ bse_source_set_input (BseSource *source,
                      BseSource *osource,
                      guint      ochannel)
 {
-  assert_return (BSE_IS_SOURCE (source), Bse::ERROR_INTERNAL);
-  assert_return (BSE_IS_SOURCE (osource), Bse::ERROR_INTERNAL);
-  assert_return (BSE_ITEM (source)->parent == BSE_ITEM (osource)->parent, Bse::ERROR_INTERNAL);
+  assert_return (BSE_IS_SOURCE (source), Bse::Error::INTERNAL);
+  assert_return (BSE_IS_SOURCE (osource), Bse::Error::INTERNAL);
+  assert_return (BSE_ITEM (source)->parent == BSE_ITEM (osource)->parent, Bse::Error::INTERNAL);
   if (BSE_SOURCE_PREPARED (source))    /* FIXME: check context sets */
     {
-      assert_return (BSE_SOURCE_PREPARED (osource), Bse::ERROR_INTERNAL); /* paranoid, checked parent 
already */
-      assert_return (BSE_SOURCE_N_CONTEXTS (source) == BSE_SOURCE_N_CONTEXTS (osource), Bse::ERROR_INTERNAL);
+      assert_return (BSE_SOURCE_PREPARED (osource), Bse::Error::INTERNAL); /* paranoid, checked parent 
already */
+      assert_return (BSE_SOURCE_N_CONTEXTS (source) == BSE_SOURCE_N_CONTEXTS (osource), 
Bse::Error::INTERNAL);
     }
   else
-    assert_return (!BSE_SOURCE_PREPARED (osource), Bse::ERROR_INTERNAL);
+    assert_return (!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
@@ -1327,27 +1327,27 @@ bse_source_check_input (BseSource *source,
                        BseSource *osource,
                        guint      ochannel)
 {
-  assert_return (BSE_IS_SOURCE (source), Bse::ERROR_INTERNAL);
-  assert_return (BSE_IS_SOURCE (osource), Bse::ERROR_INTERNAL);
+  assert_return (BSE_IS_SOURCE (source), Bse::Error::INTERNAL);
+  assert_return (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 */
     {
-      assert_return (BSE_SOURCE_PREPARED (osource), Bse::ERROR_INTERNAL);      /* paranoid, checked parent 
already */
-      /* prolly wrong: */ assert_return (BSE_SOURCE_N_CONTEXTS (source) == BSE_SOURCE_N_CONTEXTS (osource), 
Bse::ERROR_INTERNAL);
+      assert_return (BSE_SOURCE_PREPARED (osource), Bse::Error::INTERNAL);     /* paranoid, checked parent 
already */
+      /* prolly wrong: */ assert_return (BSE_SOURCE_N_CONTEXTS (source) == BSE_SOURCE_N_CONTEXTS (osource), 
Bse::Error::INTERNAL);
     }
   else
-    assert_return (!BSE_SOURCE_PREPARED (osource), Bse::ERROR_INTERNAL);
+    assert_return (!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;
 }
 
 Bse::ErrorType
@@ -1357,7 +1357,7 @@ bse_source_unset_input (BseSource *source,
                        guint      ochannel)
 {
   Bse::ErrorType error = bse_source_check_input (source, ichannel, osource, ochannel);
-  if (error != Bse::ERROR_NONE)
+  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)
 {
-  assert_return (BSE_IS_SOURCE (source), Bse::ERROR_INTERNAL);
+  assert_return (BSE_IS_SOURCE (source), Bse::Error::INTERNAL);
   if (ichannel < BSE_SOURCE_N_ICHANNELS (source) &&
       !BSE_SOURCE_IS_JOINT_ICHANNEL (source, ichannel))
     {
@@ -1750,7 +1750,7 @@ bse_source_input_backup_to_undo (BseSource      *source,
   BseUndoStack *ustack;
   BseStorage *storage;
 
-  assert_return (error == Bse::ERROR_NONE);
+  assert_return (error == Bse::Error::NONE);
 
   if (BSE_SOURCE_PRIVATE_INPUTS (source))
     return;
@@ -1806,13 +1806,13 @@ resolve_osource_input (gpointer     data,
       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.proc b/bse/bsesource.proc
index 09998fc..47ab4cc 100644
--- a/bse/bsesource.proc
+++ b/bse/bsesource.proc
@@ -23,7 +23,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,
@@ -40,17 +40,17 @@ BODY (BseProcedureClass *proc,
   /* 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) {
@@ -64,7 +64,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,
@@ -83,19 +83,19 @@ BODY (BseProcedureClass *proc,
   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) {
@@ -109,7 +109,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,
@@ -121,15 +121,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++);
-  Bse::ErrorType 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);
@@ -141,7 +141,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) {
@@ -155,7 +155,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,
@@ -168,18 +168,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;
-  Bse::ErrorType 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);
@@ -191,7 +191,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) {
@@ -209,7 +209,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));
@@ -218,7 +218,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) {
@@ -236,7 +236,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));
@@ -245,7 +245,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) {
@@ -264,12 +264,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) {
@@ -288,12 +288,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) {
@@ -312,12 +312,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) {
@@ -339,12 +339,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) {
@@ -366,12 +366,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) {
@@ -393,12 +393,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) {
@@ -420,12 +420,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) {
@@ -448,14 +448,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) {
@@ -478,7 +478,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);
@@ -487,7 +487,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) {
@@ -513,7 +513,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);
@@ -524,7 +524,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) {
@@ -543,12 +543,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) {
@@ -570,12 +570,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) {
@@ -597,12 +597,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) {
@@ -624,12 +624,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) {
@@ -658,7 +658,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 ||
@@ -672,7 +672,7 @@ BODY (BseProcedureClass *proc,
       bse_item_undo_close (ustack);
     }
 
-  return Bse::ERROR_NONE;
+  return Bse::Error::NONE;
 }
 
 METHOD (BseSource, set-automation) {
@@ -685,7 +685,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,
@@ -696,11 +696,11 @@ BODY (BseProcedureClass *proc,
   const char *property = sfi_value_get_string (in_values++);
   guint      midi_channel = sfi_value_get_int (in_values++);
   Bse::MidiSignalType control_type = (Bse::MidiSignalType) g_value_get_enum (in_values++);
-  Bse::ErrorType 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;
@@ -709,14 +709,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) {
@@ -737,7 +737,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;
@@ -745,7 +745,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) {
@@ -766,7 +766,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 */
   Bse::MidiSignalType control_type = Bse::MidiSignalType (0);
@@ -774,7 +774,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) {
@@ -791,10 +791,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 7adbcb8..dd2aa68 100644
--- a/bse/bsestorage.cc
+++ b/bse/bsestorage.cc
@@ -298,18 +298,18 @@ Bse::ErrorType
 bse_storage_input_file (BseStorage  *self,
                         const gchar *file_name)
 {
-  assert_return (BSE_IS_STORAGE (self), Bse::ERROR_INTERNAL);
-  assert_return (file_name != NULL, Bse::ERROR_INTERNAL);
+  assert_return (BSE_IS_STORAGE (self), Bse::Error::INTERNAL);
+  assert_return (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
@@ -1779,12 +1779,12 @@ Bse::ErrorType
 bse_storage_flush_fd (BseStorage *self,
                       gint        fd)
 {
-  assert_return (BSE_IS_STORAGE (self), Bse::ERROR_INTERNAL);
-  assert_return (self->wstore, Bse::ERROR_INTERNAL);
-  assert_return (fd >= 0, Bse::ERROR_INTERNAL);
+  assert_return (BSE_IS_STORAGE (self), Bse::Error::INTERNAL);
+  assert_return (self->wstore, Bse::Error::INTERNAL);
+  assert_return (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/bsetrack.cc b/bse/bsetrack.cc
index e77644e..a7b2fa2 100644
--- a/bse/bsetrack.cc
+++ b/bse/bsetrack.cc
@@ -1106,7 +1106,7 @@ TrackImpl::remove_tick (int tick)
       auto lambda = [utick, part_descriptor] (TrackImpl &self, BseUndoStack *ustack) -> ErrorType {
         PartImpl &part = self.undo_resolve (part_descriptor);
         const uint id = self.insert_part (utick, part);
-        return id ? ERROR_NONE : ERROR_INVALID_OVERLAP;
+        return id ? Error::NONE : Error::INVALID_OVERLAP;
       };
       bse_track_remove_tick (self, tick);
       push_undo (__func__, *this, lambda);
@@ -1161,7 +1161,7 @@ ErrorType
 TrackImpl::ensure_output ()
 {
   BseTrack *self = as<BseTrack*>();
-  ErrorType error = ERROR_NONE;
+  ErrorType error = Error::NONE;
   BseItem *bparent = self->parent;
   if (BSE_IS_SONG (bparent) && !self->bus_outputs)
     {
diff --git a/bse/bsewave.cc b/bse/bsewave.cc
index 03563f6..f8d2fac 100644
--- a/bse/bsewave.cc
+++ b/bse/bsewave.cc
@@ -129,7 +129,7 @@ static Bse::ErrorType
 bse_wave_add_inlined_wave_chunk (BseWave      *self,
                                  GslWaveChunk *wchunk)
 {
-  assert_return (BSE_IS_WAVE (self), Bse::ERROR_INTERNAL);
+  assert_return (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);
@@ -251,10 +251,10 @@ bse_wave_load_wave_file (BseWave      *self,
                         BseFreqArray *skip_array,
                          gboolean      rename_wave)
 {
-  Bse::ErrorType error = Bse::ERROR_NONE;
+  Bse::ErrorType error = Bse::Error::NONE;
 
-  assert_return (BSE_IS_WAVE (self), Bse::ERROR_INTERNAL);
-  assert_return (file_name != NULL, Bse::ERROR_INTERNAL);
+  assert_return (BSE_IS_WAVE (self), Bse::Error::INTERNAL);
+  assert_return (file_name != NULL, Bse::Error::INTERNAL);
 
   bse_wave_clear (self);
 
@@ -326,17 +326,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;
 }
diff --git a/bse/bsewave.proc b/bse/bsewave.proc
index 8be680f..cfeccdf 100644
--- a/bse/bsewave.proc
+++ b/bse/bsewave.proc
@@ -26,12 +26,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) {
@@ -55,7 +55,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)
@@ -69,7 +69,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) {
@@ -93,13 +93,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) {
@@ -123,11 +123,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 e454d73..af127ee 100644
--- a/bse/bsewaveosc.cc
+++ b/bse/bsewaveosc.cc
@@ -182,7 +182,7 @@ bse_wave_osc_set_from_esample (BseWaveOsc        *self,
     {
       assert_return (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 4492354..12d33bb 100644
--- a/bse/bsewaveosc.proc
+++ b/bse/bsewaveosc.proc
@@ -23,11 +23,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") {
@@ -47,13 +47,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) {
@@ -72,9 +72,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 152835e..6ea6d7c 100644
--- a/bse/bsewaverepo.proc
+++ b/bse/bsewaverepo.proc
@@ -27,12 +27,12 @@ load_file (BseWaveRepo *wrepo,
     {
       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);
@@ -52,7 +52,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,
@@ -68,7 +68,7 @@ BODY (BseProcedureClass *proc,
 
   /* 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);
@@ -79,7 +79,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) {
@@ -100,7 +100,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));
@@ -113,5 +113,5 @@ METHOD (BseWaveRepo, remove-wave) {
   /* done */
   bse_item_undo_close (ustack);
 
-  return Bse::ERROR_NONE;
+  return Bse::Error::NONE;
 }
diff --git a/bse/gslcommon.cc b/bse/gslcommon.cc
index d7eeff6..23ebc99 100644
--- a/bse/gslcommon.cc
+++ b/bse/gslcommon.cc
@@ -199,8 +199,8 @@ 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);
 }
 
 Bse::ErrorType
@@ -209,31 +209,31 @@ gsl_error_from_errno (gint         sys_errno,
 {
   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:
@@ -247,12 +247,12 @@ score_error (Bse::ErrorType error)
 {
   /* errors are sorted by increasing descriptiveness */
   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,
+    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++)
diff --git a/bse/gsldatahandle-mad.cc b/bse/gsldatahandle-mad.cc
index 4f43006..143593b 100644
--- a/bse/gsldatahandle-mad.cc
+++ b/bse/gsldatahandle-mad.cc
@@ -73,28 +73,28 @@ error_from_mad_stream (struct mad_stream *mstream,
 {
   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;
     }
 }
@@ -179,7 +179,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 */
@@ -191,7 +191,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;
 }
@@ -215,7 +215,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 */
@@ -234,9 +234,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;
 }
 
@@ -301,7 +301,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;
        }
@@ -333,7 +333,7 @@ dh_mad_open (GslDataHandle      *dhandle,
 
   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;
@@ -351,7 +351,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;
     }
 
@@ -367,7 +367,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;
     }
 
@@ -393,7 +393,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);
@@ -406,7 +406,7 @@ dh_mad_open (GslDataHandle      *dhandle,
     setup->n_values = n;
   else
     {
-      error = Bse::ERROR_NO_DATA;
+      error = Bse::Error::NO_DATA;
       goto OPEN_FAILED;
     }
 
@@ -415,7 +415,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;
     }
 
@@ -423,7 +423,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)
@@ -666,7 +666,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;
@@ -681,7 +681,7 @@ dh_mad_new (const gchar  *file_name,
        {
          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));
@@ -693,7 +693,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;
     }
 }
@@ -706,7 +706,7 @@ gsl_data_handle_new_mad_err (const gchar  *file_name,
   assert_return (file_name != NULL, NULL);
   assert_return (osc_freq > 0, NULL);
 
-  Bse::ErrorType error = Bse::ERROR_NONE;
+  Bse::ErrorType error = Bse::Error::NONE;
   return dh_mad_new (file_name, osc_freq, FALSE, errorp ? errorp : &error);
 }
 
@@ -718,12 +718,12 @@ gsl_data_handle_mad_testopen (const gchar *file_name,
   GslDataHandle *dhandle;
   MadHandle *handle;
 
-  assert_return (file_name != NULL, Bse::ERROR_INTERNAL);
+  assert_return (file_name != NULL, Bse::Error::INTERNAL);
 
-  Bse::ErrorType 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)
@@ -733,7 +733,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*
@@ -750,7 +750,7 @@ gsl_data_handle_new_mad_err (const gchar  *file_name,
                              Bse::ErrorType *errorp)
 {
   if (errorp)
-    *errorp = Bse::ERROR_FORMAT_UNKNOWN;
+    *errorp = Bse::Error::FORMAT_UNKNOWN;
   return NULL;
 }
 
@@ -759,7 +759,7 @@ 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-vorbis.cc b/bse/gsldatahandle-vorbis.cc
index 258b736..afda259 100644
--- a/bse/gsldatahandle-vorbis.cc
+++ b/bse/gsldatahandle-vorbis.cc
@@ -48,19 +48,19 @@ ov_errno_to_error (gint         ov_errno,
 {
   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;
     }
@@ -168,7 +168,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)
@@ -193,9 +193,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);
@@ -209,7 +209,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;
@@ -226,7 +226,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);
@@ -239,7 +239,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
@@ -473,7 +473,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;
@@ -496,7 +496,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 ae4d0d3..3253e0e 100644
--- a/bse/gsldatahandle.cc
+++ b/bse/gsldatahandle.cc
@@ -73,8 +73,8 @@ gsl_data_handle_unref (GslDataHandle *dhandle)
 Bse::ErrorType
 gsl_data_handle_open (GslDataHandle *dhandle)
 {
-  assert_return (dhandle != NULL, Bse::ERROR_INTERNAL);
-  assert_return (dhandle->ref_count > 0, Bse::ERROR_INTERNAL);
+  assert_return (dhandle != NULL, Bse::Error::INTERNAL);
+  assert_return (dhandle->ref_count > 0, Bse::Error::INTERNAL);
   dhandle->spinlock.lock();
   if (dhandle->open_count == 0)
     {
@@ -86,7 +86,7 @@ gsl_data_handle_open (GslDataHandle *dhandle)
          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)
@@ -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
@@ -423,7 +423,7 @@ xinfo_handle_open (GslDataHandle      *dhandle,
   XInfoHandle *chandle = (XInfoHandle*) dhandle;
   GslDataHandle *src_handle = chandle->src_handle;
   Bse::ErrorType error = gsl_data_handle_open (src_handle);
-  if (error != Bse::ERROR_NONE)
+  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 
@@ -677,11 +677,11 @@ chain_handle_open (GslDataHandle      *dhandle,
   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
@@ -866,13 +866,13 @@ cut_handle_open (GslDataHandle      *dhandle,
   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
@@ -1017,7 +1017,7 @@ insert_handle_open (GslDataHandle      *dhandle,
   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
@@ -1184,7 +1184,7 @@ loop_handle_open (GslDataHandle      *dhandle,
   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
@@ -1306,13 +1306,13 @@ dcache_handle_open (GslDataHandle      *dhandle,
   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
@@ -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/gsldatautils.cc b/bse/gsldatautils.cc
index 5e4674f..c0ec779 100644
--- a/bse/gsldatautils.cc
+++ b/bse/gsldatautils.cc
@@ -480,7 +480,7 @@ gsl_data_find_sample (GslDataHandle *dhandle,
   assert_return (dhandle != NULL, -1);
   assert_return (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,
   assert_return (lspec->max_loop >= lspec->min_loop, FALSE);
   assert_return (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)
@@ -756,12 +756,12 @@ gsl_data_clip_sample (GslDataHandle     *dhandle,
                       GslDataClipConfig *cconfig,
                       GslDataClipResult *result)
 {
-  assert_return (result != NULL, Bse::ERROR_INTERNAL);
+  assert_return (result != NULL, Bse::Error::INTERNAL);
   memset (result, 0, sizeof (*result));
-  result->error = Bse::ERROR_INTERNAL;
-  assert_return (dhandle, Bse::ERROR_INTERNAL);
-  assert_return (GSL_DATA_HANDLE_OPENED (dhandle), Bse::ERROR_INTERNAL);
-  assert_return (cconfig != NULL, Bse::ERROR_INTERNAL);
+  result->error = Bse::Error::INTERNAL;
+  assert_return (dhandle, Bse::Error::INTERNAL);
+  assert_return (GSL_DATA_HANDLE_OPENED (dhandle), Bse::Error::INTERNAL);
+  assert_return (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/gslvorbis-enc.cc b/bse/gslvorbis-enc.cc
index bca31bc..e33cf7b 100644
--- a/bse/gslvorbis-enc.cc
+++ b/bse/gslvorbis-enc.cc
@@ -249,8 +249,8 @@ gsl_vorbis_encoder_setup_stream (GslVorbisEncoder *self,
   ogg_page opage;
   gint result;
 
-  assert_return (self != NULL, Bse::ERROR_INTERNAL);
-  assert_return (self->stream_setup == FALSE, Bse::ERROR_INTERNAL);
+  assert_return (self != NULL, Bse::Error::INTERNAL);
+  assert_return (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/gslwavechunk.cc b/bse/gslwavechunk.cc
index 2318069..dff5d7e 100644
--- a/bse/gslwavechunk.cc
+++ b/bse/gslwavechunk.cc
@@ -664,20 +664,20 @@ gsl_wave_chunk_unref (GslWaveChunk *wchunk)
 Bse::ErrorType
 gsl_wave_chunk_open (GslWaveChunk *wchunk)
 {
-  assert_return (wchunk != NULL, Bse::ERROR_INTERNAL);
-  assert_return (wchunk->ref_count > 0, Bse::ERROR_INTERNAL);
+  assert_return (wchunk != NULL, Bse::Error::INTERNAL);
+  assert_return (wchunk->ref_count > 0, Bse::Error::INTERNAL);
 
   if (wchunk->open_count == 0)
     {
       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);
-      assert_return (wchunk->dcache->padding >= wchunk->n_pad_values, Bse::ERROR_INTERNAL);
+      assert_return (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/tests/loophandle.cc b/bse/tests/loophandle.cc
index 649b063..529c875 100644
--- a/bse/tests/loophandle.cc
+++ b/bse/tests/loophandle.cc
@@ -23,7 +23,7 @@ loop_handle_reference_open (GslDataHandle      *dhandle,
   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
diff --git a/drivers/bse-portaudio/bsepcmdevice-portaudio.cc b/drivers/bse-portaudio/bsepcmdevice-portaudio.cc
index 8b79858..a71481b 100644
--- a/drivers/bse-portaudio/bsepcmdevice-portaudio.cc
+++ b/drivers/bse-portaudio/bsepcmdevice-portaudio.cc
@@ -52,34 +52,34 @@ bse_error_from_pa_error (PaError      pa_error,
 {
   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;
@@ -193,7 +193,7 @@ bse_pcm_device_port_audio_open (BseDevice     *device,
        }
     }
 
-  Bse::ErrorType 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 3da99a7..be6e104 100644
--- a/drivers/bsemididevice-alsa.cc
+++ b/drivers/bsemididevice-alsa.cc
@@ -201,12 +201,12 @@ bse_midi_device_alsa_open (BseDevice     *device,
     }
 
   /* try setup */
-  Bse::ErrorType 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)
         printerr ("midiread:  buffer=%zd active_sensing=%d min_avail=%zd\n",
                     snd_rawmidi_params_get_buffer_size (mparams),
@@ -216,7 +216,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)
         printerr ("midiwrite: buffer=%zd active_sensing=%d min_avail=%zd\n",
                     snd_rawmidi_params_get_buffer_size (mparams),
@@ -224,7 +224,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 aeea86d..14402df 100644
--- a/drivers/bsepcmdevice-alsa.cc
+++ b/drivers/bsepcmdevice-alsa.cc
@@ -224,7 +224,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;
-  Bse::ErrorType 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);
@@ -233,19 +233,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)
@@ -315,61 +315,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;
@@ -383,7 +383,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/tests/bse/cxxbinding.cc b/tests/bse/cxxbinding.cc
index 524f2c9..8abcb3c 100644
--- a/tests/bse/cxxbinding.cc
+++ b/tests/bse/cxxbinding.cc
@@ -43,7 +43,7 @@ main (int   argc,
       printout ("sample_file_info(\"%s\"): failed\n", file_name);
     }
 
-  printout ("error_blurb(ERROR_DEVICE_ASYNC): %s\n", error_blurb (ERROR_DEVICE_ASYNC).c_str());
+  printout ("error_blurb(Error::DEVICE_ASYNC): %s\n", error_blurb (Error::DEVICE_ASYNC).c_str());
 
   Server server = 1;    // FIXME: users may not hardcode this
 
diff --git a/tools/bseloopfuncs.cc b/tools/bseloopfuncs.cc
index 3e34eca..3a24a4d 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,
   assert_return (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,
   assert_return (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,
   assert_return (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,
   assert_return (loop_end_p != NULL, 0);
   assert_return (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 ede595c..8941246 100644
--- a/tools/bsewavetool.cc
+++ b/tools/bsewavetool.cc
@@ -118,7 +118,7 @@ main (int   argc,
   /* load wave file */
   printerr ("LOAD: %s\n", input_file.c_str());
   Wave *wave = command->create ();
-  Bse::ErrorType 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));
@@ -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;
@@ -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 */
-          Bse::ErrorType 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)
@@ -1871,11 +1871,11 @@ public:
           GslDataHandle *dhandle = chunk->dhandle;
           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);
-          Bse::ErrorType error = Bse::ERROR_NONE;
+          Bse::ErrorType error = Bse::Error::NONE;
           if (absmax > 4.6566e-10) /* 32bit threshold */
             {
               if (use_volume_xinfo)
@@ -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)
@@ -2918,14 +2918,14 @@ public:
          int fd = open (filename.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0666);
          if (fd < 0)
            {
-             Bse::ErrorType 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)
            {
-             Bse::ErrorType 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 129e0c1..93e3c46 100644
--- a/tools/bwtwave.cc
+++ b/tools/bwtwave.cc
@@ -62,7 +62,7 @@ WaveChunk::change_dhandle (GslDataHandle *xhandle,
       if (dhandle)
         gsl_data_handle_close (dhandle);
       dhandle = xhandle;
-      return Bse::ERROR_NONE;
+      return Bse::Error::NONE;
     }
   else
     return error;
@@ -73,7 +73,7 @@ WaveChunk::set_dhandle_from_file (const string &fname,
                                   gdouble       osc_freq,
                                   gchar       **xinfos)
 {
-  Bse::ErrorType 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)
@@ -111,7 +111,7 @@ Bse::ErrorType
 Wave::add_chunk (GslDataHandle  *dhandle,
                  gchar         **xinfos)
 {
-  assert_return (dhandle != NULL, Bse::ERROR_INTERNAL);
+  assert_return (dhandle != NULL, Bse::Error::INTERNAL);
 
   if (xinfos)
     {
@@ -236,7 +236,7 @@ Wave::sort ()
 Bse::ErrorType
 Wave::store (const string file_name)
 {
-  assert_return (file_name.c_str() != NULL, Bse::ERROR_INTERNAL);
+  assert_return (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);
-  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);
+  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/magictest.cc b/tools/magictest.cc
index 9e679ec..13c9ed3 100644
--- a/tools/magictest.cc
+++ b/tools/magictest.cc
@@ -82,7 +82,7 @@ main (gint   argc,
                   if (test_open)
                     {
                       BseWaveFileInfo *wfi;
-                      Bse::ErrorType error = Bse::ERROR_NONE;
+                      Bse::ErrorType error = Bse::Error::NONE;
                       printout ("\n  LOADER: %s\n", loader->name);
                       wfi = bse_wave_file_info_load (argv[i], &error);
                       if (wfi)


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