[beast: 11/29] BSE: bseapi.idl: rename Bse::ErrorType to Bse::Error
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 11/29] BSE: bseapi.idl: rename Bse::ErrorType to Bse::Error
- Date: Mon, 21 Mar 2016 15:12:46 +0000 (UTC)
commit dfe1ce539a4d6d84e7413f50f19f24fcfb3eab97
Author: Tim Janik <timj gnu org>
Date: Sat Jan 30 01:11:03 2016 +0100
BSE: bseapi.idl: rename Bse::ErrorType to Bse::Error
Signed-off-by: Tim Janik <timj gnu org>
beast-gtk/bstapp.cc | 4 +-
beast-gtk/bstbseutils.cc | 14 +++---
beast-gtk/bstbseutils.hh | 10 ++--
beast-gtk/bsteventrollctrl.cc | 4 +-
beast-gtk/bstfiledialog.cc | 14 +++---
beast-gtk/bstgconfig.cc | 6 +-
beast-gtk/bstgconfig.hh | 4 +-
beast-gtk/bstkeybindings.cc | 8 ++--
beast-gtk/bstkeybindings.hh | 4 +-
beast-gtk/bstmain.cc | 10 ++--
beast-gtk/bstmsgabsorb.cc | 10 ++--
beast-gtk/bstpianorollctrl.cc | 8 ++--
beast-gtk/bstplayback.cc | 2 +-
beast-gtk/bstpreferences.cc | 4 +-
beast-gtk/bstprocedure.cc | 2 +-
beast-gtk/bstprojectctrl.cc | 2 +-
beast-gtk/bstskinconfig.cc | 6 +-
beast-gtk/bstskinconfig.hh | 4 +-
beast-gtk/bstsnetrouter.cc | 8 ++--
beast-gtk/bsttreestores.cc | 2 +-
beast-gtk/bstutils.cc | 2 +-
beast-gtk/bstutils.hh | 2 +-
beast-gtk/bstwaveeditor.cc | 2 +-
bse/bseapi.idl | 46 +++++++++++-----------
bse/bsebus.cc | 44 +++++++++++-----------
bse/bsebus.hh | 22 +++++-----
bse/bsedatahandle-fir.cc | 6 +-
bse/bsedatahandle-flac.cc | 6 +-
bse/bsedatahandle-resample.cc | 6 +-
bse/bsedevice.cc | 16 ++++----
bse/bsedevice.hh | 8 ++--
bse/bseeditablesample.proc | 2 +-
bse/bseenums.cc | 8 ++--
bse/bseenums.hh | 4 +-
bse/bseglue.cc | 4 +-
bse/bseitem.cc | 22 +++++-----
bse/bseitem.hh | 16 ++++----
bse/bseloader-aiff.cc | 22 +++++-----
bse/bseloader-bsewave.cc | 8 ++--
bse/bseloader-flac.cc | 8 ++--
bse/bseloader-guspatch.cc | 32 ++++++++--------
bse/bseloader-mad.cc | 8 ++--
bse/bseloader-oggvorbis.cc | 6 +-
bse/bseloader-wav.cc | 12 +++---
bse/bseloader.cc | 14 +++---
bse/bseloader.hh | 14 +++---
bse/bsemididevice-null.cc | 2 +-
bse/bsemididevice-oss.cc | 8 ++--
bse/bsemidifile.cc | 10 ++--
bse/bsemidifile.hh | 2 +-
bse/bsepart.cc | 6 +-
bse/bsepart.hh | 6 +-
bse/bsepcmdevice-null.cc | 2 +-
bse/bsepcmdevice-oss.cc | 12 +++---
bse/bsepcmwriter.cc | 2 +-
bse/bsepcmwriter.hh | 2 +-
bse/bseprocedure.cc | 42 ++++++++++----------
bse/bseprocedure.hh | 18 ++++----
bse/bseprocidl.cc | 2 +-
bse/bseproject.cc | 36 +++++++++---------
bse/bseproject.hh | 14 +++---
bse/bseproject.proc | 2 +-
bse/bsescripthelper.cc | 10 ++--
bse/bsescripthelper.hh | 2 +-
bse/bseserver.cc | 22 +++++-----
bse/bseserver.hh | 4 +-
bse/bsesnet.cc | 12 +++---
bse/bsesnet.hh | 4 +-
bse/bsesong.cc | 16 ++++----
bse/bsesource.cc | 16 ++++----
bse/bsesource.hh | 8 ++--
bse/bsesource.proc | 10 ++--
bse/bsestorage.cc | 8 ++--
bse/bsestorage.hh | 4 +-
bse/bsetrack.cc | 6 +-
bse/bsetrack.hh | 2 +-
bse/bsewave.cc | 18 ++++----
bse/bsewave.hh | 2 +-
bse/bsewaverepo.proc | 6 +-
bse/gslcommon.cc | 20 +++++-----
bse/gslcommon.hh | 10 ++--
bse/gsldatacache.cc | 2 +-
bse/gsldatahandle-mad.cc | 26 ++++++------
bse/gsldatahandle-mad.hh | 4 +-
bse/gsldatahandle-vorbis.cc | 8 ++--
bse/gsldatahandle.cc | 32 ++++++++--------
bse/gsldatahandle.hh | 4 +-
bse/gsldatautils.cc | 4 +-
bse/gsldatautils.hh | 4 +-
bse/gslvorbis-enc.cc | 2 +-
bse/gslvorbis-enc.hh | 2 +-
bse/gslwavechunk.cc | 4 +-
bse/gslwavechunk.hh | 2 +-
bse/tests/firhandle.cc | 6 +-
bse/tests/loophandle.cc | 6 +-
bse/tests/resamplehandle.cc | 6 +-
drivers/bse-portaudio/bsepcmdevice-portaudio.cc | 8 ++--
drivers/bsemididevice-alsa.cc | 4 +-
drivers/bsepcmdevice-alsa.cc | 8 ++--
sfi/sfidl-corecxx.cc | 2 +-
tests/testwavechunk.cc | 6 +-
tools/bsefextract.cc | 2 +-
tools/bsewavetool.cc | 30 +++++++-------
tools/bwtwave.cc | 16 ++++----
tools/bwtwave.hh | 8 ++--
tools/magictest.cc | 2 +-
tools/mathtool.cc | 2 +-
107 files changed, 506 insertions(+), 506 deletions(-)
---
diff --git a/beast-gtk/bstapp.cc b/beast-gtk/bstapp.cc
index 14825f6..6b6959f 100644
--- a/beast-gtk/bstapp.cc
+++ b/beast-gtk/bstapp.cc
@@ -700,7 +700,7 @@ demo_play_song (gpointer data,
{
const gchar *file_name = demo_entries[callback_action - BST_ACTION_LOAD_DEMO_0000].file;
Bse::ProjectH project = bse_server.create_project (file_name);
- Bse::ErrorType error = bst_project_restore_from_file (project, file_name, TRUE, TRUE);
+ Bse::Error error = bst_project_restore_from_file (project, file_name, TRUE, TRUE);
if (error)
{
bst_status_eprintf (error, _("Opening project `%s'"), file_name);
@@ -770,7 +770,7 @@ load_skin (gpointer data,
size_t callback_action)
{
const gchar *file_name = skin_entries[callback_action - BST_ACTION_LOAD_SKIN_0000].file;
- Bse::ErrorType error = bst_skin_parse (file_name);
+ Bse::Error error = bst_skin_parse (file_name);
bst_status_eprintf (error, _("Loading skin `%s'"), file_name);
}
diff --git a/beast-gtk/bstbseutils.cc b/beast-gtk/bstbseutils.cc
index a7673c8..f010e6f 100644
--- a/beast-gtk/bstbseutils.cc
+++ b/beast-gtk/bstbseutils.cc
@@ -2,11 +2,11 @@
#include "bstbseutils.hh"
/* --- BEAST utilities --- */
-Bse::ErrorType
+Bse::Error
bst_project_restore_from_file (Bse::ProjectH project, const gchar *file_name, bool apply_project_file_name,
bool preserve_non_dirty)
{
bool was_dirty = project.is_dirty();
- Bse::ErrorType error = project.restore_from_file (file_name);
+ Bse::Error error = project.restore_from_file (file_name);
/* regardless of how good the restoration worked, try to
* keep the resulting project in a GUI usable state.
*/
@@ -32,10 +32,10 @@ bst_project_restore_from_file (Bse::ProjectH project, const gchar *file_name, bo
return error;
}
-Bse::ErrorType
+Bse::Error
bst_project_import_midi_file (Bse::ProjectH project, const gchar *file_name)
{
- Bse::ErrorType error = project.import_midi_file (file_name);
+ Bse::Error error = project.import_midi_file (file_name);
/* regardless of how good the restoration worked, try to
* keep the resulting project in a GUI usable state.
*/
@@ -88,9 +88,9 @@ bst_path_leaf_index (const String &path, char separator)
namespace Bse {
const char*
-error_blurb (Bse::ErrorType error_value)
+error_blurb (Bse::Error error_value)
{
- const Rapicorn::Aida::EnumValue ev = Rapicorn::Aida::enum_info<Bse::ErrorType>().find_value (error_value);
+ const Rapicorn::Aida::EnumValue ev = Rapicorn::Aida::enum_info<Bse::Error>().find_value (error_value);
return ev.blurb;
}
@@ -98,6 +98,6 @@ error_blurb (Bse::ErrorType error_value)
/* --- generated code --- */
-#define BseErrorType Bse::ErrorType
+#define BseErrorType Bse::Error
#include "bstoldbseapi.cc"
#undef BseErrorType
diff --git a/beast-gtk/bstbseutils.hh b/beast-gtk/bstbseutils.hh
index 38f4c18..0c066cf 100644
--- a/beast-gtk/bstbseutils.hh
+++ b/beast-gtk/bstbseutils.hh
@@ -4,8 +4,8 @@
#include <sfi/sfi.hh> /* needed by bstoldbseapi.h */
#include "bstdefs.hh"
G_BEGIN_DECLS
-#define SFIDL_SKIPDEF__BseErrorType // replaced by Bse::ErrorType
-#define BseErrorType Bse::ErrorType
+#define SFIDL_SKIPDEF__BseErrorType // replaced by Bse::Error
+#define BseErrorType Bse::Error
#define SFIDL_SKIPDEF__BseMidiSignalType // replaced by Bse::MidiSignalType
#define BseMidiSignalType Bse::MidiSignalType
#include "bstoldbseapi.h" /* include this within extern "C" */
@@ -32,11 +32,11 @@ G_BEGIN_DECLS
#define bse_proxy_set_data_full(p,n,d,f) bse_proxy_set_qdata_full ((p), g_quark_from_string (n), (d),
(f))
/* --- BEAST utilities --- */
-Bse::ErrorType bst_project_restore_from_file (Bse::ProjectH project,
+Bse::Error bst_project_restore_from_file (Bse::ProjectH project,
const gchar *file_name,
bool apply_project_file_name,
bool preserve_non_dirty);
-Bse::ErrorType bst_project_import_midi_file (Bse::ProjectH project,
+Bse::Error bst_project_import_midi_file (Bse::ProjectH project,
const gchar *file_name);
const gchar* bst_procedure_get_title (const gchar *procedure);
uint bst_path_leaf_index (const String &path, char separator = '/');
@@ -46,7 +46,7 @@ BseCategory* bse_category_find (const gchar* pattern);
G_END_DECLS
namespace Bse {
-const char* error_blurb (Bse::ErrorType error_value); ///< Retrieve the description of an error value
+const char* error_blurb (Bse::Error error_value); ///< Retrieve the description of an error value
} // Bse
#endif /* __BST_BSE_UTILS_H__ */
diff --git a/beast-gtk/bsteventrollctrl.cc b/beast-gtk/bsteventrollctrl.cc
index 57ee2ea..f6af656 100644
--- a/beast-gtk/bsteventrollctrl.cc
+++ b/beast-gtk/bsteventrollctrl.cc
@@ -528,7 +528,7 @@ insert_start (BstEventRollController *self,
BstEventRollDrag *drag)
{
Bse::PartH part = self->eroll->part;
- Bse::ErrorType error = Bse::Error::INVALID_OVERLAP;
+ Bse::Error error = Bse::Error::INVALID_OVERLAP;
if (!self->obj_id && drag->start_valid)
{
guint qtick = bst_event_roll_controller_quantize (self, drag->start_tick);
@@ -606,7 +606,7 @@ delete_start (BstEventRollController *self,
Bse::PartH part = self->eroll->part;
if (self->obj_id) /* got control event to delete */
{
- Bse::ErrorType error = part.delete_event (self->obj_id);
+ Bse::Error error = part.delete_event (self->obj_id);
bst_status_eprintf (error, _("Delete Control Event"));
}
else
diff --git a/beast-gtk/bstfiledialog.cc b/beast-gtk/bstfiledialog.cc
index 5f59162..983f7c6 100644
--- a/beast-gtk/bstfiledialog.cc
+++ b/beast-gtk/bstfiledialog.cc
@@ -412,7 +412,7 @@ bst_file_dialog_open_project (BstFileDialog *self,
const gchar *file_name)
{
Bse::ProjectH project = bse_server.create_project (file_name);
- Bse::ErrorType error = bst_project_restore_from_file (project, file_name, TRUE, TRUE);
+ Bse::Error error = bst_project_restore_from_file (project, file_name, TRUE, TRUE);
if (error)
{
@@ -450,7 +450,7 @@ static gboolean
bst_file_dialog_merge_project (BstFileDialog *self,
const gchar *file_name)
{
- Bse::ErrorType error = bst_project_restore_from_file (self->project, file_name, FALSE, FALSE);
+ Bse::Error error = bst_project_restore_from_file (self->project, file_name, FALSE, FALSE);
bst_status_eprintf (error, _("Merging project `%s'"), file_name);
@@ -475,7 +475,7 @@ static gboolean
bst_file_dialog_import_midi (BstFileDialog *self,
const gchar *file_name)
{
- Bse::ErrorType error = bst_project_import_midi_file (self->project, file_name);
+ Bse::Error error = bst_project_import_midi_file (self->project, file_name);
bst_status_eprintf (error, _("Importing MIDI file `%s'"), file_name);
return TRUE;
}
@@ -484,7 +484,7 @@ static gboolean
store_bse_file (Bse::ProjectH project, SfiProxy super, const gchar *file_name, const gchar
*saving_message_format,
gboolean self_contained, gboolean want_overwrite)
{
- Bse::ErrorType error = bse_project_store_bse (project.proxy_id(), super, file_name, self_contained);
+ Bse::Error error = bse_project_store_bse (project.proxy_id(), super, file_name, self_contained);
gchar *title = g_strdup_format (saving_message_format, bse_item_get_name (super ? super :
project.proxy_id()));
gboolean handled = TRUE;
gchar *msg = NULL;
@@ -624,7 +624,7 @@ static gboolean
bst_file_dialog_merge_effect (BstFileDialog *self,
const gchar *file_name)
{
- Bse::ErrorType error = bst_project_restore_from_file (self->project, file_name, FALSE, FALSE);
+ Bse::Error error = bst_project_restore_from_file (self->project, file_name, FALSE, FALSE);
bst_status_eprintf (error, _("Merging effect `%s'"), file_name);
@@ -674,7 +674,7 @@ bst_file_dialog_popup_merge_instrument (gpointer parent_widget, Bse::ProjectH pr
static gboolean
bst_file_dialog_merge_instrument (BstFileDialog *self, const gchar *file_name)
{
- Bse::ErrorType error = bst_project_restore_from_file (self->project, file_name, FALSE, FALSE);
+ Bse::Error error = bst_project_restore_from_file (self->project, file_name, FALSE, FALSE);
bst_status_eprintf (error, _("Merging instrument `%s'"), file_name);
@@ -727,7 +727,7 @@ static gboolean
bst_file_dialog_load_wave (BstFileDialog *self,
const gchar *file_name)
{
- Bse::ErrorType error;
+ Bse::Error error;
gxk_status_printf (0, NULL, _("Loading wave `%s'"), file_name);
error = bse_wave_repo_load_file (self->wave_repo, file_name);
diff --git a/beast-gtk/bstgconfig.cc b/beast-gtk/bstgconfig.cc
index 3494fc1..e57c0ef 100644
--- a/beast-gtk/bstgconfig.cc
+++ b/beast-gtk/bstgconfig.cc
@@ -134,7 +134,7 @@ accel_map_print (gpointer data,
g_string_free (gstring, TRUE);
}
-Bse::ErrorType
+Bse::Error
bst_rc_dump (const gchar *file_name)
{
SfiWStore *wstore;
@@ -214,11 +214,11 @@ rc_file_try_statement (gpointer context_data,
return SFI_TOKEN_UNMATCHED;
}
-Bse::ErrorType
+Bse::Error
bst_rc_parse (const gchar *file_name)
{
SfiRStore *rstore;
- Bse::ErrorType error = Bse::Error::NONE;
+ Bse::Error error = Bse::Error::NONE;
gint fd;
assert_return (file_name != NULL, Bse::Error::INTERNAL);
diff --git a/beast-gtk/bstgconfig.hh b/beast-gtk/bstgconfig.hh
index ab38fe4..293e305 100644
--- a/beast-gtk/bstgconfig.hh
+++ b/beast-gtk/bstgconfig.hh
@@ -26,8 +26,8 @@ void bst_gconfig_push_updates (void);
/* --- rc file --- */
-Bse::ErrorType bst_rc_dump (const gchar *file_name);
-Bse::ErrorType bst_rc_parse (const gchar *file_name);
+Bse::Error bst_rc_dump (const gchar *file_name);
+Bse::Error bst_rc_parse (const gchar *file_name);
G_END_DECLS
diff --git a/beast-gtk/bstkeybindings.cc b/beast-gtk/bstkeybindings.cc
index 5b119e5..d5549d7 100644
--- a/beast-gtk/bstkeybindings.cc
+++ b/beast-gtk/bstkeybindings.cc
@@ -71,7 +71,7 @@ key_bindings_load_file (GtkWidget *dialog,
GtkTreeView *btview = (GtkTreeView*) gxk_radget_find (self, "binding-tree-view");
GtkTreeModel *model = gtk_tree_view_get_model (btview);
GSList slist = { kbinding, NULL };
- Bse::ErrorType error = bst_key_binding_parse (file, &slist);
+ Bse::Error error = bst_key_binding_parse (file, &slist);
gxk_list_wrapper_notify_clear (GXK_LIST_WRAPPER (model));
gxk_list_wrapper_notify_append (GXK_LIST_WRAPPER (model), kbinding->n_keys);
if (error)
@@ -593,7 +593,7 @@ bst_key_binding_rcfile (void)
return key_binding_rc;
}
-Bse::ErrorType
+Bse::Error
bst_key_binding_dump (const gchar *file_name,
GSList *kbindings)
{
@@ -672,11 +672,11 @@ key_binding_try_statement (gpointer context_data,
return SFI_TOKEN_UNMATCHED;
}
-Bse::ErrorType
+Bse::Error
bst_key_binding_parse (const gchar *file_name,
GSList *kbindings)
{
- Bse::ErrorType error = Bse::Error::NONE;
+ Bse::Error error = Bse::Error::NONE;
SfiRStore *rstore;
gchar *absname;
gint fd;
diff --git a/beast-gtk/bstkeybindings.hh b/beast-gtk/bstkeybindings.hh
index 918b68b..8841667 100644
--- a/beast-gtk/bstkeybindings.hh
+++ b/beast-gtk/bstkeybindings.hh
@@ -66,9 +66,9 @@ guint bst_key_binding_lookup_id (BstKeyBinding
void bst_key_binding_set_it3m_seq (BstKeyBinding *kbinding, const
Bst::KeyBindingItemSeq &seq);
Bst::KeyBindingItemSeq* bst_key_binding_get_new_it3m_seq (BstKeyBinding *kbinding);
const gchar* bst_key_binding_rcfile (void);
-Bse::ErrorType bst_key_binding_dump (const gchar *file_name,
+Bse::Error bst_key_binding_dump (const gchar *file_name,
GSList *kbindings);
-Bse::ErrorType bst_key_binding_parse (const gchar *file_name,
+Bse::Error bst_key_binding_parse (const gchar *file_name,
GSList *kbindings);
GParamSpec* bst_key_binding_item_pspec (void);
diff --git a/beast-gtk/bstmain.cc b/beast-gtk/bstmain.cc
index 4655e01..05b5bdc 100644
--- a/beast-gtk/bstmain.cc
+++ b/beast-gtk/bstmain.cc
@@ -373,7 +373,7 @@ main_open_files (int filesc, char **filesv)
{
SfiProxy wrepo = bse_project_get_wave_repo (app->project.proxy_id());
gxk_status_printf (GXK_STATUS_WAIT, NULL, _("Loading \"%s\""), filesv[i]);
- Bse::ErrorType error = bse_wave_repo_load_file (wrepo, filesv[i]);
+ Bse::Error error = bse_wave_repo_load_file (wrepo, filesv[i]);
bst_status_eprintf (error, _("Loading \"%s\""), filesv[i]);
if (error)
sfi_error (_("Failed to load wave file \"%s\": %s"), filesv[i], Bse::error_blurb (error));
@@ -382,7 +382,7 @@ main_open_files (int filesc, char **filesv)
{
Bse::ProjectH project = bse_server.create_project ("Untitled.bse");
SfiProxy wrepo = bse_project_get_wave_repo (project.proxy_id());
- Bse::ErrorType error = bse_wave_repo_load_file (wrepo, filesv[i]);
+ Bse::Error error = bse_wave_repo_load_file (wrepo, filesv[i]);
if (!error)
{
app = bst_app_new (project);
@@ -401,7 +401,7 @@ main_open_files (int filesc, char **filesv)
if (!app || !merge_with_last)
{
Bse::ProjectH project = bse_server.create_project (filesv[i]);
- Bse::ErrorType error = bst_project_restore_from_file (project, filesv[i], TRUE, TRUE);
+ Bse::Error error = bst_project_restore_from_file (project, filesv[i], TRUE, TRUE);
if (rewrite_bse_file)
{
Rapicorn::printerr ("%s: loading: %s\n", filesv[i], Bse::error_blurb (error));
@@ -432,7 +432,7 @@ main_open_files (int filesc, char **filesv)
}
else
{
- Bse::ErrorType error = bst_project_restore_from_file (app->project, filesv[i], TRUE, FALSE);
+ Bse::Error error = bst_project_restore_from_file (app->project, filesv[i], TRUE, FALSE);
if (error)
sfi_error (_("Failed to merge project \"%s\": %s"), filesv[i], Bse::error_blurb (error));
}
@@ -574,7 +574,7 @@ main_save_rc_files ()
bse_server.save_preferences();
/* save BEAST configuration and accelerator map */
gchar *file_name = BST_STRDUP_RC_FILE ();
- Bse::ErrorType error = bst_rc_dump (file_name);
+ Bse::Error error = bst_rc_dump (file_name);
if (error)
g_warning ("failed to save rc-file \"%s\": %s", file_name, Bse::error_blurb (error));
g_free (file_name);
diff --git a/beast-gtk/bstmsgabsorb.cc b/beast-gtk/bstmsgabsorb.cc
index 866d717..601a8fa 100644
--- a/beast-gtk/bstmsgabsorb.cc
+++ b/beast-gtk/bstmsgabsorb.cc
@@ -230,7 +230,7 @@ bst_msg_absorb_config_box_get (GtkWidget *self)
#include <errno.h>
#include <sfi/sfistore.hh> /* we rely on internal API here */
-static Bse::ErrorType
+static Bse::Error
bst_msg_absorb_config_dump (const gchar *file_name)
{
assert_return (file_name != NULL, Bse::Error::INTERNAL);
@@ -266,7 +266,7 @@ void
bst_msg_absorb_config_save (void)
{
gchar *file_name = BST_STRDUP_ABSORBRC_FILE();
- Bse::ErrorType error = bst_msg_absorb_config_dump (file_name);
+ Bse::Error error = bst_msg_absorb_config_dump (file_name);
if (error)
sfi_diag ("Failed to save config-file \"%s\": %s", file_name, Bse::error_blurb (error));
g_free (file_name);
@@ -294,7 +294,7 @@ msg_absorb_config_try_statement (gpointer context_data,
return SFI_TOKEN_UNMATCHED;
}
-static Bse::ErrorType
+static Bse::Error
bst_msg_absorb_config_parse (const gchar *file_name)
{
assert_return (file_name != NULL, Bse::Error::INTERNAL);
@@ -310,7 +310,7 @@ bst_msg_absorb_config_parse (const gchar *file_name)
SfiRStore *rstore = sfi_rstore_new ();
sfi_rstore_input_fd (rstore, fd, absname);
- Bse::ErrorType error = Bse::Error::NONE;
+ Bse::Error error = Bse::Error::NONE;
if (sfi_rstore_parse_all (rstore, NULL, msg_absorb_config_try_statement, absname) > 0)
error = Bse::Error::PARSE_ERROR;
sfi_rstore_destroy (rstore);
@@ -367,7 +367,7 @@ void
bst_msg_absorb_config_load (void)
{
gchar *file_name = BST_STRDUP_ABSORBRC_FILE();
- Bse::ErrorType error = bst_msg_absorb_config_parse (file_name);
+ Bse::Error error = bst_msg_absorb_config_parse (file_name);
if (0 && error)
sfi_diag ("Failed to load config-file \"%s\": %s", file_name, Bse::error_blurb (error));
g_free (file_name);
diff --git a/beast-gtk/bstpianorollctrl.cc b/beast-gtk/bstpianorollctrl.cc
index 09f942a..769620d 100644
--- a/beast-gtk/bstpianorollctrl.cc
+++ b/beast-gtk/bstpianorollctrl.cc
@@ -661,7 +661,7 @@ resize_motion (BstPianoRollController *self,
bse_item_group_undo (part.proxy_id(), "Resize Note");
if (self->obj_id)
{
- Bse::ErrorType error = part.delete_event (self->obj_id);
+ Bse::Error error = part.delete_event (self->obj_id);
if (error)
drag->state = GXK_DRAG_ERROR;
self->obj_id = 0;
@@ -693,7 +693,7 @@ delete_start (BstPianoRollController *self,
Bse::PartH part = self->proll->part;
if (self->obj_id) /* got note to delete */
{
- Bse::ErrorType error = part.delete_event (self->obj_id);
+ Bse::Error error = part.delete_event (self->obj_id);
bst_status_eprintf (error, _("Delete Note"));
}
else
@@ -706,7 +706,7 @@ insert_start (BstPianoRollController *self,
BstPianoRollDrag *drag)
{
Bse::PartH part = self->proll->part;
- Bse::ErrorType error = Bse::Error::NO_TARGET;
+ Bse::Error error = Bse::Error::NO_TARGET;
if (drag->start_valid)
{
guint qtick = bst_piano_roll_controller_quantize (self, drag->start_tick);
@@ -908,7 +908,7 @@ controller_piano_drag (BstPianoRollController *self,
(drag->type == GXK_DRAG_MOTION &&
self->obj_note != drag->current_note))
{
- Bse::ErrorType error;
+ Bse::Error error;
project.auto_deactivate (5 * 1000);
error = project.activate();
self->obj_note = drag->current_note;
diff --git a/beast-gtk/bstplayback.cc b/beast-gtk/bstplayback.cc
index e73fb8d..29bf8e5 100644
--- a/beast-gtk/bstplayback.cc
+++ b/beast-gtk/bstplayback.cc
@@ -57,7 +57,7 @@ bst_play_back_handle_set (BstPlayBackHandle *handle,
void
bst_play_back_handle_start (BstPlayBackHandle *handle)
{
- Bse::ErrorType error;
+ Bse::Error error;
error = handle->project.play();;
if (error)
diff --git a/beast-gtk/bstpreferences.cc b/beast-gtk/bstpreferences.cc
index dcda74d..ae16aea 100644
--- a/beast-gtk/bstpreferences.cc
+++ b/beast-gtk/bstpreferences.cc
@@ -277,7 +277,7 @@ void
bst_preferences_load_rc_files (void)
{
gchar *file_name = BST_STRDUP_RC_FILE ();
- Bse::ErrorType error;
+ Bse::Error error;
GSList *slist = NULL;
bst_rc_parse (file_name);
@@ -309,7 +309,7 @@ bst_preferences_saved (void)
void
bst_preferences_save (BstPreferences *self)
{
- Bse::ErrorType error = Bse::Error::NONE;
+ Bse::Error error = Bse::Error::NONE;
gchar *file_name;
GSList *slist = NULL;
diff --git a/beast-gtk/bstprocedure.cc b/beast-gtk/bstprocedure.cc
index 235df06..b8c9409 100644
--- a/beast-gtk/bstprocedure.cc
+++ b/beast-gtk/bstprocedure.cc
@@ -261,7 +261,7 @@ bst_procedure_shell_execute (BstProcedureShell *self)
if (widget)
{
SfiGlueProc *proc = self->proc;
- Bse::ErrorType error = Bse::Error::NONE;
+ Bse::Error error = Bse::Error::NONE;
SfiSeq *pseq = sfi_seq_new ();
GValue *rvalue;
guint i;
diff --git a/beast-gtk/bstprojectctrl.cc b/beast-gtk/bstprojectctrl.cc
index 8aa2e01..e5341cb 100644
--- a/beast-gtk/bstprojectctrl.cc
+++ b/beast-gtk/bstprojectctrl.cc
@@ -13,7 +13,7 @@ bst_project_ctrl_play (BstProjectCtrl *self)
if (self && self->project)
{
gchar *starting;
- Bse::ErrorType error;
+ Bse::Error error;
if (self->project.is_playing())
starting = _("Restarting Playback");
diff --git a/beast-gtk/bstskinconfig.cc b/beast-gtk/bstskinconfig.cc
index 9e4fb9a..727dd6a 100644
--- a/beast-gtk/bstskinconfig.cc
+++ b/beast-gtk/bstskinconfig.cc
@@ -186,7 +186,7 @@ bst_skin_config_notify (void)
#include <fcntl.h>
#include <errno.h>
#include <sfi/sfistore.hh> /* we rely on internal API here */
-Bse::ErrorType
+Bse::Error
bst_skin_dump (const gchar *file_name)
{
SfiWStore *wstore;
@@ -256,11 +256,11 @@ skin_file_try_statement (gpointer context_data,
return SFI_TOKEN_UNMATCHED;
}
-Bse::ErrorType
+Bse::Error
bst_skin_parse (const gchar *file_name)
{
SfiRStore *rstore;
- Bse::ErrorType error = Bse::Error::NONE;
+ Bse::Error error = Bse::Error::NONE;
gchar *absname;
gint fd;
diff --git a/beast-gtk/bstskinconfig.hh b/beast-gtk/bstskinconfig.hh
index a06b106..0011b03 100644
--- a/beast-gtk/bstskinconfig.hh
+++ b/beast-gtk/bstskinconfig.hh
@@ -26,8 +26,8 @@ void bst_skin_config_add_notify (BstSkinConfigNotify func,
void bst_skin_config_set_rcfile (const gchar *file_name);
const gchar* bst_skin_config_rcfile (void);
const gchar* bst_skin_config_dirname (void);
-Bse::ErrorType bst_skin_dump (const gchar *file_name);
-Bse::ErrorType bst_skin_parse (const gchar *file_name);
+Bse::Error bst_skin_dump (const gchar *file_name);
+Bse::Error bst_skin_parse (const gchar *file_name);
G_END_DECLS
diff --git a/beast-gtk/bstsnetrouter.cc b/beast-gtk/bstsnetrouter.cc
index 19fa5d8..95f31ef 100644
--- a/beast-gtk/bstsnetrouter.cc
+++ b/beast-gtk/bstsnetrouter.cc
@@ -623,7 +623,7 @@ bst_snet_router_root_event (BstSNetRouter *self,
}
else
{
- Bse::ErrorType error;
+ Bse::Error error;
if (!csource || (self->drag_is_input ? ochannel : ichannel) == ~uint (0))
error = self->drag_is_input ? Bse::Error::SOURCE_NO_SUCH_OCHANNEL :
Bse::Error::SOURCE_NO_SUCH_ICHANNEL;
else if (self->drag_is_input)
@@ -678,7 +678,7 @@ bst_snet_router_root_event (BstSNetRouter *self,
switch (i)
{
GtkWidget *dialog;
- Bse::ErrorType error;
+ Bse::Error error;
case 2:
bst_canvas_source_popup_params (csource);
break;
@@ -727,7 +727,7 @@ bst_snet_router_root_event (BstSNetRouter *self,
i = bst_choice_modal (choice, event->button.button, event->button.time);
switch (i)
{
- Bse::ErrorType error;
+ Bse::Error error;
case 1:
error = bse_source_unset_input_by_id (clink->icsource->source, clink->ichannel,
clink->ocsource->source, clink->ochannel);
@@ -769,7 +769,7 @@ bst_snet_router_event (GtkWidget *widget,
event->button.x, event->button.y,
&self->world_x, &self->world_y);
- Bse::ErrorType error = self->snet.can_create_source (ad.entity);
+ Bse::Error error = self->snet.can_create_source (ad.entity);
if (!error)
{
bse_item_group_undo (self->snet.proxy_id(), "Create Module");
diff --git a/beast-gtk/bsttreestores.cc b/beast-gtk/bsttreestores.cc
index dcbef80..9b12a54 100644
--- a/beast-gtk/bsttreestores.cc
+++ b/beast-gtk/bsttreestores.cc
@@ -90,7 +90,7 @@ file_store_idle_handler (gpointer data)
{
name = col + 1;
loader = "BSE Project";
- info.error = Bse::ErrorType (0);
+ info.error = Bse::Error (0);
}
}
}
diff --git a/beast-gtk/bstutils.cc b/beast-gtk/bstutils.cc
index e249c2b..5682995 100644
--- a/beast-gtk/bstutils.cc
+++ b/beast-gtk/bstutils.cc
@@ -169,7 +169,7 @@ bst_stock_register_icon (const gchar *stock_id,
/* --- beast/bse specific extensions --- */
void
-bst_status_set_error (Bse::ErrorType error, const std::string &message)
+bst_status_set_error (Bse::Error error, const std::string &message)
{
if (error)
gxk_status_set (GXK_STATUS_ERROR, message.c_str(), Bse::error_blurb (error));
diff --git a/beast-gtk/bstutils.hh b/beast-gtk/bstutils.hh
index d6f0163..e84e76a 100644
--- a/beast-gtk/bstutils.hh
+++ b/beast-gtk/bstutils.hh
@@ -24,7 +24,7 @@ extern Bse::ServerH bse_server;
G_BEGIN_DECLS
/* --- GUI utilities --- */
-void bst_status_set_error (Bse::ErrorType error, const String &message);
+void bst_status_set_error (Bse::Error error, const String &message);
#define bst_status_eprintf(error, ...) bst_status_set_error (error, Rapicorn::string_format
(__VA_ARGS__))
void bst_gui_error_bell (gpointer widget);
void bst_window_sync_title_to_proxy (gpointer window,
diff --git a/beast-gtk/bstwaveeditor.cc b/beast-gtk/bstwaveeditor.cc
index a5e1184..e14e6b6 100644
--- a/beast-gtk/bstwaveeditor.cc
+++ b/beast-gtk/bstwaveeditor.cc
@@ -529,7 +529,7 @@ bst_wave_editor_set_esample (BstWaveEditor *self,
self->esample = esample;
if (self->esample)
{
- Bse::ErrorType error;
+ Bse::Error error;
bse_item_use (self->esample);
error = bse_editable_sample_open (self->esample);
self->esample_open = error == Bse::Error::NONE;
diff --git a/bse/bseapi.idl b/bse/bseapi.idl
index 9cdf540..353977e 100644
--- a/bse/bseapi.idl
+++ b/bse/bseapi.idl
@@ -14,7 +14,7 @@ Const MININT31 = -2147483648;
Const MAXFLOAT64 = 1.7976931348623157e+308;
// == Enums ==
-enum ErrorType {
+enum Error {
ERROR_NONE = Enum (0, "", _("OK")),
ERROR_INTERNAL = Enum (1, "", _("Internal error (please report)")),
ERROR_UNKNOWN = Enum (2, "", _("Unknown error")),
@@ -537,9 +537,9 @@ interface Part : Item {
SongTiming get_timing (int32 tick); ///< Retrieve song timing information at a specific
tick.
int32 get_max_note (); ///< Retrieve the maximum note supported in this
part.
int32 get_min_note (); ///< Retrieve the minimum note supported in this
part.
- ErrorType change_control (int32 id, int32 tick, MidiSignalType control_type, float64
value); ///< Change an existing control event within a part.
- ErrorType change_note (int32 id, int32 tick, int32 duration, int32 note, int32
fine_tune, float64 velocity); ///< Change an existing note within a part.
- ErrorType delete_event (int32 id); ///< Delete an existing event from a part.
+ Error change_control (int32 id, int32 tick, MidiSignalType control_type, float64
value); ///< Change an existing control event within a part.
+ Error change_note (int32 id, int32 tick, int32 duration, int32 note, int32
fine_tune, float64 velocity); ///< Change an existing note within a part.
+ Error delete_event (int32 id); ///< Delete an existing event from a part.
int32 insert_control (int32 tick, MidiSignalType control_type, float64 value); ///<
Insert a new control event into a part.
int32 insert_note (int32 channel, int32 tick, int32 duration, int32 note, int32
fine_tune, float64 velocity); ///< Insert a new note into a part.
int32 insert_note_auto (int32 tick, int32 duration, int32 note, int32 fine_tune, float64
velocity); ///< Insert a new note into a part with automatic channel selection.
@@ -595,12 +595,12 @@ interface Source : Item {
// String ochannel_blurb (int32 output_channel); ///< Get output channel description.
// String ochannel_ident (int32 output_channel); ///< Get canonical output channel name.
// String ochannel_label (int32 output_channel); ///< Get output channel name.
- // ErrorType set_automation (String property_name, int32 midi_channel, MidiControlType control_type); ///<
Setup automation parameters for a property.
- // ErrorType set_input (String input_channel, Source omodule, String output_channel); ///< Connect a
module input to another module's output.
- // ErrorType set_input_by_id (int32 input_channel, Source omodule, int32 output_channel); ///< Connect a
module input to another module's output.
+ // Error set_automation (String property_name, int32 midi_channel, MidiControlType control_type); ///<
Setup automation parameters for a property.
+ // Error set_input (String input_channel, Source omodule, String output_channel); ///< Connect a module
input to another module's output.
+ // Error set_input_by_id (int32 input_channel, Source omodule, int32 output_channel); ///< Connect a
module input to another module's output.
// void set_pos (float64 x_pos, float64 y_pos); ///< Set the x and y position of a module. In contrast to
setting the position through ordinary object property setters, this function will not update the module
position if the passed in arguments are sufficiently equal to the values already set on the object. As such,
it does not record an extra undo step for setting properties to values they already have and if necessary
turns setting of x and y positions into an atomic undo operation.
- // ErrorType unset_input (String input_channel, Source omodule, String output_channel); ///< Disconnect a
module input.
- // ErrorType unset_input_by_id (int32 input_channel, Source omodule, int32 output_channel); ///<
Disconnect a module input.
+ // Error unset_input (String input_channel, Source omodule, String output_channel); ///< Disconnect a
module input.
+ // Error unset_input_by_id (int32 input_channel, Source omodule, int32 output_channel); ///< Disconnect a
module input.
// signal void probes (ProbeSeq a);
// signal void io_changed ();
// float64 pos_x = Range ("Position X", "", STANDARD ":scale");
@@ -623,9 +623,9 @@ interface Super : Container {
/// Base interface type for all kinds of synthesis networks.
interface SNet : Super {
bool supports_user_synths (); ///< Check whether users may edit synthesis modules of
this network.
- ErrorType can_create_source (String module_type); ///< Check whether inserting a new module into a
synthesis network is possible.
+ Error can_create_source (String module_type); ///< Check whether inserting a new module into a
synthesis network is possible.
Source create_source (String module_type); ///< Insert a new module into a synthesis network.
- ErrorType remove_source (Source module); ///< Remove an existing module from its synthesis
network.
+ Error remove_source (Source module); ///< Remove an existing module from its synthesis
network.
signal void port_unregistered (); ///< Signal that notifies when a named output port is
unregistered.
group _("Playback Settings") {
bool auto_activate = Bool (_("Auto Activate"),
@@ -671,7 +671,7 @@ interface Track : ContextMerger {
TrackPartSeq list_parts (); ///< List parts scheduled in a track, sorted by tick.
Part get_part (int32 tick); ///< Get the part starting at a specific tick position.
int32 get_last_tick (); ///< Retrieve the last tick for this track.
- ErrorType ensure_output (); ///< Ensure the track has an output connection to a bus.
+ Error ensure_output (); ///< Ensure the track has an output connection to a bus.
/// Get the output module of a track.
/// The output of this module is the merged result from all polyphonic voices and has all track specific
alterations applied.
Source get_output_source ();
@@ -713,11 +713,11 @@ sequence TrackPartSeq {
/// Interface for effect stacks and per-track audio signal routing to the master output.
interface Bus : SubSynth {
- ErrorType ensure_output (); ///< Ensure that a bus has an output connection.
- ErrorType connect_bus (Bus bus); ///< Add a bus to the input list of a bus.
- ErrorType connect_track (Track track); ///< Add a track to the input list of a bus.
- ErrorType disconnect_bus (Bus bus); ///< Remove a bus from the input list of a bus.
- ErrorType disconnect_track (Track track); ///< Remove a track from the input list of a bus.
+ Error ensure_output (); ///< Ensure that a bus has an output connection.
+ Error connect_bus (Bus bus); ///< Add a bus to the input list of a bus.
+ Error connect_track (Track track); ///< Add a track to the input list of a bus.
+ Error disconnect_bus (Bus bus); ///< Remove a bus from the input list of a bus.
+ Error disconnect_track (Track track); ///< Remove a track from the input list of a bus.
// ItemSeq inputs = Object ("Input Signals", "Synthesis signals (from tracks and busses) used as
bus input", GUI ":item-sequence");
// ItemSeq outputs = Object ("Output Signals", "Mixer busses used as output for synthesis
signals", GUI ":item-sequence");
// CSynth snet = Object ("SNet", "Synthesis network used internally to implement effect
stack", READWRITE ":skip-undo");
@@ -778,7 +778,7 @@ record SampleFileInfo {
int64 mtime = Range ("MTime", "Last modification time in µseconds", ":readwrite", 0, MAXINT63);
String loader = String ("Loader", "Sample loader implementation", STANDARD);
StringSeq waves = Sequence ("Waves", "List of embedded waves", STANDARD);
- ErrorType error = Enum ("Error", "Indicator for errors during sample operation", STANDARD);
+ Error error = Enum ("Error", "Indicator for errors during sample operation", STANDARD);
};
/// Interface for editable PCM wave samples.
@@ -804,8 +804,8 @@ interface MidiSynth : SNet {
/// Projects support loading, saving, playback and act as containers for all other sound objects.
interface Project : Container {
void change_name (String name); ///< Change a project name without recording undo steps.
- ErrorType play(); ///< Activate a project and start project playback (an already playing project is
first halted).
- ErrorType activate(); ///< Activate a project, precondition to start playback.
+ Error play(); ///< Activate a project and start project playback (an already playing project is first
halted).
+ Error activate(); ///< Activate a project, precondition to start playback.
//ProjectState get_state(); ///< Retrieve the current project activation/playback state.
bool can_play(); ///< Check whether project playback would makes sense.
bool is_playing(); ///< Check whether a project is currently playing (song sequencing).
@@ -836,9 +836,9 @@ interface Project : Container {
/// The references to other objects (e.g. samples) can be stored
/// by reference (self_contained=false) or embedded in the output
/// file (self_contained=true).
- //ErrorType store_bse (Super super, String file_name, bool self_contained);
- ErrorType import_midi_file (String file_name); ///< Import a song from a MIDI file.
- ErrorType restore_from_file (String file_name); ///< Load a project from file.
+ //Error store_bse (Super super, String file_name, bool self_contained);
+ Error import_midi_file (String file_name); ///< Import a song from a MIDI file.
+ Error restore_from_file (String file_name); ///< Load a project from file.
//Song create_song (String name); ///< Create a song for this project.
//WaveRepo get_wave_repo (); ///< Retrieve the project's unique wave repository.
//CSynth create_csynth (String name); ///< Create a synthsizer network for this project.
diff --git a/bse/bsebus.cc b/bse/bsebus.cc
index 8c40f69..6f74f7c 100644
--- a/bse/bsebus.cc
+++ b/bse/bsebus.cc
@@ -172,7 +172,7 @@ bus_disconnect_outputs (BseBus *self)
SfiRing *ring, *outputs = bse_bus_list_outputs (self);
for (ring = outputs; ring; ring = sfi_ring_walk (ring, outputs))
{
- Bse::ErrorType error = bse_bus_disconnect (BSE_BUS (ring->data), BSE_ITEM (self));
+ Bse::Error error = bse_bus_disconnect (BSE_BUS (ring->data), BSE_ITEM (self));
bse_assert_ok (error);
}
bse_source_clear_ochannels (BSE_SOURCE (self)); /* also disconnects master */
@@ -646,7 +646,7 @@ bus_uncross_input (BseItem *owner,
}
}
-Bse::ErrorType
+Bse::Error
bse_bus_connect (BseBus *self,
BseItem *trackbus)
{
@@ -670,7 +670,7 @@ bse_bus_connect (BseBus *self,
return Bse::Error::SOURCE_CONNECTION_INVALID;
}
-Bse::ErrorType
+Bse::Error
bse_bus_connect_unchecked (BseBus *self,
BseItem *trackbus)
{
@@ -684,7 +684,7 @@ bse_bus_connect_unchecked (BseBus *self,
if (!osource || !bse_bus_ensure_summation (self) ||
BSE_ITEM (osource)->parent != BSE_ITEM (self)->parent) /* restrict to siblings */
return Bse::Error::SOURCE_PARENT_MISMATCH;
- Bse::ErrorType error = bse_source_set_input (self->summation, 0, osource, 0);
+ Bse::Error error = bse_source_set_input (self->summation, 0, osource, 0);
if (!error)
{
bse_source_must_set_input (self->summation, 1, osource, 1);
@@ -699,7 +699,7 @@ bse_bus_connect_unchecked (BseBus *self,
return error;
}
-Bse::ErrorType
+Bse::Error
bse_bus_disconnect (BseBus *self,
BseItem *trackbus)
{
@@ -717,8 +717,8 @@ bse_bus_disconnect (BseBus *self,
bse_item_cross_unlink (BSE_ITEM (self), BSE_ITEM (trackbus), bus_uncross_input);
self->inputs = sfi_ring_remove (self->inputs, trackbus);
trackbus_update_outputs (trackbus, NULL, self);
- Bse::ErrorType error1 = bse_source_unset_input (self->summation, 0, osource, 0);
- Bse::ErrorType error2 = bse_source_unset_input (self->summation, 1, osource, 1);
+ Bse::Error error1 = bse_source_unset_input (self->summation, 0, osource, 0);
+ Bse::Error error2 = bse_source_unset_input (self->summation, 1, osource, 1);
g_object_notify (G_OBJECT (self), "inputs");
g_object_notify (G_OBJECT (trackbus), "outputs");
return error1 ? error1 : error2;
@@ -750,7 +750,7 @@ bus_restore_add_input (gpointer data,
bse_storage_warn (storage, "failed to add input to mixer bus \"%s\": %s", BSE_OBJECT_UNAME (self),
error);
else
{
- Bse::ErrorType cerror;
+ Bse::Error cerror;
if (osource)
cerror = bse_bus_connect (self, BSE_ITEM (osource));
else
@@ -938,11 +938,11 @@ BusImpl::BusImpl (BseObject *bobj) :
BusImpl::~BusImpl ()
{}
-ErrorType
+Error
BusImpl::ensure_output ()
{
BseBus *self = as<BseBus*>();
- ErrorType error = Error::NONE;
+ Error error = Error::NONE;
BseItem *parent = self->parent;
if (BSE_IS_SONG (parent) && !self->bus_outputs)
{
@@ -957,7 +957,7 @@ BusImpl::ensure_output ()
return error;
}
-ErrorType
+Error
BusImpl::connect_bus (BusIface &busi)
{
BseBus *self = as<BseBus*>();
@@ -965,12 +965,12 @@ BusImpl::connect_bus (BusIface &busi)
if (!this->parent() || this->parent() != bus.parent())
return Error::SOURCE_PARENT_MISMATCH;
- ErrorType error = bse_bus_connect (self, bus.as<BseItem*>());
+ Error error = bse_bus_connect (self, bus.as<BseItem*>());
if (!error)
{
// an undo lambda is needed for wrapping object argument references
UndoDescriptor<BusImpl> bus_descriptor = undo_descriptor (bus);
- auto lambda = [bus_descriptor] (BusImpl &self, BseUndoStack *ustack) -> ErrorType {
+ auto lambda = [bus_descriptor] (BusImpl &self, BseUndoStack *ustack) -> Error {
return self.disconnect_bus (self.undo_resolve (bus_descriptor));
};
push_undo (__func__, *this, lambda);
@@ -978,7 +978,7 @@ BusImpl::connect_bus (BusIface &busi)
return error;
}
-ErrorType
+Error
BusImpl::connect_track (TrackIface &tracki)
{
BseBus *self = as<BseBus*>();
@@ -986,12 +986,12 @@ BusImpl::connect_track (TrackIface &tracki)
if (!this->parent() || this->parent() != track.parent())
return Error::SOURCE_PARENT_MISMATCH;
- ErrorType error = bse_bus_connect (self, track.as<BseItem*>());
+ Error error = bse_bus_connect (self, track.as<BseItem*>());
if (!error)
{
// an undo lambda is needed for wrapping object argument references
UndoDescriptor<TrackImpl> track_descriptor = undo_descriptor (track);
- auto lambda = [track_descriptor] (BusImpl &self, BseUndoStack *ustack) -> ErrorType {
+ auto lambda = [track_descriptor] (BusImpl &self, BseUndoStack *ustack) -> Error {
return self.disconnect_track (self.undo_resolve (track_descriptor));
};
push_undo (__func__, *this, lambda);
@@ -999,17 +999,17 @@ BusImpl::connect_track (TrackIface &tracki)
return error;
}
-ErrorType
+Error
BusImpl::disconnect_bus (BusIface &busi)
{
BseBus *self = as<BseBus*>();
BusImpl &bus = dynamic_cast<BusImpl&> (busi);
- ErrorType error = bse_bus_disconnect (self, busi.as<BseItem*>());
+ Error error = bse_bus_disconnect (self, busi.as<BseItem*>());
if (!error)
{
// an undo lambda is needed for wrapping object argument references
UndoDescriptor<BusImpl> bus_descriptor = undo_descriptor (bus);
- auto lambda = [bus_descriptor] (BusImpl &self, BseUndoStack *ustack) -> ErrorType {
+ auto lambda = [bus_descriptor] (BusImpl &self, BseUndoStack *ustack) -> Error {
return self.connect_bus (self.undo_resolve (bus_descriptor));
};
push_undo (__func__, *this, lambda);
@@ -1017,17 +1017,17 @@ BusImpl::disconnect_bus (BusIface &busi)
return error;
}
-ErrorType
+Error
BusImpl::disconnect_track (TrackIface &tracki)
{
BseBus *self = as<BseBus*>();
TrackImpl &track = dynamic_cast<TrackImpl&> (tracki);
- ErrorType error = bse_bus_disconnect (self, tracki.as<BseItem*>());
+ Error error = bse_bus_disconnect (self, tracki.as<BseItem*>());
if (!error)
{
// an undo lambda is needed for wrapping object argument references
UndoDescriptor<TrackImpl> track_descriptor = undo_descriptor (track);
- auto lambda = [track_descriptor] (BusImpl &self, BseUndoStack *ustack) -> ErrorType {
+ auto lambda = [track_descriptor] (BusImpl &self, BseUndoStack *ustack) -> Error {
return self.connect_track (self.undo_resolve (track_descriptor));
};
push_undo (__func__, *this, lambda);
diff --git a/bse/bsebus.hh b/bse/bsebus.hh
index cf41620..245c13b 100644
--- a/bse/bsebus.hh
+++ b/bse/bsebus.hh
@@ -35,11 +35,11 @@ struct BseBusClass : BseSubSynthClass
{};
/* --- API --- */
-Bse::ErrorType bse_bus_connect (BseBus *self,
+Bse::Error bse_bus_connect (BseBus *self,
BseItem *item);
-Bse::ErrorType bse_bus_connect_unchecked (BseBus *self,
+Bse::Error bse_bus_connect_unchecked (BseBus *self,
BseItem *item);
-Bse::ErrorType bse_bus_disconnect (BseBus *self,
+Bse::Error bse_bus_disconnect (BseBus *self,
BseItem *item);
SfiRing* bse_bus_list_inputs (BseBus *self);
SfiRing* bse_bus_list_outputs (BseBus *self);
@@ -47,11 +47,11 @@ gboolean bse_bus_get_stack (BseBus *self,
BseContainer **snet,
BseSource **vin,
BseSource **vout);
-Bse::ErrorType bse_bus_insert_slot (BseBus *self,
+Bse::Error bse_bus_insert_slot (BseBus *self,
guint slot);
-Bse::ErrorType bse_bus_delete_slot (BseBus *self,
+Bse::Error bse_bus_delete_slot (BseBus *self,
guint slot);
-Bse::ErrorType bse_bus_replace_effect (BseBus *self,
+Bse::Error bse_bus_replace_effect (BseBus *self,
guint slot,
const gchar *etype);
void bse_bus_change_solo (BseBus *self,
@@ -85,11 +85,11 @@ protected:
virtual ~BusImpl ();
public:
explicit BusImpl (BseObject*);
- virtual ErrorType ensure_output () override;
- virtual ErrorType connect_bus (BusIface &bus) override;
- virtual ErrorType connect_track (TrackIface &track) override;
- virtual ErrorType disconnect_bus (BusIface &bus) override;
- virtual ErrorType disconnect_track (TrackIface &track) override;
+ virtual Error ensure_output () override;
+ virtual Error connect_bus (BusIface &bus) override;
+ virtual Error connect_track (TrackIface &track) override;
+ virtual Error disconnect_bus (BusIface &bus) override;
+ virtual Error disconnect_track (TrackIface &track) override;
};
} // Bse
diff --git a/bse/bsedatahandle-fir.cc b/bse/bsedatahandle-fir.cc
index 121c3c3..2ed0fc1 100644
--- a/bse/bsedatahandle-fir.cc
+++ b/bse/bsedatahandle-fir.cc
@@ -64,10 +64,10 @@ public:
}
}
- Bse::ErrorType
+ Bse::Error
open (GslDataHandleSetup *setup)
{
- Bse::ErrorType error = gsl_data_handle_open (m_src_handle);
+ Bse::Error error = gsl_data_handle_open (m_src_handle);
if (error != Bse::Error::NONE)
return error;
@@ -238,7 +238,7 @@ public:
}
private:
/* for the "C" API (vtable) */
- static Bse::ErrorType
+ static Bse::Error
dh_open (GslDataHandle *dhandle, GslDataHandleSetup *setup)
{
return dh_cast (dhandle)->open (setup);
diff --git a/bse/bsedatahandle-flac.cc b/bse/bsedatahandle-flac.cc
index ec6147d..a014c10 100644
--- a/bse/bsedatahandle-flac.cc
+++ b/bse/bsedatahandle-flac.cc
@@ -167,7 +167,7 @@ public:
if (m_init_ok)
gsl_data_handle_common_free (&m_dhandle);
}
- Bse::ErrorType
+ Bse::Error
open (GslDataHandleSetup *setup)
{
m_decoder = FLAC__stream_decoder_new();
@@ -296,7 +296,7 @@ public:
}
private:
// for the "C" API (vtable)
- static Bse::ErrorType
+ static Bse::Error
dh_open (GslDataHandle *dhandle, GslDataHandleSetup *setup)
{
return dh_cast (dhandle)->open (setup);
@@ -357,7 +357,7 @@ bse_data_handle_new_flac_zoffset (const char *file_name,
return NULL;
/* figure out mix_freq, n_channels */
- Bse::ErrorType error = gsl_data_handle_open (dhandle);
+ Bse::Error error = gsl_data_handle_open (dhandle);
if (!error)
{
if (n_channels_p)
diff --git a/bse/bsedatahandle-resample.cc b/bse/bsedatahandle-resample.cc
index 05e40b2..1ce0999 100644
--- a/bse/bsedatahandle-resample.cc
+++ b/bse/bsedatahandle-resample.cc
@@ -123,10 +123,10 @@ protected:
virtual int64 read_frame (int64 frame) = 0;
public:
- Bse::ErrorType
+ Bse::Error
open (GslDataHandleSetup *setup)
{
- Bse::ErrorType error = gsl_data_handle_open (m_src_handle);
+ Bse::Error error = gsl_data_handle_open (m_src_handle);
if (error != Bse::Error::NONE)
return error;
@@ -275,7 +275,7 @@ private:
return static_cast<CDataHandleResample2 *> (dhandle)->cxx_dh;
//return reinterpret_cast<DataHandleResample2 *> (dhandle);
}
- static Bse::ErrorType
+ static Bse::Error
dh_open (GslDataHandle *dhandle, GslDataHandleSetup *setup)
{
return dh_cast (dhandle)->open (setup);
diff --git a/bse/bsedevice.cc b/bse/bsedevice.cc
index d9d265f..427d1f1 100644
--- a/bse/bsedevice.cc
+++ b/bse/bsedevice.cc
@@ -41,13 +41,13 @@ device_split_args (const char *arg_string,
return strv;
}
-static Bse::ErrorType
+static Bse::Error
device_open_args (BseDevice *self,
gboolean need_readable,
gboolean need_writable,
const char *arg_string)
{
- Bse::ErrorType error;
+ Bse::Error error;
uint n;
char **args = device_split_args (arg_string, &n);
error = BSE_DEVICE_GET_CLASS (self)->open (self,
@@ -78,7 +78,7 @@ device_open_args (BseDevice *self,
return error;
}
-Bse::ErrorType
+Bse::Error
bse_device_open (BseDevice *self,
gboolean need_readable,
gboolean need_writable,
@@ -86,7 +86,7 @@ bse_device_open (BseDevice *self,
{
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;
+ Bse::Error error = Bse::Error::DEVICE_NOT_AVAILABLE;
if (arg_string)
error = device_open_args (self, need_readable, need_writable, arg_string);
else
@@ -375,7 +375,7 @@ bse_device_open_auto (GType base_type,
void (*request_callback) (BseDevice *device,
void *data),
void *data,
- Bse::ErrorType *errorp)
+ Bse::Error *errorp)
{
if (errorp)
*errorp = Bse::Error::DEVICE_NOT_AVAILABLE;
@@ -388,7 +388,7 @@ bse_device_open_auto (GType base_type,
device = (BseDevice*) bse_object_new (G_OBJECT_CLASS_TYPE (klass), NULL);
if (request_callback)
request_callback (device, data);
- Bse::ErrorType error = bse_device_open (device, need_readable, need_writable, NULL);
+ Bse::Error error = bse_device_open (device, need_readable, need_writable, NULL);
if (errorp)
*errorp = error;
if (BSE_DEVICE_OPEN (device))
@@ -419,7 +419,7 @@ bse_device_open_best (GType base_type,
void (*request_callback) (BseDevice *device,
void *data),
void *data,
- Bse::ErrorType *errorp)
+ Bse::Error *errorp)
{
if (errorp)
*errorp = Bse::Error::DEVICE_NOT_AVAILABLE;
@@ -453,7 +453,7 @@ bse_device_open_best (GType base_type,
device = (BseDevice*) bse_object_new (G_OBJECT_CLASS_TYPE (klass), NULL);
if (request_callback)
request_callback (device, data);
- Bse::ErrorType error = bse_device_open (device, need_readable, need_writable, args ? args + 1 :
NULL);
+ Bse::Error error = bse_device_open (device, need_readable, need_writable, args ? args + 1 : NULL);
if (errorp)
*errorp = error;
if (!error)
diff --git a/bse/bsedevice.hh b/bse/bsedevice.hh
index 38f3ab3..a2aca0c 100644
--- a/bse/bsedevice.hh
+++ b/bse/bsedevice.hh
@@ -41,7 +41,7 @@ struct BseDeviceClass : BseObjectClass {
const gchar *driver_syntax;
const gchar *driver_blurb;
SfiRing* (*list_devices) (BseDevice *device);
- Bse::ErrorType (*open) (BseDevice *device,
+ Bse::Error (*open) (BseDevice *device,
gboolean require_readable,
gboolean require_writable,
guint n_args,
@@ -65,7 +65,7 @@ void bse_device_class_setup (gpointer klass,
const gchar *syntax,
const gchar *blurb);
SfiRing* bse_device_list (BseDevice *device);
-Bse::ErrorType bse_device_open (BseDevice *device,
+Bse::Error bse_device_open (BseDevice *device,
gboolean need_readable,
gboolean need_writable,
const gchar *arg_string);
@@ -102,14 +102,14 @@ BseDevice* bse_device_open_best (GType base_type,
void (*request_callback) (BseDevice *device,
gpointer data),
gpointer data,
- Bse::ErrorType *errorp);
+ Bse::Error *errorp);
BseDevice* bse_device_open_auto (GType base_type,
gboolean need_readable,
gboolean need_writable,
void (*request_callback) (BseDevice *device,
gpointer data),
gpointer data,
- Bse::ErrorType *errorp);
+ Bse::Error *errorp);
G_END_DECLS
diff --git a/bse/bseeditablesample.proc b/bse/bseeditablesample.proc
index a0e6a1f..3e73650 100644
--- a/bse/bseeditablesample.proc
+++ b/bse/bseeditablesample.proc
@@ -22,7 +22,7 @@ METHOD (BseEditableSample, open) {
{
/* extract parameter values */
BseEditableSample *esample = (BseEditableSample*) bse_value_get_object (in_values++);
- Bse::ErrorType error;
+ Bse::Error error;
/* check parameters */
if (!BSE_IS_EDITABLE_SAMPLE (esample))
diff --git a/bse/bseenums.cc b/bse/bseenums.cc
index 0f7bd16..1266bde 100644
--- a/bse/bseenums.cc
+++ b/bse/bseenums.cc
@@ -39,15 +39,15 @@ bse_type_register_enums (void)
}
const char*
-bse_error_blurb (Bse::ErrorType error_value)
+bse_error_blurb (Bse::Error error_value)
{
- const Rapicorn::Aida::EnumValue ev = Rapicorn::Aida::enum_info<Bse::ErrorType>().find_value (error_value);
+ const Rapicorn::Aida::EnumValue ev = Rapicorn::Aida::enum_info<Bse::Error>().find_value (error_value);
return ev.blurb;
}
-Bse::ErrorType
+Bse::Error
bse_error_from_errno (int v_errno,
- Bse::ErrorType fallback)
+ Bse::Error fallback)
{
return gsl_error_from_errno (v_errno, fallback);
}
diff --git a/bse/bseenums.hh b/bse/bseenums.hh
index abe8f57..65d5a63 100644
--- a/bse/bseenums.hh
+++ b/bse/bseenums.hh
@@ -303,8 +303,8 @@ typedef enum
/* --- convenience functions --- */
-const gchar* bse_error_blurb (Bse::ErrorType error_value);
-Bse::ErrorType bse_error_from_errno (gint v_errno, Bse::ErrorType fallback);
+const gchar* bse_error_blurb (Bse::Error error_value);
+Bse::Error bse_error_from_errno (gint v_errno, Bse::Error fallback);
#define bse_assert_ok(error) G_STMT_START{ \
if G_UNLIKELY (error) \
diff --git a/bse/bseglue.cc b/bse/bseglue.cc
index 0fe6753..afc05d9 100644
--- a/bse/bseglue.cc
+++ b/bse/bseglue.cc
@@ -595,7 +595,7 @@ bglue_iface_children (SfiGlueContext *context,
return childnames;
}
-static Bse::ErrorType
+static Bse::Error
bglue_marshal_proc (void *marshal_data,
BseProcedureClass *proc,
const GValue *ivalues,
@@ -618,7 +618,7 @@ bglue_exec_proc (SfiGlueContext *context,
GValue *ovalues = g_new0 (GValue, proc->n_out_pspecs);
GSList *ilist = NULL, *olist = NULL, *clearlist = NULL;
uint i, sl = sfi_seq_length (params);
- Bse::ErrorType error;
+ Bse::Error error;
for (i = 0; i < proc->n_in_pspecs; i++)
{
diff --git a/bse/bseitem.cc b/bse/bseitem.cc
index a3b3728..fc3daae 100644
--- a/bse/bseitem.cc
+++ b/bse/bseitem.cc
@@ -744,13 +744,13 @@ find_method_procedure (GType object_type,
return proc_type;
}
-static inline Bse::ErrorType
+static inline Bse::Error
bse_item_execva_i (BseItem *item,
const char *procedure,
va_list var_args,
gboolean skip_oparams)
{
- Bse::ErrorType error;
+ Bse::Error error;
GType proc_type = find_method_procedure (BSE_OBJECT_TYPE (item), procedure);
GValue obj_value;
@@ -771,14 +771,14 @@ bse_item_execva_i (BseItem *item,
return error;
}
-Bse::ErrorType
+Bse::Error
bse_item_exec (void *_item,
const char *procedure,
...)
{
BseItem *item = (BseItem*) _item;
va_list var_args;
- Bse::ErrorType error;
+ Bse::Error error;
assert_return (BSE_IS_ITEM (item), Bse::Error::INTERNAL);
assert_return (procedure != NULL, Bse::Error::INTERNAL);
@@ -790,14 +790,14 @@ bse_item_exec (void *_item,
return error;
}
-Bse::ErrorType
+Bse::Error
bse_item_exec_void (void *_item,
const char *procedure,
...)
{
BseItem *item = (BseItem*) _item;
va_list var_args;
- Bse::ErrorType error;
+ Bse::Error error;
assert_return (BSE_IS_ITEM (item), Bse::Error::INTERNAL);
assert_return (procedure != NULL, Bse::Error::INTERNAL);
@@ -880,7 +880,7 @@ undo_call_proc (BseUndoStep *ustep,
else /* invoke procedure */
{
GValue ovalue = { 0, };
- Bse::ErrorType error;
+ Bse::Error error;
uint i;
/* convert values from undo */
for (i = 0; i < proc->n_in_pspecs; i++)
@@ -895,7 +895,7 @@ undo_call_proc (BseUndoStep *ustep,
{
/* check returned error if any */
if (G_PARAM_SPEC_VALUE_TYPE (proc->out_pspecs[0]) == BSE_TYPE_ERROR_TYPE && !error)
- error = Bse::ErrorType (g_value_get_enum (&ovalue));
+ error = Bse::Error (g_value_get_enum (&ovalue));
g_value_unset (&ovalue);
}
/* we're not tolerating any errors */
@@ -915,7 +915,7 @@ bse_item_push_undo_proc_valist (void *item,
BseUndoStack *ustack = bse_item_undo_open (item, "%s: %s", commit_as_redo ? "redo-proc" : "undo-proc",
procedure);
BseProcedureClass *proc;
GValue *ivalues;
- Bse::ErrorType error;
+ Bse::Error error;
uint i;
if (BSE_UNDO_STACK_VOID (ustack) ||
BSE_ITEM_INTERNAL (item))
@@ -1303,7 +1303,7 @@ undo_lambda_call (BseUndoStep *ustep, BseUndoStack *ustack)
ItemImpl &self = project.undo_resolve (*(ItemImpl::UndoDescriptor<ItemImpl>*) ustep->data[0].v_pointer);
auto *lambda = (ItemImpl::UndoLambda*) ustep->data[1].v_pointer;
// invoke undo function
- const Bse::ErrorType error = (*lambda) (self, ustack);
+ const Bse::Error error = (*lambda) (self, ustack);
if (error) // undo errors shouldn't happen
{
String *blurb = (String*) ustep->data[2].v_pointer;
@@ -1339,7 +1339,7 @@ ItemImpl::push_property_undo (const String &property_name)
critical ("%s: invalid property name: %s", __func__, property_name);
else
{
- auto lambda = [property_name, saved_value] (ItemImpl &self, BseUndoStack *ustack) -> ErrorType {
+ auto lambda = [property_name, saved_value] (ItemImpl &self, BseUndoStack *ustack) -> Error {
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());
diff --git a/bse/bseitem.hh b/bse/bseitem.hh
index 0dced22..33113a1 100644
--- a/bse/bseitem.hh
+++ b/bse/bseitem.hh
@@ -108,10 +108,10 @@ BseItem* bse_item_use (BseItem *item);
void bse_item_unuse (BseItem *item);
void bse_item_set_parent (BseItem *item,
BseItem *parent);
-Bse::ErrorType bse_item_exec (gpointer item,
+Bse::Error bse_item_exec (gpointer item,
const gchar *procedure,
...);
-Bse::ErrorType bse_item_exec_void (gpointer item,
+Bse::Error bse_item_exec_void (gpointer item,
const gchar *procedure,
...); /* ignore return values */
/* undo-aware functions */
@@ -150,7 +150,7 @@ G_END_DECLS
namespace Bse {
class ItemImpl : public ObjectImpl, public virtual ItemIface {
-public: typedef std::function<ErrorType (ItemImpl &item, BseUndoStack *ustack)> UndoLambda;
+public: typedef std::function<Error (ItemImpl &item, BseUndoStack *ustack)> UndoLambda;
private:
void push_item_undo (const String &blurb, const UndoLambda &lambda);
struct UndoDescriptorData {
@@ -172,7 +172,7 @@ public:
void push_property_undo (const String &property_name);
/// Push an undo @a function onto the undo stack, the @a self argument to @a function must match @a this.
template<typename ItemT, typename... FuncArgs, typename... CallArgs> void
- push_undo (const String &blurb, ItemT &self, ErrorType (ItemT::*function) (FuncArgs...), CallArgs... args)
+ push_undo (const String &blurb, ItemT &self, Error (ItemT::*function) (FuncArgs...), CallArgs... args)
{
RAPICORN_ASSERT_RETURN (this == &self);
UndoLambda lambda = [function, args...] (ItemImpl &item, BseUndoStack *ustack) {
@@ -193,11 +193,11 @@ public:
};
push_item_undo (blurb, lambda);
}
- /// Push an undo lambda, using the signature: ErrorType lambda (TypeDerivedFromItem&, BseUndoStack*);
+ /// Push an undo lambda, using the signature: Error lambda (TypeDerivedFromItem&, BseUndoStack*);
template<typename ItemT, typename ItemTLambda> void
push_undo (const String &blurb, ItemT &self, const ItemTLambda &itemt_lambda)
{
- const std::function<ErrorType (ItemT &item, BseUndoStack *ustack)> &undo_lambda = itemt_lambda;
+ const std::function<Error (ItemT &item, BseUndoStack *ustack)> &undo_lambda = itemt_lambda;
RAPICORN_ASSERT_RETURN (this == &self);
UndoLambda lambda = [undo_lambda] (ItemImpl &item, BseUndoStack *ustack) {
ItemT &self = dynamic_cast<ItemT&> (item);
@@ -209,9 +209,9 @@ public:
template<typename ItemT, typename ItemTLambda> void
push_undo_to_redo (const String &blurb, ItemT &self, const ItemTLambda &itemt_lambda)
{ // push itemt_lambda as undo step when this undo step is executed (i.e. itemt_lambda is for redo)
- const std::function<ErrorType (ItemT &item, BseUndoStack *ustack)> &undo_lambda = itemt_lambda;
+ const std::function<Error (ItemT &item, BseUndoStack *ustack)> &undo_lambda = itemt_lambda;
RAPICORN_ASSERT_RETURN (this == &self);
- auto lambda = [blurb, undo_lambda] (ItemT &self, BseUndoStack *ustack) -> ErrorType {
+ auto lambda = [blurb, undo_lambda] (ItemT &self, BseUndoStack *ustack) -> Error {
self.push_undo (blurb, self, undo_lambda);
return Error::NONE;
};
diff --git a/bse/bseloader-aiff.cc b/bse/bseloader-aiff.cc
index 88831c1..0def0d4 100644
--- a/bse/bseloader-aiff.cc
+++ b/bse/bseloader-aiff.cc
@@ -145,7 +145,7 @@ aiff_read_pstring (int fd,
return r;
}
-static Bse::ErrorType
+static Bse::Error
aiff_read_comm (int fd,
AiffFile *afile,
guint32 chunk_size)
@@ -171,7 +171,7 @@ aiff_read_comm (int fd,
return Bse::Error::NONE;
}
-static Bse::ErrorType
+static Bse::Error
aiff_read_mark (int fd,
AiffFile *afile,
guint32 chunk_size)
@@ -201,7 +201,7 @@ aiff_read_mark (int fd,
return Bse::Error::NONE;
}
-static Bse::ErrorType
+static Bse::Error
aiff_read_inst (int fd,
AiffFile *afile,
guint32 chunk_size)
@@ -214,7 +214,7 @@ aiff_read_inst (int fd,
r = read (fd, &afile->instrument, 20);
while (r < 0 && errno == EINTR);
if (r < 0)
- return Bse::ErrorType (r);
+ return Bse::Error (r);
afile->instrument.gain_dB = GINT16_FROM_BE (afile->instrument.gain_dB);
afile->instrument.sustain_loop_mode = GUINT16_FROM_BE (afile->instrument.sustain_loop_mode);
afile->instrument.sustain_begin_id = GUINT16_FROM_BE (afile->instrument.sustain_begin_id);
@@ -230,7 +230,7 @@ aiff_read_inst (int fd,
return Bse::Error::NONE;
}
-static Bse::ErrorType
+static Bse::Error
aiff_read_ssnd (int fd,
AiffFile *afile,
guint32 chunk_size)
@@ -255,7 +255,7 @@ aiff_read_ssnd (int fd,
return Bse::Error::NONE;
}
-static Bse::ErrorType
+static Bse::Error
aiff_append_string (int fd,
AiffFile *afile,
guint32 chunk_id,
@@ -277,7 +277,7 @@ aiff_append_string (int fd,
return Bse::Error::NONE;
}
-static Bse::ErrorType
+static Bse::Error
aiff_file_load (int fd,
AiffFile *afile)
{
@@ -296,7 +296,7 @@ aiff_file_load (int fd,
while (seek_pos < 8 + form_size)
{
guint32 chunk_id, chunk_size;
- Bse::ErrorType error;
+ Bse::Error 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? */
@@ -348,7 +348,7 @@ typedef struct
static BseWaveFileInfo*
aiff_load_file_info (void *data,
const char *file_name,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
AiffFile *afile;
FileInfo *fi;
@@ -423,7 +423,7 @@ static BseWaveDsc*
aiff_load_wave_dsc (void *data,
BseWaveFileInfo *file_info,
uint nth_wave,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
FileInfo *fi = (FileInfo*) file_info;
AiffFile *afile = fi->afile;
@@ -496,7 +496,7 @@ static GslDataHandle*
aiff_create_chunk_handle (void *data,
BseWaveDsc *wave_dsc,
uint nth_chunk,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
WaveDsc *dsc = (WaveDsc*) wave_dsc;
FileInfo *fi = (FileInfo*) dsc->wdsc.file_info;
diff --git a/bse/bseloader-bsewave.cc b/bse/bseloader-bsewave.cc
index 6f3f5f5..2896da2 100644
--- a/bse/bseloader-bsewave.cc
+++ b/bse/bseloader-bsewave.cc
@@ -131,7 +131,7 @@ bsewave_skip_rest_statement (GScanner *scanner,
static BseWaveFileInfo*
bsewave_load_file_info (void *data,
const char *_file_name,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
FileInfo *fi = NULL;
gboolean in_wave = FALSE, abort = FALSE;
@@ -567,7 +567,7 @@ static BseWaveDsc*
bsewave_load_wave_dsc (void *data,
BseWaveFileInfo *file_info,
uint nth_wave,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
uint token, i;
@@ -642,7 +642,7 @@ static GslDataHandle*
bsewave_load_singlechunk_wave (BseWaveFileInfo *fi,
const char *wave_name,
float osc_freq,
- Bse::ErrorType *error_p,
+ Bse::Error *error_p,
uint *n_channelsp)
{
BseWaveDsc *wdsc;
@@ -699,7 +699,7 @@ static GslDataHandle*
bsewave_create_chunk_handle (void *data,
BseWaveDsc *wave_dsc,
uint nth_chunk,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
WaveDsc *dsc = (WaveDsc*) wave_dsc;
FileInfo *fi = (FileInfo*) dsc->wdsc.file_info;
diff --git a/bse/bseloader-flac.cc b/bse/bseloader-flac.cc
index 4998a4e..2f4fdc8 100644
--- a/bse/bseloader-flac.cc
+++ b/bse/bseloader-flac.cc
@@ -36,7 +36,7 @@ struct FileInfo
return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
}
FileInfo (const gchar *file_name,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
/* initialize C structures with zeros */
memset (&wfi, 0, sizeof (wfi));
@@ -108,7 +108,7 @@ struct FileInfo
static BseWaveFileInfo*
flac_load_file_info (gpointer data,
const gchar *file_name,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
FileInfo *file_info = new FileInfo (file_name, error_p);
if (*error_p)
@@ -131,7 +131,7 @@ static BseWaveDsc*
flac_load_wave_dsc (gpointer data,
BseWaveFileInfo *wave_file_info,
guint nth_wave,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
FileInfo *file_info = reinterpret_cast<FileInfo*> (wave_file_info);
return &file_info->wdsc;
@@ -147,7 +147,7 @@ static GslDataHandle*
flac_create_chunk_handle (gpointer data,
BseWaveDsc *wave_dsc,
guint nth_chunk,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
assert_return (nth_chunk == 0, NULL);
diff --git a/bse/bseloader-guspatch.cc b/bse/bseloader-guspatch.cc
index 14d947c..3e71496 100644
--- a/bse/bseloader-guspatch.cc
+++ b/bse/bseloader-guspatch.cc
@@ -28,9 +28,9 @@ typedef int sdword;
* executes read_me (which should be a function call to read something from the file),
* and returns from the calling function if that fails
*/
-#define read_or_return_error(read_me) G_STMT_START{ Bse::ErrorType _error = read_me; if (_error) return
_error; }G_STMT_END
+#define read_or_return_error(read_me) G_STMT_START{ Bse::Error _error = read_me; if (_error) return _error;
}G_STMT_END
-static inline Bse::ErrorType
+static inline Bse::Error
fread_block (FILE *file,
int len,
void *data)
@@ -44,7 +44,7 @@ fread_block (FILE *file,
}
return Bse::Error::NONE;
}
-static inline Bse::ErrorType
+static inline Bse::Error
skip (FILE *file,
int len)
{
@@ -57,7 +57,7 @@ skip (FILE *file,
return Bse::Error::NONE;
}
-static inline Bse::ErrorType
+static inline Bse::Error
fread_bytes (FILE *file,
unsigned char *bytes,
int len)
@@ -65,7 +65,7 @@ fread_bytes (FILE *file,
return fread_block (file, len, bytes);
}
-static inline Bse::ErrorType
+static inline Bse::Error
fread_string (FILE *file,
char *str,
int len)
@@ -74,7 +74,7 @@ fread_string (FILE *file,
}
/* readXXX with sizeof(xxx) == 1 */
-static inline Bse::ErrorType
+static inline Bse::Error
fread_byte (FILE *file,
byte &b)
{
@@ -82,7 +82,7 @@ fread_byte (FILE *file,
}
/* readXXX with sizeof(xxx) == 2 */
-static inline Bse::ErrorType
+static inline Bse::Error
fread_word (FILE *file,
word &w)
{
@@ -95,7 +95,7 @@ fread_word (FILE *file,
return Bse::Error::NONE;
}
-static inline Bse::ErrorType
+static inline Bse::Error
fread_short_word (FILE *file,
sword &sw)
{
@@ -108,7 +108,7 @@ fread_short_word (FILE *file,
}
/* readXXX with sizeof(xxx) == 4 */
-static inline Bse::ErrorType
+static inline Bse::Error
fread_dword (FILE *file, dword& dw)
{
byte h, l, hh, hl;
@@ -141,7 +141,7 @@ struct PatHeader
{
}
- Bse::ErrorType
+ Bse::Error
load (FILE *file)
{
read_or_return_error (fread_string (file, id, 12));
@@ -181,7 +181,7 @@ struct PatInstrument
{
}
- Bse::ErrorType
+ Bse::Error
load (FILE *file)
{
read_or_return_error (fread_word (file, number));
@@ -242,7 +242,7 @@ struct PatPatch
{
}
- Bse::ErrorType
+ Bse::Error
load (FILE *file)
{
read_or_return_error (fread_string (file, filename, 7));
@@ -377,7 +377,7 @@ struct FileInfo
FileInfo (const gchar *file_name,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
/* initialize C structures with zeros */
memset (&wfi, 0, sizeof (wfi));
@@ -528,7 +528,7 @@ struct FileInfo
static BseWaveFileInfo*
pat_load_file_info (gpointer data,
const gchar *file_name,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
FileInfo *file_info = new FileInfo (file_name, error_p);
if (*error_p)
@@ -552,7 +552,7 @@ static BseWaveDsc*
pat_load_wave_dsc (gpointer data,
BseWaveFileInfo *wave_file_info,
guint nth_wave,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
FileInfo *file_info = reinterpret_cast<FileInfo*> (wave_file_info);
return &file_info->wdsc;
@@ -568,7 +568,7 @@ static GslDataHandle*
pat_create_chunk_handle (gpointer data,
BseWaveDsc *wave_dsc,
guint nth_chunk,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
assert_return (nth_chunk < wave_dsc->n_chunks, NULL);
FileInfo *file_info = reinterpret_cast<FileInfo*> (wave_dsc->file_info);
diff --git a/bse/bseloader-mad.cc b/bse/bseloader-mad.cc
index dec4e4c..17f55a0 100644
--- a/bse/bseloader-mad.cc
+++ b/bse/bseloader-mad.cc
@@ -21,12 +21,12 @@ typedef struct
static BseWaveFileInfo*
mad_load_file_info (void *data,
const char *file_name,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
FileInfo *fi;
uint n_channels;
float mix_freq;
- Bse::ErrorType error;
+ Bse::Error error;
error = gsl_data_handle_mad_testopen (file_name, &n_channels, &mix_freq);
if (error)
@@ -64,7 +64,7 @@ static BseWaveDsc*
mad_load_wave_dsc (void *data,
BseWaveFileInfo *file_info,
uint nth_wave,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
FileInfo *fi = (FileInfo*) file_info;
BseWaveDsc *wdsc = sfi_new_struct0 (BseWaveDsc, 1);
@@ -95,7 +95,7 @@ static GslDataHandle*
mad_create_chunk_handle (void *data,
BseWaveDsc *wdsc,
uint nth_chunk,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
FileInfo *fi = (FileInfo*) wdsc->file_info;
GslDataHandle *dhandle;
diff --git a/bse/bseloader-oggvorbis.cc b/bse/bseloader-oggvorbis.cc
index 0502dba..579f1a8 100644
--- a/bse/bseloader-oggvorbis.cc
+++ b/bse/bseloader-oggvorbis.cc
@@ -22,7 +22,7 @@ typedef struct
static BseWaveFileInfo*
oggv_load_file_info (void *data,
const char *file_name,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
FileInfo *fi = sfi_new_struct0 (FileInfo, 1);
FILE *file;
@@ -82,7 +82,7 @@ static BseWaveDsc*
oggv_load_wave_dsc (void *data,
BseWaveFileInfo *file_info,
uint nth_wave,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
FileInfo *fi = (FileInfo*) file_info;
BseWaveDsc *wdsc = sfi_new_struct0 (BseWaveDsc, 1);
@@ -115,7 +115,7 @@ static GslDataHandle*
oggv_create_chunk_handle (void *data,
BseWaveDsc *wdsc,
uint nth_chunk,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
FileInfo *fi = (FileInfo*) wdsc->file_info;
GslDataHandle *dhandle;
diff --git a/bse/bseloader-wav.cc b/bse/bseloader-wav.cc
index 20fa4f2..15ee5a6 100644
--- a/bse/bseloader-wav.cc
+++ b/bse/bseloader-wav.cc
@@ -31,7 +31,7 @@ typedef struct
DWord file_length; /* file length */
DWord chunk_type; /* 'WAVE', big endian as int */
} WavHeader;
-static Bse::ErrorType
+static Bse::Error
wav_read_header (int fd,
WavHeader *header)
{
@@ -84,7 +84,7 @@ typedef struct
Word byte_per_sample; /* 1 = 8bit, 2 = 16bit, 3 = 24bit, 4 = 24bit or 32 bit */
Word bit_per_sample; /* 8, 12, 16, 32 */
} FmtHeader;
-static Bse::ErrorType
+static Bse::Error
wav_read_fmt_header (int fd,
FmtHeader *header)
{
@@ -185,7 +185,7 @@ typedef struct
DWord data_chunk; /* 'data', big endian as int */
DWord data_length;
} DataHeader;
-static Bse::ErrorType
+static Bse::Error
wav_read_data_header (int fd,
DataHeader *header,
uint byte_alignment)
@@ -249,7 +249,7 @@ typedef struct
static BseWaveFileInfo*
wav_load_file_info (void *data,
const char *file_name,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
WavHeader wav_header;
FileInfo *fi;
@@ -303,7 +303,7 @@ static BseWaveDsc*
wav_load_wave_dsc (void *data,
BseWaveFileInfo *file_info,
uint nth_wave,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
FileInfo *fi = (FileInfo*) file_info;
DataHeader data_header;
@@ -392,7 +392,7 @@ static GslDataHandle*
wav_create_chunk_handle (void *data,
BseWaveDsc *wave_dsc,
uint nth_chunk,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
WaveDsc *dsc = (WaveDsc*) wave_dsc;
GslDataHandle *dhandle;
diff --git a/bse/bseloader.cc b/bse/bseloader.cc
index 15ad675..1bb3d14 100644
--- a/bse/bseloader.cc
+++ b/bse/bseloader.cc
@@ -131,10 +131,10 @@ bse_loader_match (const char *file_name)
BseWaveFileInfo*
bse_wave_file_info_load (const char *file_name,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
BseWaveFileInfo *finfo = NULL;
- Bse::ErrorType error = Bse::Error::NONE;
+ Bse::Error error = Bse::Error::NONE;
BseLoader *loader;
if (error_p)
@@ -235,9 +235,9 @@ BseWaveDsc*
bse_wave_dsc_load (BseWaveFileInfo *wave_file_info,
uint nth_wave,
gboolean accept_empty,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
- Bse::ErrorType error = Bse::Error::NONE;
+ Bse::Error error = Bse::Error::NONE;
BseWaveDsc *wdsc;
BseLoader *loader;
@@ -298,9 +298,9 @@ bse_wave_dsc_free (BseWaveDsc *wave_dsc)
GslDataHandle*
bse_wave_handle_create (BseWaveDsc *wave_dsc,
uint nth_chunk,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
- Bse::ErrorType error = Bse::Error::NONE;
+ Bse::Error error = Bse::Error::NONE;
GslDataHandle *dhandle;
BseLoader *loader;
@@ -334,7 +334,7 @@ bse_wave_handle_create (BseWaveDsc *wave_dsc,
GslWaveChunk*
bse_wave_chunk_create (BseWaveDsc *wave_dsc,
uint nth_chunk,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
GslDataHandle *dhandle;
GslDataCache *dcache;
diff --git a/bse/bseloader.hh b/bse/bseloader.hh
index b0ce1d2..32fb2ce 100644
--- a/bse/bseloader.hh
+++ b/bse/bseloader.hh
@@ -47,21 +47,21 @@ struct _BseWaveChunkDsc
/* --- functions --- */
BseWaveFileInfo* bse_wave_file_info_load (const gchar *file_name,
- Bse::ErrorType *error);
+ Bse::Error *error);
BseWaveFileInfo* bse_wave_file_info_ref (BseWaveFileInfo *wave_file_info);
void bse_wave_file_info_unref (BseWaveFileInfo *wave_file_info);
const gchar* bse_wave_file_info_loader (BseWaveFileInfo *fi);
BseWaveDsc* bse_wave_dsc_load (BseWaveFileInfo *wave_file_info,
guint nth_wave,
gboolean accept_empty,
- Bse::ErrorType *error);
+ Bse::Error *error);
void bse_wave_dsc_free (BseWaveDsc *wave_dsc);
GslDataHandle* bse_wave_handle_create (BseWaveDsc *wave_dsc,
guint nth_chunk,
- Bse::ErrorType *error);
+ Bse::Error *error);
GslWaveChunk* bse_wave_chunk_create (BseWaveDsc *wave_dsc,
guint nth_chunk,
- Bse::ErrorType *error);
+ Bse::Error *error);
/* --- loader impl --- */
@@ -88,19 +88,19 @@ struct BseLoader {
gpointer data;
BseWaveFileInfo* (*load_file_info) (gpointer data,
const gchar *file_name,
- Bse::ErrorType *error);
+ Bse::Error *error);
void (*free_file_info) (gpointer data,
BseWaveFileInfo *file_info);
BseWaveDsc* (*load_wave_dsc) (gpointer data,
BseWaveFileInfo *file_info,
guint nth_wave,
- Bse::ErrorType *error);
+ Bse::Error *error);
void (*free_wave_dsc) (gpointer data,
BseWaveDsc *wave_dsc);
GslDataHandle* (*create_chunk_handle) (gpointer data,
BseWaveDsc *wave_dsc,
guint nth_chunk,
- Bse::ErrorType *error);
+ Bse::Error *error);
BseLoader *next; /* must be NULL */
};
diff --git a/bse/bsemididevice-null.cc b/bse/bsemididevice-null.cc
index 09358fc..c4d8141 100644
--- a/bse/bsemididevice-null.cc
+++ b/bse/bsemididevice-null.cc
@@ -23,7 +23,7 @@ bse_midi_device_null_list_devices (BseDevice *device)
return ring;
}
-static Bse::ErrorType
+static Bse::Error
bse_midi_device_null_open (BseDevice *device,
gboolean require_readable,
gboolean require_writable,
diff --git a/bse/bsemididevice-oss.cc b/bse/bsemididevice-oss.cc
index ccd39c8..9261918 100644
--- a/bse/bsemididevice-oss.cc
+++ b/bse/bsemididevice-oss.cc
@@ -43,11 +43,11 @@ bse_midi_device_oss_init (BseMidiDeviceOSS *oss)
{
oss->device_name = g_strdup (BSE_MIDI_DEVICE_CONF_OSS);
}
-static Bse::ErrorType
+static Bse::Error
check_device_usage (const char *name,
const char *check_mode)
{
- Bse::ErrorType error = gsl_file_check (name, check_mode);
+ Bse::Error error = gsl_file_check (name, check_mode);
if (!error)
{
errno = 0;
@@ -101,7 +101,7 @@ bse_midi_device_oss_list_devices (BseDevice *device)
return ring;
}
-static Bse::ErrorType
+static Bse::Error
bse_midi_device_oss_open (BseDevice *device,
gboolean require_readable,
gboolean require_writable,
@@ -128,7 +128,7 @@ bse_midi_device_oss_open (BseDevice *device,
oss->fd = -1;
/* try open */
- Bse::ErrorType error;
+ Bse::Error error;
int fd = -1;
handle->readable = (omode & O_RDWR) == O_RDWR || (omode & O_RDONLY) == O_RDONLY;
handle->writable = (omode & O_RDWR) == O_RDWR || (omode & O_WRONLY) == O_WRONLY;
diff --git a/bse/bsemidifile.cc b/bse/bsemidifile.cc
index 94bfe28..19f46b4 100644
--- a/bse/bsemidifile.cc
+++ b/bse/bsemidifile.cc
@@ -45,7 +45,7 @@ dummy_read (int fd,
return total;
}
-static Bse::ErrorType
+static Bse::Error
smf_read_header (int fd,
SMFHeader *header)
{
@@ -103,7 +103,7 @@ smf_read_header (int fd,
return Bse::Error::NONE;
}
-static Bse::ErrorType
+static Bse::Error
smf_read_track (BseMidiFile *smf,
int fd,
BseMidiDecoder *md)
@@ -145,11 +145,11 @@ smf_read_track (BseMidiFile *smf,
BseMidiFile*
bse_midi_file_load (const char *file_name,
- Bse::ErrorType *error_p)
+ Bse::Error *error_p)
{
BseMidiFile *smf;
SMFHeader header;
- Bse::ErrorType dummy_error;
+ Bse::Error dummy_error;
int i, fd = open (file_name, O_RDONLY);
if (!error_p)
error_p = &dummy_error;
@@ -335,7 +335,7 @@ bse_midi_file_setup_song (BseMidiFile *smf,
{
Bse::TrackIfaceP track = song.create_track();
BseTrack *btrack = track->as<BseTrack*>();
- Bse::ErrorType error = track->ensure_output();
+ Bse::Error error = track->ensure_output();
bse_assert_ok (error);
bse_item_set_undoable (btrack, "n-voices", 24, NULL);
Bse::PartIfaceP part_iface = song.create_part();
diff --git a/bse/bsemidifile.hh b/bse/bsemidifile.hh
index dfefdf2..fb32aff 100644
--- a/bse/bsemidifile.hh
+++ b/bse/bsemidifile.hh
@@ -23,7 +23,7 @@ typedef struct {
} BseMidiFile;
BseMidiFile* bse_midi_file_load (const gchar *file_name,
- Bse::ErrorType *error_p);
+ Bse::Error *error_p);
void bse_midi_file_free (BseMidiFile *smf);
void bse_midi_file_add_part_events (BseMidiFile *smf,
guint nth_track,
diff --git a/bse/bsepart.cc b/bse/bsepart.cc
index 9189806..e2530c2 100644
--- a/bse/bsepart.cc
+++ b/bse/bsepart.cc
@@ -2179,7 +2179,7 @@ PartImpl::get_min_note ()
return BSE_MIN_NOTE;
}
-ErrorType
+Error
PartImpl::change_control (int id, int tick, MidiSignalType control_type, double value)
{
BsePart *self = as<BsePart*>();
@@ -2219,7 +2219,7 @@ PartImpl::change_control (int id, int tick, MidiSignalType control_type, double
return success ? Error::NONE : Error::NO_EVENT;
}
-ErrorType
+Error
PartImpl::change_note (int id, int tick, int duration, int note, int fine_tune, double velocity)
{
BsePart *self = as<BsePart*>();
@@ -2244,7 +2244,7 @@ PartImpl::change_note (int id, int tick, int duration, int note, int fine_tune,
return success ? Error::NONE : Error::NO_EVENT;
}
-ErrorType
+Error
PartImpl::delete_event (int id)
{
BsePart *self = as<BsePart*>();
diff --git a/bse/bsepart.hh b/bse/bsepart.hh
index 472fc22..dac51a3 100644
--- a/bse/bsepart.hh
+++ b/bse/bsepart.hh
@@ -286,9 +286,9 @@ public:
virtual SongTiming get_timing (int tick) override;
virtual int get_max_note () override;
virtual int get_min_note () override;
- virtual ErrorType change_control (int id, int tick, MidiSignalType control_type, double
value) override;
- virtual ErrorType change_note (int id, int tick, int duration, int note, int fine_tune,
double velocity) override;
- virtual ErrorType delete_event (int id) override;
+ virtual Error change_control (int id, int tick, MidiSignalType control_type, double value)
override;
+ virtual Error change_note (int id, int tick, int duration, int note, int fine_tune, double
velocity) override;
+ virtual Error delete_event (int id) override;
virtual void deselect_controls (int tick, int duration, MidiSignalType control_type) override;
virtual void deselect_event (int id) override;
virtual void deselect_notes (int tick, int duration, int min_note, int max_note) override;
diff --git a/bse/bsepcmdevice-null.cc b/bse/bsepcmdevice-null.cc
index f5b8aa2..0d4d501 100644
--- a/bse/bsepcmdevice-null.cc
+++ b/bse/bsepcmdevice-null.cc
@@ -36,7 +36,7 @@ bse_pcm_device_null_list_devices (BseDevice *device)
return ring;
}
-static Bse::ErrorType
+static Bse::Error
bse_pcm_device_null_open (BseDevice *device,
gboolean require_readable,
gboolean require_writable,
diff --git a/bse/bsepcmdevice-oss.cc b/bse/bsepcmdevice-oss.cc
index 8e0655f..b70b07e 100644
--- a/bse/bsepcmdevice-oss.cc
+++ b/bse/bsepcmdevice-oss.cc
@@ -49,7 +49,7 @@ typedef struct
/* --- prototypes --- */
-static Bse::ErrorType oss_device_setup (OSSHandle *oss,
+static Bse::Error oss_device_setup (OSSHandle *oss,
guint req_queue_length);
static void oss_device_retrigger (OSSHandle *oss);
static gsize oss_device_read (BsePcmHandle *handle,
@@ -72,11 +72,11 @@ bse_pcm_device_oss_init (BsePcmDeviceOSS *oss)
oss->device_name = g_strdup (BSE_PCM_DEVICE_CONF_OSS);
}
-static Bse::ErrorType
+static Bse::Error
check_device_usage (const gchar *name,
const gchar *check_mode)
{
- Bse::ErrorType error = gsl_file_check (name, check_mode);
+ Bse::Error error = gsl_file_check (name, check_mode);
if (!error && strchr (check_mode, 'w'))
{
errno = 0;
@@ -125,7 +125,7 @@ bse_pcm_device_oss_list_devices (BseDevice *device)
return ring;
}
-static Bse::ErrorType
+static Bse::Error
bse_pcm_device_oss_open (BseDevice *device,
gboolean require_readable,
gboolean require_writable,
@@ -166,7 +166,7 @@ bse_pcm_device_oss_open (BseDevice *device,
oss->hard_sync = hard_sync;
/* try open */
- Bse::ErrorType error;
+ Bse::Error error;
gint fd = -1;
handle->readable = omode == O_RDWR || omode == O_RDONLY; /* O_RDONLY maybe defined to 0 */
handle->writable = omode == O_RDWR || omode == O_WRONLY;
@@ -228,7 +228,7 @@ bse_pcm_device_oss_finalize (GObject *object)
/* chain parent class' handler */
G_OBJECT_CLASS (parent_class)->finalize (object);
}
-static Bse::ErrorType
+static Bse::Error
oss_device_setup (OSSHandle *oss,
guint req_queue_length)
{
diff --git a/bse/bsepcmwriter.cc b/bse/bsepcmwriter.cc
index 70cd6ce..58b57c2 100644
--- a/bse/bsepcmwriter.cc
+++ b/bse/bsepcmwriter.cc
@@ -61,7 +61,7 @@ bse_pcm_writer_finalize (GObject *object)
self->mutex.~Mutex();
}
-Bse::ErrorType
+Bse::Error
bse_pcm_writer_open (BsePcmWriter *self,
const gchar *file,
guint n_channels,
diff --git a/bse/bsepcmwriter.hh b/bse/bsepcmwriter.hh
index 27ef2f3..dfeb0e9 100644
--- a/bse/bsepcmwriter.hh
+++ b/bse/bsepcmwriter.hh
@@ -27,7 +27,7 @@ struct BsePcmWriter : BseItem {
struct BsePcmWriterClass : BseItemClass
{};
-Bse::ErrorType bse_pcm_writer_open (BsePcmWriter *pdev,
+Bse::Error bse_pcm_writer_open (BsePcmWriter *pdev,
const gchar *file,
guint n_channels,
guint sample_freq,
diff --git a/bse/bseprocedure.cc b/bse/bseprocedure.cc
index e8e1ec0..7ea6fc4 100644
--- a/bse/bseprocedure.cc
+++ b/bse/bseprocedure.cc
@@ -195,17 +195,17 @@ bse_procedure_lookup (const gchar *proc_name)
}
static void
-signal_exec_status (Bse::ErrorType error,
+signal_exec_status (Bse::Error error,
BseProcedureClass *proc,
GValue *first_ovalue)
{
#if 0
- /* signal script status, supporting Bse::ErrorType-outparam procedures
+ /* signal script status, supporting Bse::Error-outparam procedures
*/
if (!error && proc->n_out_pspecs == 1 &&
g_type_is_a (G_VALUE_TYPE (first_ovalue), BSE_TYPE_ERROR_TYPE))
{
- Bse::ErrorType verror = g_value_get_enum (first_ovalue);
+ Bse::Error verror = g_value_get_enum (first_ovalue);
bse_server_exec_status (bse_server_get (), BSE_EXEC_STATUS_DONE, BSE_PROCEDURE_NAME (proc), verror ? 0
: 1, verror);
}
@@ -214,7 +214,7 @@ signal_exec_status (Bse::ErrorType error,
#endif
}
-static Bse::ErrorType
+static Bse::Error
bse_procedure_call (BseProcedureClass *proc,
GValue *ivalues,
GValue *ovalues,
@@ -222,7 +222,7 @@ bse_procedure_call (BseProcedureClass *proc,
gpointer marshal_data)
{
guint i, bail_out = FALSE;
- Bse::ErrorType error;
+ Bse::Error error;
for (i = 0; i < proc->n_in_pspecs; i++)
{
@@ -268,7 +268,7 @@ bse_procedure_call (BseProcedureClass *proc,
return error;
}
-Bse::ErrorType
+Bse::Error
bse_procedure_marshal (GType proc_type,
const GValue *ivalues,
GValue *ovalues,
@@ -277,7 +277,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;
+ Bse::Error error;
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++)
@@ -326,7 +326,7 @@ bse_procedure_marshal (GType proc_type,
return error;
}
-static inline Bse::ErrorType
+static inline Bse::Error
bse_procedure_call_collect (BseProcedureClass *proc,
const GValue *first_value,
BseProcedureMarshal marshal,
@@ -338,7 +338,7 @@ bse_procedure_call_collect (BseProcedureClass *proc,
va_list var_args)
{
guint i, bail_out = FALSE;
- Bse::ErrorType error = Bse::Error::NONE;
+ Bse::Error 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 */
@@ -440,14 +440,14 @@ bse_procedure_call_collect (BseProcedureClass *proc,
* @param marshal_data data passed in to @a marshal
* @param skip_ovalues whether return value locations should be collected and filled in
* @param var_args va_list to collect input args from
- * @return Bse::ErrorType value of error if any occoured
+ * @return Bse::Error value of error if any occoured
*
* Collect input arguments for a procedure call from a va_list and
* call the procedure, optionally via @a marshal. If @a skip_ovalues is
* FALSE, the procedure return values will be stored in return
* value locations also collected from @a var_args.
*/
-Bse::ErrorType
+Bse::Error
bse_procedure_marshal_valist (GType proc_type,
const GValue *first_value,
BseProcedureMarshal marshal,
@@ -458,7 +458,7 @@ bse_procedure_marshal_valist (GType proc_type,
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,
+ Bse::Error error = bse_procedure_call_collect (proc, first_value, marshal, marshal_data,
FALSE, skip_ovalues, tmp_ivalues, tmp_ovalues, var_args);
procedure_class_unref (proc);
return error;
@@ -469,7 +469,7 @@ bse_procedure_marshal_valist (GType proc_type,
* @param first_value the first input argument if not to be collected
* @param var_args va_list to collect input args from
* @param ivalues uninitialized GValue array with at least proc->n_in_pspecs members
- * @return Bse::ErrorType value of error if any occoured during collection
+ * @return Bse::Error value of error if any occoured during collection
*
* Collect input arguments for a procedure call from a va_list. The first
* value may be supplied as @a first_value and will then not be collected.
@@ -479,13 +479,13 @@ bse_procedure_marshal_valist (GType proc_type,
* argument is entirely ignored and collection simply starts out with the
* second argument.
*/
-Bse::ErrorType
+Bse::Error
bse_procedure_collect_input_args (BseProcedureClass *proc,
const GValue *first_value,
va_list var_args,
GValue ivalues[BSE_PROCEDURE_MAX_IN_PARAMS])
{
- Bse::ErrorType error;
+ Bse::Error error;
assert_return (BSE_IS_PROCEDURE_CLASS (proc), Bse::Error::INTERNAL);
/* add an extra reference count to the class */
@@ -497,7 +497,7 @@ bse_procedure_collect_input_args (BseProcedureClass *proc,
return error;
}
-Bse::ErrorType
+Bse::Error
bse_procedure_exec (const gchar *proc_name,
...)
{
@@ -513,7 +513,7 @@ bse_procedure_exec (const gchar *proc_name,
}
else
{
- Bse::ErrorType error;
+ Bse::Error error;
va_list var_args;
va_start (var_args, proc_name);
@@ -523,7 +523,7 @@ bse_procedure_exec (const gchar *proc_name,
}
}
-Bse::ErrorType
+Bse::Error
bse_procedure_exec_void (const gchar *proc_name,
...)
{
@@ -539,7 +539,7 @@ bse_procedure_exec_void (const gchar *proc_name,
}
else
{
- Bse::ErrorType error;
+ Bse::Error error;
va_list var_args;
va_start (var_args, proc_name);
@@ -549,7 +549,7 @@ bse_procedure_exec_void (const gchar *proc_name,
}
}
-Bse::ErrorType
+Bse::Error
bse_procedure_execvl (BseProcedureClass *proc,
GSList *in_value_list,
GSList *out_value_list,
@@ -558,7 +558,7 @@ bse_procedure_execvl (BseProcedureClass *proc,
{
GValue tmp_ivalues[BSE_PROCEDURE_MAX_IN_PARAMS];
GValue tmp_ovalues[BSE_PROCEDURE_MAX_OUT_PARAMS];
- Bse::ErrorType error;
+ Bse::Error error;
GSList *slist;
guint i;
diff --git a/bse/bseprocedure.hh b/bse/bseprocedure.hh
index 7416561..a3f0d3c 100644
--- a/bse/bseprocedure.hh
+++ b/bse/bseprocedure.hh
@@ -21,7 +21,7 @@ G_BEGIN_DECLS
typedef void (*BseProcedureInit) (BseProcedureClass *proc,
GParamSpec **in_pspecs,
GParamSpec **out_pspecs);
-typedef Bse::ErrorType (*BseProcedureExec) (BseProcedureClass *procedure,
+typedef Bse::Error (*BseProcedureExec) (BseProcedureClass *procedure,
const GValue *in_values,
GValue *out_values);
struct _BseProcedureClass
@@ -48,8 +48,8 @@ struct _BseProcedureClass
/* --- notifiers --- */
typedef gboolean (*BseProcedureNotify) (gpointer func_data,
const gchar *proc_name,
- Bse::ErrorType exit_status);
-typedef Bse::ErrorType (*BseProcedureMarshal) (gpointer marshal_data,
+ Bse::Error exit_status);
+typedef Bse::Error (*BseProcedureMarshal) (gpointer marshal_data,
BseProcedureClass *proc,
const GValue *ivalues,
GValue *ovalues);
@@ -59,27 +59,27 @@ typedef Bse::ErrorType (*BseProcedureMarshal) (gpointer marshal_data,
/* execute procedure, passing n_in_pspecs param values for in
* values and n_out_pspecs param value locations for out values
*/
-Bse::ErrorType bse_procedure_exec (const gchar *proc_name,
+Bse::Error bse_procedure_exec (const gchar *proc_name,
...);
-Bse::ErrorType bse_procedure_exec_void (const gchar *proc_name,
+Bse::Error bse_procedure_exec_void (const gchar *proc_name,
...);
GType bse_procedure_lookup (const gchar *proc_name);
-Bse::ErrorType bse_procedure_marshal_valist (GType proc_type,
+Bse::Error bse_procedure_marshal_valist (GType proc_type,
const GValue *first_value,
BseProcedureMarshal marshal,
gpointer marshal_data,
gboolean skip_ovalues,
va_list var_args);
-Bse::ErrorType bse_procedure_marshal (GType proc_type,
+Bse::Error bse_procedure_marshal (GType proc_type,
const GValue *ivalues,
GValue *ovalues,
BseProcedureMarshal marshal,
gpointer marshal_data);
-Bse::ErrorType bse_procedure_collect_input_args (BseProcedureClass *proc,
+Bse::Error bse_procedure_collect_input_args (BseProcedureClass *proc,
const GValue *first_value,
va_list var_args,
GValue ivalues[BSE_PROCEDURE_MAX_IN_PARAMS]);
-Bse::ErrorType bse_procedure_execvl (BseProcedureClass *proc,
+Bse::Error bse_procedure_execvl (BseProcedureClass *proc,
GSList *in_value_list,
GSList *out_value_list,
BseProcedureMarshal marshal,
diff --git a/bse/bseprocidl.cc b/bse/bseprocidl.cc
index fde823d..9438956 100644
--- a/bse/bseprocidl.cc
+++ b/bse/bseprocidl.cc
@@ -359,7 +359,7 @@ printChoices (void)
{
const gchar *name = g_type_name (children[i]);
GEnumClass *eclass = (GEnumClass *)g_type_class_ref (children[i]);
- gboolean regular_choice = strcmp (name, "Bse::ErrorType") != 0;
+ gboolean regular_choice = strcmp (name, "Bse::Error") != 0;
GEnumValue *val;
if (needTypes.count (name) && !excludeTypes.count (name))
diff --git a/bse/bseproject.cc b/bse/bseproject.cc
index 6d2951a..528d31e 100644
--- a/bse/bseproject.cc
+++ b/bse/bseproject.cc
@@ -447,7 +447,7 @@ compute_missing_supers (BseProject *self,
return targets;
}
-Bse::ErrorType
+Bse::Error
bse_project_store_bse (BseProject *self,
BseSuper *super,
const gchar *bse_file,
@@ -494,7 +494,7 @@ bse_project_store_bse (BseProject *self,
while (l < 0 && errno == EINTR);
g_free (string);
- Bse::ErrorType error = bse_storage_flush_fd (storage, fd);
+ Bse::Error error = bse_storage_flush_fd (storage, fd);
if (close (fd) < 0 && error == Bse::Error::NONE)
error = bse_error_from_errno (errno, Bse::Error::FILE_WRITE_FAILED);
bse_storage_reset (storage);
@@ -503,7 +503,7 @@ bse_project_store_bse (BseProject *self,
return error;
}
-Bse::ErrorType
+Bse::Error
bse_project_restore (BseProject *self,
BseStorage *storage)
{
@@ -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::Error 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);
@@ -748,10 +748,10 @@ bse_project_keep_activated (BseProject *self,
}
}
-Bse::ErrorType
+Bse::Error
bse_project_activate (BseProject *self)
{
- Bse::ErrorType error;
+ Bse::Error error;
BseTrans *trans;
GSList *slist;
@@ -941,12 +941,12 @@ ProjectImpl::change_name (const String &name)
g_object_set (self, "uname", name.c_str(), NULL); /* no undo */
}
-ErrorType
+Error
ProjectImpl::play ()
{
BseProject *self = as<BseProject*>();
BseProjectState state_before = self->state;
- Bse::ErrorType error = bse_project_activate (self);
+ Bse::Error error = bse_project_activate (self);
if (!error)
{
if (self->state == BSE_PROJECT_PLAYING)
@@ -958,21 +958,21 @@ ProjectImpl::play ()
// some things work only (can only be undone) in deactivated projects
bse_project_push_undo_silent_deactivate (self);
}
- return Bse::ErrorType (error);
+ return Bse::Error (error);
}
-ErrorType
+Error
ProjectImpl::activate ()
{
BseProject *self = as<BseProject*>();
BseProjectState state_before = self->state;
- Bse::ErrorType error = bse_project_activate (self);
+ Bse::Error error = bse_project_activate (self);
if (state_before == BSE_PROJECT_INACTIVE && self->state != BSE_PROJECT_INACTIVE)
{
// some things work only (can only be undone) in deactivated projects
bse_project_push_undo_silent_deactivate (self);
}
- return Bse::ErrorType (error);
+ return Bse::Error (error);
}
bool
@@ -1132,11 +1132,11 @@ ProjectImpl::inject_midi_control (int midi_channel, int midi_control, double con
}
}
-ErrorType
+Error
ProjectImpl::import_midi_file (const String &file_name)
{
BseProject *self = as<BseProject*>();
- Bse::ErrorType error = Bse::Error::NONE;
+ Bse::Error error = Bse::Error::NONE;
BseMidiFile *smf = bse_midi_file_load (file_name.c_str(), &error);
if (!error)
{
@@ -1154,14 +1154,14 @@ ProjectImpl::import_midi_file (const String &file_name)
}
if (smf)
bse_midi_file_free (smf);
- return Bse::ErrorType (error);
+ return Bse::Error (error);
}
-ErrorType
+Error
ProjectImpl::restore_from_file (const String &file_name)
{
BseProject *self = as<BseProject*>();
- Bse::ErrorType error;
+ Bse::Error error;
if (!self->in_undo && !self->in_redo)
{
BseStorage *storage = (BseStorage*) bse_object_new (BSE_TYPE_STORAGE, NULL);
@@ -1174,7 +1174,7 @@ ProjectImpl::restore_from_file (const String &file_name)
}
else
error = Bse::Error::PROC_BUSY;
- return Bse::ErrorType (error);
+ return Bse::Error (error);
}
} // Bse
diff --git a/bse/bseproject.hh b/bse/bseproject.hh
index 05e428a..292937f 100644
--- a/bse/bseproject.hh
+++ b/bse/bseproject.hh
@@ -39,7 +39,7 @@ struct BseProject : BseContainer {
struct BseProjectClass : BseContainerClass
{};
-Bse::ErrorType bse_project_activate (BseProject *project);
+Bse::Error bse_project_activate (BseProject *project);
void bse_project_start_playback (BseProject *project);
void bse_project_stop_playback (BseProject *project);
void bse_project_check_auto_stop (BseProject *project);
@@ -50,9 +50,9 @@ void bse_project_keep_activated (BseProject *project,
guint64 min_tick);
void bse_project_state_changed (BseProject *project,
BseProjectState state);
-Bse::ErrorType bse_project_restore (BseProject *project,
+Bse::Error bse_project_restore (BseProject *project,
BseStorage *storage);
-Bse::ErrorType bse_project_store_bse (BseProject *project,
+Bse::Error bse_project_store_bse (BseProject *project,
BseSuper *super,
const gchar *bse_file,
gboolean self_contained);
@@ -83,8 +83,8 @@ protected:
public:
explicit ProjectImpl (BseObject*);
virtual void change_name (const String &name) override;
- virtual ErrorType play () override;
- virtual ErrorType activate () override;
+ virtual Error play () override;
+ virtual Error activate () override;
virtual bool can_play () override;
virtual bool is_playing () override;
virtual bool is_active () override;
@@ -101,8 +101,8 @@ public:
virtual void clean_dirty () override;
virtual bool is_dirty () override;
virtual void inject_midi_control (int midi_channel, int midi_control, double control_value) override;
- virtual ErrorType import_midi_file (const String &file_name) override;
- virtual ErrorType restore_from_file (const String &file_name) override;
+ virtual Error import_midi_file (const String &file_name) override;
+ virtual Error restore_from_file (const String &file_name) override;
};
} // Bse
diff --git a/bse/bseproject.proc b/bse/bseproject.proc
index 0c9f61d..7d65c34 100644
--- a/bse/bseproject.proc
+++ b/bse/bseproject.proc
@@ -71,7 +71,7 @@ METHOD (BseProject, store-bse, "File/Store") {
BseSuper *super = (BseSuper*) bse_value_get_object (in_values++);
const char *file_name = sfi_value_get_string (in_values++);
gboolean self_contained = sfi_value_get_bool (in_values++);
- Bse::ErrorType error;
+ Bse::Error error;
/* check parameters */
if (!BSE_IS_PROJECT (project) || !file_name)
diff --git a/bse/bsescripthelper.cc b/bse/bsescripthelper.cc
index 1d06ba7..4b020ee 100644
--- a/bse/bsescripthelper.cc
+++ b/bse/bsescripthelper.cc
@@ -13,7 +13,7 @@
/* --- prototypes --- */
static void bse_script_procedure_init (BseScriptProcedureClass *klass,
BseScriptData *sdata);
-static Bse::ErrorType bse_script_procedure_exec (BseProcedureClass *proc,
+static Bse::Error bse_script_procedure_exec (BseProcedureClass *proc,
const GValue *in_values,
GValue *out_values);
static GParamSpec* bse_script_param_spec (gchar *pspec_desc,
@@ -123,7 +123,7 @@ bse_script_proc_register (const gchar *script_file,
return type;
}
-static Bse::ErrorType
+static Bse::Error
bse_script_procedure_exec (BseProcedureClass *proc,
const GValue *in_values,
GValue *out_values)
@@ -133,7 +133,7 @@ bse_script_procedure_exec (BseProcedureClass *proc,
BseServer *server = bse_server_get ();
SfiRing *params = NULL;
BseJanitor *janitor;
- Bse::ErrorType error;
+ Bse::Error error;
gchar *shellpath;
guint i;
@@ -242,14 +242,14 @@ bse_script_path_list_files (void)
return ring;
}
-Bse::ErrorType
+Bse::Error
bse_script_file_register (const gchar *file_name,
BseJanitor **janitor_p)
{
BseServer *server = bse_server_get ();
SfiRing *params = NULL;
const char *proc_name = "registration hook";
- Bse::ErrorType error;
+ Bse::Error error;
params = sfi_ring_append (params, g_strdup ("--bse-enable-register"));
params = sfi_ring_append (params, g_strdup ("--bse-eval"));
diff --git a/bse/bsescripthelper.hh b/bse/bsescripthelper.hh
index 7d72f7f..da9a103 100644
--- a/bse/bsescripthelper.hh
+++ b/bse/bsescripthelper.hh
@@ -35,7 +35,7 @@ GType bse_script_proc_register (const gchar *script_file,
const gchar *license,
SfiRing *params);
SfiRing* bse_script_path_list_files (void);
-Bse::ErrorType bse_script_file_register (const gchar *file_name,
+Bse::Error bse_script_file_register (const gchar *file_name,
BseJanitor **janitor_p);
GValue* bse_script_check_client_msg (SfiGlueDecoder *decoder,
BseJanitor *janitor,
diff --git a/bse/bseserver.cc b/bse/bseserver.cc
index 7badaea..1ff61c4 100644
--- a/bse/bseserver.cc
+++ b/bse/bseserver.cc
@@ -459,14 +459,14 @@ pcm_request_callback (BseDevice *device,
PcmRequest *pr = (PcmRequest*) data;
bse_pcm_device_request (BSE_PCM_DEVICE (device), pr->n_channels, pr->mix_freq, pr->latency,
pr->block_size);
}
-static Bse::ErrorType
+static Bse::Error
server_open_pcm_device (BseServer *server,
guint mix_freq,
guint latency,
guint block_size)
{
assert_return (server->pcm_device == NULL, Bse::Error::INTERNAL);
- Bse::ErrorType error = Bse::Error::UNKNOWN;
+ Bse::Error error = Bse::Error::UNKNOWN;
PcmRequest pr;
pr.n_channels = 2;
pr.mix_freq = mix_freq;
@@ -494,11 +494,11 @@ server_open_pcm_device (BseServer *server,
server->pcm_input_checked = FALSE;
return server->pcm_device ? Bse::Error::NONE : error;
}
-static Bse::ErrorType
+static Bse::Error
server_open_midi_device (BseServer *server)
{
assert_return (server->midi_device == NULL, Bse::Error::INTERNAL);
- Bse::ErrorType error;
+ Bse::Error 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)
{
@@ -521,10 +521,10 @@ server_open_midi_device (BseServer *server)
}
return server->midi_device ? Bse::Error::NONE : error;
}
-Bse::ErrorType
+Bse::Error
bse_server_open_devices (BseServer *self)
{
- Bse::ErrorType error = Bse::Error::NONE;
+ Bse::Error error = Bse::Error::NONE;
assert_return (BSE_IS_SERVER (self), Bse::Error::INTERNAL);
/* check whether devices are already opened */
if (self->dev_use_count)
@@ -545,7 +545,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);
+ Bse::Error new_error = server_open_pcm_device (self, mix_freq, latency, block_size);
error = new_error ? error : Bse::Error::NONE;
}
if (!error)
@@ -558,7 +558,7 @@ bse_server_open_devices (BseServer *self)
self->pcm_imodule = bse_pcm_imodule_insert (pcm_handle, trans);
if (self->wave_file)
{
- Bse::ErrorType error;
+ Bse::Error error;
self->pcm_writer = (BsePcmWriter*) bse_object_new (BSE_TYPE_PCM_WRITER, NULL);
const uint n_channels = 2;
error = bse_pcm_writer_open (self->pcm_writer, self->wave_file,
@@ -763,7 +763,7 @@ bse_server_remove_io_watch (BseServer *server,
g_warning (G_STRLOC ": no such io watch installed %p(%p)", watch_func, data);
}
-Bse::ErrorType
+Bse::Error
bse_server_run_remote (BseServer *server,
const gchar *process_name,
SfiRing *params,
@@ -1339,7 +1339,7 @@ ServerImpl::start_recording (const String &wave_file, double n_seconds)
struct ScriptRegistration
{
gchar *script;
- Bse::ErrorType (*register_func) (const gchar *script, BseJanitor **janitor_p);
+ Bse::Error (*register_func) (const gchar *script, BseJanitor **janitor_p);
ScriptRegistration *next;
};
@@ -1359,7 +1359,7 @@ register_scripts_handler (gpointer data)
BseServer *server = (BseServer*) data;
ScriptRegistration *scr = (ScriptRegistration*) g_object_get_data ((GObject*) server,
"script-registration-queue");
BseJanitor *janitor = NULL;
- Bse::ErrorType error;
+ Bse::Error error;
if (!scr)
{
diff --git a/bse/bseserver.hh b/bse/bseserver.hh
index f9cdb04..08bd464 100644
--- a/bse/bseserver.hh
+++ b/bse/bseserver.hh
@@ -42,7 +42,7 @@ void bse_server_stop_recording (BseServer *server);
void bse_server_start_recording (BseServer *server,
const char *wave_file,
double n_seconds);
-Bse::ErrorType bse_server_open_devices (BseServer *server);
+Bse::Error bse_server_open_devices (BseServer *server);
void bse_server_close_devices (BseServer *server);
BseModule* bse_server_retrieve_pcm_output_module (BseServer *server,
BseSource *source,
@@ -82,7 +82,7 @@ void bse_server_script_error (BseServer *server,
const gchar *script_name,
const gchar *proc_name,
const gchar *reason);
-Bse::ErrorType bse_server_run_remote (BseServer *server,
+Bse::Error bse_server_run_remote (BseServer *server,
const gchar *process_name,
SfiRing *params,
const gchar *script_name,
diff --git a/bse/bsesnet.cc b/bse/bsesnet.cc
index a2a62da..f2f8fe4 100644
--- a/bse/bsesnet.cc
+++ b/bse/bsesnet.cc
@@ -926,12 +926,12 @@ SNetImpl::auto_activate (bool v)
BSE_OBJECT_UNSET_FLAGS (self, BSE_SUPER_FLAG_NEEDS_CONTEXT);
}
-ErrorType
+Error
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;
+ Error error = Error::NONE;
if (!BSE_SNET_USER_SYNTH (self) && !BSE_DBG_EXT)
error = Error::NOT_OWNER;
else if (!g_type_is_a (type, BSE_TYPE_SOURCE) ||
@@ -952,7 +952,7 @@ SNetImpl::create_source (const String &module_type)
{
// an undo lambda is needed for wrapping object argument references
UndoDescriptor<SourceImpl> child_descriptor = undo_descriptor (*child->as<SourceImpl*>());
- auto lambda = [child_descriptor] (SNetImpl &self, BseUndoStack *ustack) -> ErrorType {
+ auto lambda = [child_descriptor] (SNetImpl &self, BseUndoStack *ustack) -> Error {
return self.remove_source (self.undo_resolve (child_descriptor));
};
push_undo (__func__, *this, lambda);
@@ -961,12 +961,12 @@ SNetImpl::create_source (const String &module_type)
return child ? child->as<SourceIfaceP>() : NULL;
}
-ErrorType
+Error
SNetImpl::remove_source (SourceIface &module)
{
BseSNet *self = as<BseSNet*>();
BseSource *child = module.as<BseSource*>();
- Bse::ErrorType error = Bse::Error::NONE;
+ Bse::Error 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;
BseUndoStack *ustack = bse_item_undo_open (self, string_format ("%s: %s", __func__, bse_object_debug_name
(child)).c_str());
@@ -974,7 +974,7 @@ SNetImpl::remove_source (SourceIface &module)
{
// an undo lambda is needed for wrapping object argument references
UndoDescriptor<SourceImpl> child_descriptor = undo_descriptor (*child->as<SourceImpl*>());
- auto lambda = [child_descriptor] (SNetImpl &self, BseUndoStack *ustack) -> ErrorType {
+ auto lambda = [child_descriptor] (SNetImpl &self, BseUndoStack *ustack) -> Error {
return self.remove_source (self.undo_resolve (child_descriptor));
};
push_undo_to_redo (__func__, *this, lambda); // how to get rid of the item once backed up
diff --git a/bse/bsesnet.hh b/bse/bsesnet.hh
index 2020398..c792f41 100644
--- a/bse/bsesnet.hh
+++ b/bse/bsesnet.hh
@@ -114,9 +114,9 @@ public:
virtual bool supports_user_synths () override;
virtual bool auto_activate () const override;
virtual void auto_activate (bool) override;
- virtual ErrorType can_create_source (const String &module_type) override;
+ virtual Error can_create_source (const String &module_type) override;
virtual SourceIfaceP create_source (const String &module_type) override;
- virtual ErrorType remove_source (SourceIface &module) override;
+ virtual Error remove_source (SourceIface &module) override;
};
} // Bse
diff --git a/bse/bsesong.cc b/bse/bsesong.cc
index a625d2d..93a4d6d 100644
--- a/bse/bsesong.cc
+++ b/bse/bsesong.cc
@@ -611,7 +611,7 @@ bse_song_ensure_master (BseSong *self)
g_object_set (child, "master-output", TRUE, NULL); // not-undoable
Bse::BusImpl *bus = child->as<Bse::BusImpl*>();
Bse::ItemImpl::UndoDescriptor<Bse::BusImpl> bus_descriptor = this_->undo_descriptor (*bus);
- auto lambda = [bus_descriptor] (Bse::SongImpl &self, BseUndoStack *ustack) -> Bse::ErrorType {
+ auto lambda = [bus_descriptor] (Bse::SongImpl &self, BseUndoStack *ustack) -> Bse::Error {
Bse::BusImpl &bus = self.undo_resolve (bus_descriptor);
self.remove_bus (bus);
return Bse::Error::NONE;
@@ -668,7 +668,7 @@ bse_song_compat_finish (BseSuper *super,
BseSource *master = bse_song_ensure_master (self);
for (node = master ? tracks : NULL; node; node = sfi_ring_walk (node, tracks))
{
- Bse::ErrorType error = bse_bus_connect (BSE_BUS (master), (BseItem*) node->data);
+ Bse::Error error = bse_bus_connect (BSE_BUS (master), (BseItem*) node->data);
if (error)
sfi_warning ("Failed to connect track %s: %s", bse_object_debug_name (node->data),
bse_error_blurb (error));
clear_undo = TRUE;
@@ -783,7 +783,7 @@ SongImpl::create_bus ()
return NULL;
BusImpl *bus = ((BseItem*) bse_container_new_child (BSE_CONTAINER (self), BSE_TYPE_BUS,
NULL))->as<BusImpl*>();
UndoDescriptor<BusImpl> bus_descriptor = undo_descriptor (*bus);
- auto lambda = [bus_descriptor] (SongImpl &self, BseUndoStack *ustack) -> ErrorType {
+ auto lambda = [bus_descriptor] (SongImpl &self, BseUndoStack *ustack) -> Error {
BusImpl &bus = self.undo_resolve (bus_descriptor);
self.remove_bus (bus);
return Error::NONE;
@@ -808,7 +808,7 @@ SongImpl::remove_bus (BusIface &bus_iface)
bse_container_uncross_undoable (BSE_CONTAINER (self), child);
// implement "undo" of bse_container_remove_backedup, i.e. redo
UndoDescriptor<BusImpl> bus_descriptor = undo_descriptor (*bus);
- auto lambda = [bus_descriptor] (SongImpl &self, BseUndoStack *ustack) -> ErrorType {
+ auto lambda = [bus_descriptor] (SongImpl &self, BseUndoStack *ustack) -> Error {
BusImpl &bus = self.undo_resolve (bus_descriptor);
self.remove_bus (bus);
return Error::NONE;
@@ -827,7 +827,7 @@ SongImpl::create_part ()
BseItem *child = (BseItem*) bse_container_new_child (BSE_CONTAINER (self), BSE_TYPE_PART, NULL);
PartImpl *part = child->as<PartImpl*>();
UndoDescriptor<PartImpl> part_descriptor = undo_descriptor (*part);
- auto lambda = [part_descriptor] (SongImpl &self, BseUndoStack *ustack) -> ErrorType {
+ auto lambda = [part_descriptor] (SongImpl &self, BseUndoStack *ustack) -> Error {
PartImpl &part = self.undo_resolve (part_descriptor);
self.remove_part (part);
return Error::NONE;
@@ -850,7 +850,7 @@ SongImpl::remove_part (PartIface &part_iface)
bse_container_uncross_undoable (BSE_CONTAINER (self), child);
// implement "undo" of bse_container_remove_backedup, i.e. redo
UndoDescriptor<PartImpl> part_descriptor = undo_descriptor (*part);
- auto lambda = [part_descriptor] (SongImpl &self, BseUndoStack *ustack) -> ErrorType {
+ auto lambda = [part_descriptor] (SongImpl &self, BseUndoStack *ustack) -> Error {
PartImpl &part = self.undo_resolve (part_descriptor);
self.remove_part (part);
return Error::NONE;
@@ -870,7 +870,7 @@ SongImpl::create_track ()
BseItem *child = (BseItem*) bse_container_new_child (BSE_CONTAINER (self), BSE_TYPE_TRACK, NULL);
TrackImpl *track = child->as<TrackImpl*>();
UndoDescriptor<TrackImpl> track_descriptor = undo_descriptor (*track);
- auto lambda = [track_descriptor] (SongImpl &self, BseUndoStack *ustack) -> ErrorType {
+ auto lambda = [track_descriptor] (SongImpl &self, BseUndoStack *ustack) -> Error {
TrackImpl &track = self.undo_resolve (track_descriptor);
self.remove_track (track);
return Error::NONE;
@@ -893,7 +893,7 @@ SongImpl::remove_track (TrackIface &track_iface)
bse_container_uncross_undoable (BSE_CONTAINER (self), child);
// implement "undo" of bse_container_remove_backedup, i.e. redo
UndoDescriptor<TrackImpl> track_descriptor = undo_descriptor (*track);
- auto lambda = [track_descriptor] (SongImpl &self, BseUndoStack *ustack) -> ErrorType {
+ auto lambda = [track_descriptor] (SongImpl &self, BseUndoStack *ustack) -> Error {
TrackImpl &track = self.undo_resolve (track_descriptor);
self.remove_track (track);
return Error::NONE;
diff --git a/bse/bsesource.cc b/bse/bsesource.cc
index c775d2e..8979ef0 100644
--- a/bse/bsesource.cc
+++ b/bse/bsesource.cc
@@ -463,7 +463,7 @@ aprop_array_free (gpointer data)
g_bsearch_array_free (aparray, &aprop_bconfig);
}
-Bse::ErrorType
+Bse::Error
bse_source_set_automation_property (BseSource *source,
const gchar *prop_name,
guint midi_channel,
@@ -1215,7 +1215,7 @@ check_jchannel_connection (BseSource *source,
return ochannel == input->idata.ochannel && osource == input->idata.osource ? 0 : -1;
}
-Bse::ErrorType
+Bse::Error
bse_source_set_input (BseSource *source,
guint ichannel,
BseSource *osource,
@@ -1321,7 +1321,7 @@ bse_source_real_remove_input (BseSource *source,
bse_trans_commit (trans);
}
-Bse::ErrorType
+Bse::Error
bse_source_check_input (BseSource *source,
guint ichannel,
BseSource *osource,
@@ -1350,13 +1350,13 @@ bse_source_check_input (BseSource *source,
return Bse::Error::NONE;
}
-Bse::ErrorType
+Bse::Error
bse_source_unset_input (BseSource *source,
guint ichannel,
BseSource *osource,
guint ochannel)
{
- Bse::ErrorType error = bse_source_check_input (source, ichannel, osource, ochannel);
+ Bse::Error error = bse_source_check_input (source, ichannel, osource, ochannel);
if (error != Bse::Error::NONE)
return error;
@@ -1427,7 +1427,7 @@ bse_source_must_set_input_loc (BseSource *source,
guint ochannel,
const gchar *strloc)
{
- Bse::ErrorType error = bse_source_set_input (source, ichannel, osource, ochannel);
+ Bse::Error error = bse_source_set_input (source, ichannel, osource, ochannel);
if (error)
g_warning ("%s: failed to connect module %s channel %u to module %s channel %u: %s", strloc,
bse_object_debug_name (source), ichannel,
@@ -1746,7 +1746,7 @@ bse_source_input_backup_to_undo (BseSource *source,
BseSource *osource,
guint ochannel)
{
- Bse::ErrorType error = bse_source_check_input (source, ichannel, osource, ochannel);
+ Bse::Error error = bse_source_check_input (source, ichannel, osource, ochannel);
BseUndoStack *ustack;
BseStorage *storage;
@@ -1803,7 +1803,7 @@ resolve_osource_input (gpointer data,
error);
else
{
- Bse::ErrorType cerror;
+ Bse::Error cerror;
if (!osource)
cerror = Bse::Error::SOURCE_NO_SUCH_MODULE;
diff --git a/bse/bsesource.hh b/bse/bsesource.hh
index 1c01392..c4be358 100644
--- a/bse/bsesource.hh
+++ b/bse/bsesource.hh
@@ -127,11 +127,11 @@ guint bse_source_find_ichannel (BseSource *source,
const gchar *ichannel_ident);
guint bse_source_find_ochannel (BseSource *source,
const gchar *ochannel_ident);
-Bse::ErrorType bse_source_set_input (BseSource *source,
+Bse::Error bse_source_set_input (BseSource *source,
guint ichannel,
BseSource *osource,
guint ochannel);
-Bse::ErrorType bse_source_unset_input (BseSource *source,
+Bse::Error bse_source_unset_input (BseSource *source,
guint ichannel,
BseSource *osource,
guint ochannel);
@@ -190,7 +190,7 @@ void bse_source_access_modules (BseSource *source,
gpointer data,
BseFreeFunc data_free_func,
BseTrans *trans);
-Bse::ErrorType bse_source_check_input (BseSource *source,
+Bse::Error bse_source_check_input (BseSource *source,
guint ichannel,
BseSource *osource,
guint ochannel);
@@ -223,7 +223,7 @@ typedef struct {
guint midi_channel;
Bse::MidiSignalType signal_type;
} BseAutomationProperty;
-Bse::ErrorType bse_source_set_automation_property (BseSource *source,
+Bse::Error bse_source_set_automation_property (BseSource *source,
const gchar *prop_name,
guint midi_channel,
Bse::MidiSignalType signal_type);
diff --git a/bse/bsesource.proc b/bse/bsesource.proc
index 47ab4cc..b45b154 100644
--- a/bse/bsesource.proc
+++ b/bse/bsesource.proc
@@ -35,7 +35,7 @@ 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 error;
/* check parameters */
if (!BSE_IS_SOURCE (isource) || !BSE_IS_SOURCE (osource) ||
@@ -77,7 +77,7 @@ 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 error;
/* check parameters */
if (!BSE_IS_SOURCE (isource) || !BSE_IS_SOURCE (osource) ||
@@ -121,7 +121,7 @@ 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::Error error = Bse::Error::NONE;
/* check parameters */
if (!BSE_IS_SOURCE (isource) || !BSE_IS_SOURCE (osource))
@@ -168,7 +168,7 @@ 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::Error error = Bse::Error::NONE;
/* check parameters */
if (!BSE_IS_SOURCE (isource) || !BSE_IS_SOURCE (osource) ||
@@ -696,7 +696,7 @@ 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::Error error = Bse::Error::NONE;
/* check parameters */
if (!BSE_IS_SOURCE (source) || !property)
diff --git a/bse/bsestorage.cc b/bse/bsestorage.cc
index dd2aa68..3b0aab0 100644
--- a/bse/bsestorage.cc
+++ b/bse/bsestorage.cc
@@ -294,7 +294,7 @@ bse_storage_input_text (BseStorage *self,
self->restorable_objects = sfi_ppool_new ();
}
-Bse::ErrorType
+Bse::Error
bse_storage_input_file (BseStorage *self,
const gchar *file_name)
{
@@ -850,7 +850,7 @@ restore_source_automation (BseItem *item,
BseMidiControlType control_type = (BseMidiControlType) sfi_choice2enum (scanner->value.v_identifier,
BSE_TYPE_MIDI_CONTROL_TYPE);
/* close statement */
parse_or_return (scanner, ')');
- Bse::ErrorType error = bse_source_set_automation_property (BSE_SOURCE (item), pspec->name, midi_channel,
Bse::MidiSignalType (control_type));
+ Bse::Error error = bse_source_set_automation_property (BSE_SOURCE (item), pspec->name, midi_channel,
Bse::MidiSignalType (control_type));
if (error)
bse_storage_warn (self, "failed to automate property \"%s\": %s", pspec->name, bse_error_blurb (error));
return G_TOKEN_NONE;
@@ -1472,7 +1472,7 @@ wstore_data_handle_reader (gpointer data,
GslLong n;
if (!wh->opened)
{
- Bse::ErrorType error = gsl_data_handle_open (wh->dhandle);
+ Bse::Error error = gsl_data_handle_open (wh->dhandle);
if (error)
{
bse_storage_error (wh->storage, "failed to open data handle: %s", bse_error_blurb (error));
@@ -1775,7 +1775,7 @@ bse_storage_parse_data_handle_rest (BseStorage *self,
return parse_data_handle_trampoline (self, TRUE, data_handle_p, n_channels_p, mix_freq_p, osc_freq_p);
}
-Bse::ErrorType
+Bse::Error
bse_storage_flush_fd (BseStorage *self,
gint fd)
{
diff --git a/bse/bsestorage.hh b/bse/bsestorage.hh
index 5f1a0e7..67d0f8e 100644
--- a/bse/bsestorage.hh
+++ b/bse/bsestorage.hh
@@ -87,7 +87,7 @@ void bse_storage_prepare_write (BseStorage *self,
BseStorageMode mode);
void bse_storage_turn_readable (BseStorage *self,
const gchar *storage_name);
-Bse::ErrorType bse_storage_input_file (BseStorage *self,
+Bse::Error bse_storage_input_file (BseStorage *self,
const gchar *file_name);
void bse_storage_input_text (BseStorage *self,
const gchar *text,
@@ -120,7 +120,7 @@ void bse_storage_put_data_handle (BseStorage *self,
GslDataHandle *dhandle);
void bse_storage_put_xinfos (BseStorage *self,
gchar **xinfos);
-Bse::ErrorType bse_storage_flush_fd (BseStorage *self,
+Bse::Error bse_storage_flush_fd (BseStorage *self,
gint fd);
diff --git a/bse/bsetrack.cc b/bse/bsetrack.cc
index a7b2fa2..579cf51 100644
--- a/bse/bsetrack.cc
+++ b/bse/bsetrack.cc
@@ -1103,7 +1103,7 @@ TrackImpl::remove_tick (int tick)
// undoing part removal needs an undo_descriptor b/c future deletions may invalidate the part handle
const uint utick = entry->tick;
UndoDescriptor<PartImpl> part_descriptor = undo_descriptor (*entry->part->as<PartImpl*>());
- auto lambda = [utick, part_descriptor] (TrackImpl &self, BseUndoStack *ustack) -> ErrorType {
+ auto lambda = [utick, part_descriptor] (TrackImpl &self, BseUndoStack *ustack) -> Error {
PartImpl &part = self.undo_resolve (part_descriptor);
const uint id = self.insert_part (utick, part);
return id ? Error::NONE : Error::INVALID_OVERLAP;
@@ -1157,11 +1157,11 @@ TrackImpl::get_last_tick ()
return bse_track_get_last_tick (self);
}
-ErrorType
+Error
TrackImpl::ensure_output ()
{
BseTrack *self = as<BseTrack*>();
- ErrorType error = Error::NONE;
+ Error error = Error::NONE;
BseItem *bparent = self->parent;
if (BSE_IS_SONG (bparent) && !self->bus_outputs)
{
diff --git a/bse/bsetrack.hh b/bse/bsetrack.hh
index 925f09d..d66d57b 100644
--- a/bse/bsetrack.hh
+++ b/bse/bsetrack.hh
@@ -94,7 +94,7 @@ public:
virtual TrackPartSeq list_parts () override;
virtual PartIfaceP get_part (int tick) override;
virtual int get_last_tick () override;
- virtual ErrorType ensure_output () override;
+ virtual Error ensure_output () override;
virtual SourceIfaceP get_output_source () override;
};
diff --git a/bse/bsewave.cc b/bse/bsewave.cc
index f8d2fac..4f31987 100644
--- a/bse/bsewave.cc
+++ b/bse/bsewave.cc
@@ -125,12 +125,12 @@ bse_wave_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
-static Bse::ErrorType
+static Bse::Error
bse_wave_add_inlined_wave_chunk (BseWave *self,
GslWaveChunk *wchunk)
{
assert_return (BSE_IS_WAVE (self), Bse::Error::INTERNAL);
- Bse::ErrorType error = gsl_data_handle_open (wchunk->dcache->dhandle);
+ Bse::Error error = gsl_data_handle_open (wchunk->dcache->dhandle);
if (!error)
self->open_handles = sfi_ring_append (self->open_handles, wchunk->dcache->dhandle);
return error;
@@ -243,7 +243,7 @@ bse_wave_clear (BseWave *wave)
wave->xinfos = NULL;
}
-Bse::ErrorType
+Bse::Error
bse_wave_load_wave_file (BseWave *self,
const gchar *file_name,
const gchar *wave_name,
@@ -251,7 +251,7 @@ bse_wave_load_wave_file (BseWave *self,
BseFreqArray *skip_array,
gboolean rename_wave)
{
- Bse::ErrorType error = Bse::Error::NONE;
+ Bse::Error error = Bse::Error::NONE;
assert_return (BSE_IS_WAVE (self), Bse::Error::INTERNAL);
assert_return (file_name != NULL, Bse::Error::INTERNAL);
@@ -303,7 +303,7 @@ bse_wave_load_wave_file (BseWave *self,
for (i = 0; i < wdsc->n_chunks; i++)
if (bse_freq_arrays_match_freq (wdsc->chunks[i].osc_freq, list_array, skip_array))
{
- Bse::ErrorType tmp_error;
+ Bse::Error tmp_error;
GslWaveChunk *wchunk = bse_wave_chunk_create (wdsc, i, &tmp_error);
if (wchunk)
bse_wave_add_chunk (self, wchunk);
@@ -369,7 +369,7 @@ bse_wave_store_private (BseObject *object,
for (ring = wave->wave_chunks; ring; ring = sfi_ring_walk (ring, wave->wave_chunks))
{
GslWaveChunk *wchunk = (GslWaveChunk*) ring->data;
- Bse::ErrorType error = gsl_data_handle_open (wchunk->dcache->dhandle);
+ Bse::Error error = gsl_data_handle_open (wchunk->dcache->dhandle);
if (error)
{
bse_storage_warn (storage, "failed to open data handle (%s): %s",
@@ -513,7 +513,7 @@ bse_wave_restore_private (BseObject *object,
{
BseFreqArray *skip_list, *load_list, *array;
gchar *file_name, *wave_name;
- Bse::ErrorType error;
+ Bse::Error error;
g_scanner_get_next_token (scanner); /* eat quark identifier */
parse_or_return (scanner, G_TOKEN_STRING);
@@ -655,7 +655,7 @@ bse_wave_restore_private (BseObject *object,
loop_type, loop_start, loop_end, loop_count);
gsl_data_cache_unref (dcache);
/* we need to keep inlined data handles open to protect against storage (.bse file) overwriting */
- Bse::ErrorType error = bse_wave_add_inlined_wave_chunk (wave, wchunk);
+ Bse::Error error = bse_wave_add_inlined_wave_chunk (wave, wchunk);
if (!error)
bse_wave_add_chunk (wave, wchunk);
else
@@ -700,7 +700,7 @@ bse_wave_get_index_for_modules (BseWave *wave)
SfiRing *ring;
for (ring = wave->wave_chunks; ring; ring = sfi_ring_walk (ring, wave->wave_chunks))
{
- Bse::ErrorType error = gsl_wave_chunk_open ((GslWaveChunk*) ring->data);
+ Bse::Error error = gsl_wave_chunk_open ((GslWaveChunk*) ring->data);
if (!error)
{
index->entries[index->n_entries].wchunk = (GslWaveChunk*) ring->data;
diff --git a/bse/bsewave.hh b/bse/bsewave.hh
index 34c9596..956912a 100644
--- a/bse/bsewave.hh
+++ b/bse/bsewave.hh
@@ -43,7 +43,7 @@ struct BseWaveClass : BseSourceClass
{};
void bse_wave_clear (BseWave *wave);
-Bse::ErrorType bse_wave_load_wave_file (BseWave *wave,
+Bse::Error bse_wave_load_wave_file (BseWave *wave,
const gchar *file_name,
const gchar *wave_name,
BseFreqArray *list_array,
diff --git a/bse/bsewaverepo.proc b/bse/bsewaverepo.proc
index 6ea6d7c..0f1ed0a 100644
--- a/bse/bsewaverepo.proc
+++ b/bse/bsewaverepo.proc
@@ -14,7 +14,7 @@
/* --- auxlillary functions --- */
-static Bse::ErrorType
+static Bse::Error
load_file (BseWaveRepo *wrepo,
const gchar *file_name,
BseWave **wave_p)
@@ -22,7 +22,7 @@ load_file (BseWaveRepo *wrepo,
gchar *fname = g_path_get_basename (file_name);
BseWave *wave = (BseWave*) bse_object_new (BSE_TYPE_WAVE, "uname", fname, NULL);
g_free (fname);
- Bse::ErrorType error = bse_wave_load_wave_file (wave, file_name, NULL, NULL, NULL, TRUE);
+ Bse::Error error = bse_wave_load_wave_file (wave, file_name, NULL, NULL, NULL, TRUE);
if (wave->n_wchunks)
{
bse_container_add_item (BSE_CONTAINER (wrepo), BSE_ITEM (wave));
@@ -63,7 +63,7 @@ BODY (BseProcedureClass *proc,
BseWaveRepo *self = (BseWaveRepo*) bse_value_get_object (in_values++);
const char *file_name = sfi_value_get_string (in_values++);
BseUndoStack *ustack;
- Bse::ErrorType error;
+ Bse::Error error;
BseWave *wave;
/* check parameters */
diff --git a/bse/gslcommon.cc b/bse/gslcommon.cc
index 23ebc99..cff159a 100644
--- a/bse/gslcommon.cc
+++ b/bse/gslcommon.cc
@@ -194,7 +194,7 @@ gsl_byte_order_from_string (const gchar *string)
return 0;
}
-Bse::ErrorType
+Bse::Error
gsl_file_check (const gchar *file_name,
const gchar *mode)
{
@@ -203,9 +203,9 @@ gsl_file_check (const gchar *file_name,
return gsl_error_from_errno (errno, Bse::Error::FILE_OPEN_FAILED);
}
-Bse::ErrorType
+Bse::Error
gsl_error_from_errno (gint sys_errno,
- Bse::ErrorType fallback)
+ Bse::Error fallback)
{
switch (sys_errno)
{
@@ -243,10 +243,10 @@ gsl_error_from_errno (gint sys_errno,
}
static guint
-score_error (Bse::ErrorType error)
+score_error (Bse::Error error)
{
/* errors are sorted by increasing descriptiveness */
- static const Bse::ErrorType error_score[] = {
+ static const Bse::Error 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,
@@ -261,12 +261,12 @@ score_error (Bse::ErrorType error)
return i;
}
-Bse::ErrorType
+Bse::Error
gsl_error_select (guint n_errors,
- Bse::ErrorType first_error,
+ Bse::Error first_error,
...)
{
- Bse::ErrorType *errors = g_new (Bse::ErrorType, MAX (1, n_errors));
+ Bse::Error *errors = g_new (Bse::Error, MAX (1, n_errors));
va_list args;
guint i, score;
/* function used to select a descriptive error in
@@ -276,12 +276,12 @@ gsl_error_select (guint n_errors,
for (i = 0; i < n_errors; i++)
{
if (i)
- first_error = (Bse::ErrorType) va_arg (args, int); // Bse::ErrorType
+ first_error = (Bse::Error) va_arg (args, int); // Bse::Error
errors[i] = first_error;
}
va_end (args);
/* grab first error, unless followed by an error with higher score */
- Bse::ErrorType e = errors[0];
+ Bse::Error e = errors[0];
score = score_error (e);
for (i = 1; i < n_errors; i++)
{
diff --git a/bse/gslcommon.hh b/bse/gslcommon.hh
index 46569ae..913511b 100644
--- a/bse/gslcommon.hh
+++ b/bse/gslcommon.hh
@@ -10,12 +10,12 @@ void gsl_init (void);
/* --- misc --- */
const gchar* gsl_byte_order_to_string (guint byte_order);
guint gsl_byte_order_from_string (const gchar *string);
-Bse::ErrorType gsl_error_from_errno (gint sys_errno,
- Bse::ErrorType fallback);
-Bse::ErrorType gsl_error_select (guint n_errors,
- Bse::ErrorType first_error,
+Bse::Error gsl_error_from_errno (gint sys_errno,
+ Bse::Error fallback);
+Bse::Error gsl_error_select (guint n_errors,
+ Bse::Error first_error,
...);
-Bse::ErrorType gsl_file_check (const gchar *file_name,
+Bse::Error gsl_file_check (const gchar *file_name,
const gchar *mode);
diff --git a/bse/gsldatacache.cc b/bse/gsldatacache.cc
index d632041..8680e59 100644
--- a/bse/gsldatacache.cc
+++ b/bse/gsldatacache.cc
@@ -94,7 +94,7 @@ gsl_data_cache_open (GslDataCache *dcache)
dcache->mutex.lock();
if (!dcache->open_count)
{
- Bse::ErrorType error;
+ Bse::Error error;
error = gsl_data_handle_open (dcache->dhandle);
if (error)
{
diff --git a/bse/gsldatahandle-mad.cc b/bse/gsldatahandle-mad.cc
index 143593b..c42881b 100644
--- a/bse/gsldatahandle-mad.cc
+++ b/bse/gsldatahandle-mad.cc
@@ -40,7 +40,7 @@ typedef struct
guint eof : 1;
GslHFile *hfile;
guint file_pos;
- Bse::ErrorType error;
+ Bse::Error error;
/* seek table */
GTime seek_mtime;
@@ -67,9 +67,9 @@ static GslLong dh_mad_coarse_seek (GslDataHandle *dhandle,
/* --- functions --- */
-static Bse::ErrorType
+static Bse::Error
error_from_mad_stream (struct mad_stream *mstream,
- Bse::ErrorType fallback)
+ Bse::Error fallback)
{
switch (mstream->error)
{
@@ -321,7 +321,7 @@ create_seek_table (MadHandle *handle,
return seeks;
}
-static Bse::ErrorType
+static Bse::Error
dh_mad_open (GslDataHandle *dhandle,
GslDataHandleSetup *setup)
{
@@ -329,7 +329,7 @@ dh_mad_open (GslDataHandle *dhandle,
GslHFile *hfile;
GslLong n;
gboolean seek_invalidated = FALSE;
- Bse::ErrorType error;
+ Bse::Error error;
hfile = gsl_hfile_open (handle->dhandle.name);
if (!hfile)
@@ -648,7 +648,7 @@ static GslDataHandle*
dh_mad_new (const gchar *file_name,
gfloat osc_freq,
gboolean skip_seek_keep_open,
- Bse::ErrorType *errorp)
+ Bse::Error *errorp)
{
MadHandle *handle;
gboolean success;
@@ -676,7 +676,7 @@ dh_mad_new (const gchar *file_name,
/* we can only check matters upon opening
*/
handle->skip_seek_table = skip_seek_keep_open != FALSE;
- Bse::ErrorType error = gsl_data_handle_open (&handle->dhandle);
+ Bse::Error error = gsl_data_handle_open (&handle->dhandle);
if (!error)
{
if (!skip_seek_keep_open)
@@ -701,16 +701,16 @@ dh_mad_new (const gchar *file_name,
GslDataHandle*
gsl_data_handle_new_mad_err (const gchar *file_name,
gfloat osc_freq,
- Bse::ErrorType *errorp)
+ Bse::Error *errorp)
{
assert_return (file_name != NULL, NULL);
assert_return (osc_freq > 0, NULL);
- Bse::ErrorType error = Bse::Error::NONE;
+ Bse::Error error = Bse::Error::NONE;
return dh_mad_new (file_name, osc_freq, FALSE, errorp ? errorp : &error);
}
-Bse::ErrorType
+Bse::Error
gsl_data_handle_mad_testopen (const gchar *file_name,
guint *n_channels,
gfloat *mix_freq)
@@ -720,7 +720,7 @@ gsl_data_handle_mad_testopen (const gchar *file_name,
assert_return (file_name != NULL, Bse::Error::INTERNAL);
- Bse::ErrorType error = Bse::Error::NONE;
+ Bse::Error error = Bse::Error::NONE;
dhandle = dh_mad_new (file_name, 439, TRUE, &error);
if (!dhandle)
return error ? error : Bse::Error::FILE_OPEN_FAILED;
@@ -747,14 +747,14 @@ gsl_data_handle_mad_version (void)
GslDataHandle*
gsl_data_handle_new_mad_err (const gchar *file_name,
gfloat osc_freq,
- Bse::ErrorType *errorp)
+ Bse::Error *errorp)
{
if (errorp)
*errorp = Bse::Error::FORMAT_UNKNOWN;
return NULL;
}
-Bse::ErrorType
+Bse::Error
gsl_data_handle_mad_testopen (const gchar *file_name,
guint *n_channels,
gfloat *mix_freq)
diff --git a/bse/gsldatahandle-mad.hh b/bse/gsldatahandle-mad.hh
index 27cae57..759b3e0 100644
--- a/bse/gsldatahandle-mad.hh
+++ b/bse/gsldatahandle-mad.hh
@@ -13,8 +13,8 @@ GslDataHandle* gsl_data_handle_new_mad (const gchar *file_name,
gfloat osc_freq);
GslDataHandle* gsl_data_handle_new_mad_err (const gchar *file_name,
gfloat osc_freq,
- Bse::ErrorType *error);
-Bse::ErrorType gsl_data_handle_mad_testopen (const gchar *file_name,
+ Bse::Error *error);
+Bse::Error gsl_data_handle_mad_testopen (const gchar *file_name,
guint *n_channels,
gfloat *mix_freq);
const gchar* gsl_data_handle_mad_version (void);
diff --git a/bse/gsldatahandle-vorbis.cc b/bse/gsldatahandle-vorbis.cc
index afda259..0a98071 100644
--- a/bse/gsldatahandle-vorbis.cc
+++ b/bse/gsldatahandle-vorbis.cc
@@ -42,9 +42,9 @@ typedef struct {
/* --- functions --- */
-static Bse::ErrorType
+static Bse::Error
ov_errno_to_error (gint ov_errno,
- Bse::ErrorType fallback)
+ Bse::Error fallback)
{
switch (ov_errno)
{
@@ -153,7 +153,7 @@ dh_vorbis_page_seek (VorbisHandle *vhandle, int64 pos)
return err;
}
-static Bse::ErrorType
+static Bse::Error
dh_vorbis_open (GslDataHandle *dhandle,
GslDataHandleSetup *setup)
{
@@ -389,7 +389,7 @@ gsl_data_handle_new_ogg_vorbis_any (const gchar *file_name,
gboolean success = gsl_data_handle_common_init (&vhandle->dhandle, file_name);
if (success)
{
- Bse::ErrorType error;
+ Bse::Error error;
vhandle->dhandle.vtable = &dh_vorbis_vtable;
vhandle->n_bitstreams = 0;
diff --git a/bse/gsldatahandle.cc b/bse/gsldatahandle.cc
index 3253e0e..03fefa4 100644
--- a/bse/gsldatahandle.cc
+++ b/bse/gsldatahandle.cc
@@ -70,7 +70,7 @@ gsl_data_handle_unref (GslDataHandle *dhandle)
dhandle->vtable->destroy (dhandle);
}
}
-Bse::ErrorType
+Bse::Error
gsl_data_handle_open (GslDataHandle *dhandle)
{
assert_return (dhandle != NULL, Bse::Error::INTERNAL);
@@ -79,7 +79,7 @@ gsl_data_handle_open (GslDataHandle *dhandle)
if (dhandle->open_count == 0)
{
GslDataHandleSetup setup = { 0, };
- Bse::ErrorType error = dhandle->vtable->open (dhandle, &setup);
+ Bse::Error error = dhandle->vtable->open (dhandle, &setup);
if (!error && (setup.n_values < 0 ||
setup.n_channels < 1))
{
@@ -284,7 +284,7 @@ typedef struct {
guint bit_depth : 8;
} MemHandle;
-static Bse::ErrorType
+static Bse::Error
mem_handle_open (GslDataHandle *dhandle,
GslDataHandleSetup *setup)
{
@@ -416,13 +416,13 @@ ring_remove_dups (SfiRing *ring,
return ring;
}
-static Bse::ErrorType
+static Bse::Error
xinfo_handle_open (GslDataHandle *dhandle,
GslDataHandleSetup *setup)
{
XInfoHandle *chandle = (XInfoHandle*) dhandle;
GslDataHandle *src_handle = chandle->src_handle;
- Bse::ErrorType error = gsl_data_handle_open (src_handle);
+ Bse::Error error = gsl_data_handle_open (src_handle);
if (error != Bse::Error::NONE)
return error;
*setup = src_handle->setup;
@@ -669,12 +669,12 @@ gsl_data_handle_new_clear_xinfos (GslDataHandle *src_handle)
/* --- chain handle --- */
-static Bse::ErrorType
+static Bse::Error
chain_handle_open (GslDataHandle *dhandle,
GslDataHandleSetup *setup)
{
ChainHandle *chandle = (ChainHandle*) dhandle;
- Bse::ErrorType error;
+ Bse::Error error;
error = gsl_data_handle_open (chandle->src_handle);
if (error != Bse::Error::NONE)
@@ -858,12 +858,12 @@ typedef struct {
int64 tail_cut;
} CutHandle;
-static Bse::ErrorType
+static Bse::Error
cut_handle_open (GslDataHandle *dhandle,
GslDataHandleSetup *setup)
{
CutHandle *chandle = (CutHandle*) dhandle;
- Bse::ErrorType error;
+ Bse::Error error;
error = gsl_data_handle_open (chandle->src_handle);
if (error != Bse::Error::NONE)
@@ -1009,12 +1009,12 @@ typedef struct {
void (*free_values) (gpointer);
} InsertHandle;
-static Bse::ErrorType
+static Bse::Error
insert_handle_open (GslDataHandle *dhandle,
GslDataHandleSetup *setup)
{
InsertHandle *ihandle = (InsertHandle*) dhandle;
- Bse::ErrorType error;
+ Bse::Error error;
error = gsl_data_handle_open (ihandle->src_handle);
if (error != Bse::Error::NONE)
@@ -1176,12 +1176,12 @@ typedef struct {
int64 loop_width;
} LoopHandle;
-static Bse::ErrorType
+static Bse::Error
loop_handle_open (GslDataHandle *dhandle,
GslDataHandleSetup *setup)
{
LoopHandle *lhandle = (LoopHandle*) dhandle;
- Bse::ErrorType error;
+ Bse::Error error;
error = gsl_data_handle_open (lhandle->src_handle);
if (error != Bse::Error::NONE)
@@ -1298,12 +1298,12 @@ dcache_handle_destroy (GslDataHandle *dhandle)
sfi_delete_struct (DCacheHandle, chandle);
}
-static Bse::ErrorType
+static Bse::Error
dcache_handle_open (GslDataHandle *dhandle,
GslDataHandleSetup *setup)
{
DCacheHandle *chandle = (DCacheHandle*) dhandle;
- Bse::ErrorType error;
+ Bse::Error error;
error = gsl_data_handle_open (chandle->dcache->dhandle);
if (error != Bse::Error::NONE)
@@ -1468,7 +1468,7 @@ wave_handle_destroy (GslDataHandle *dhandle)
sfi_delete_struct (WaveHandle, whandle);
}
-static Bse::ErrorType
+static Bse::Error
wave_handle_open (GslDataHandle *dhandle,
GslDataHandleSetup *setup)
{
diff --git a/bse/gsldatahandle.hh b/bse/gsldatahandle.hh
index da50e18..01f5266 100644
--- a/bse/gsldatahandle.hh
+++ b/bse/gsldatahandle.hh
@@ -37,7 +37,7 @@ typedef void (*GslDataHandleRecurse) (GslDataHandle *data_handle,
gpointer data);
struct _GslDataHandleFuncs
{
- Bse::ErrorType (*open) (GslDataHandle *data_handle,
+ Bse::Error (*open) (GslDataHandle *data_handle,
GslDataHandleSetup *setup);
int64 (*read) (GslDataHandle *data_handle,
int64 voffset, /* in values */
@@ -54,7 +54,7 @@ struct _GslDataHandleFuncs
/* --- standard functions --- */
GslDataHandle* gsl_data_handle_ref (GslDataHandle *dhandle);
void gsl_data_handle_unref (GslDataHandle *dhandle);
-Bse::ErrorType gsl_data_handle_open (GslDataHandle *dhandle);
+Bse::Error gsl_data_handle_open (GslDataHandle *dhandle);
void gsl_data_handle_close (GslDataHandle *dhandle);
int64 gsl_data_handle_length (GslDataHandle *data_handle);
#define gsl_data_handle_n_values( dh) \
diff --git a/bse/gsldatautils.cc b/bse/gsldatautils.cc
index c0ec779..fdb6ecf 100644
--- a/bse/gsldatautils.cc
+++ b/bse/gsldatautils.cc
@@ -337,7 +337,7 @@ wstore_context_reader (gpointer data,
if (!wc->opened)
{
- Bse::ErrorType error = gsl_data_handle_open (wc->dhandle);
+ Bse::Error error = gsl_data_handle_open (wc->dhandle);
if (error)
return -ENOENT; /* approximation of OPEN_FAILED */
wc->opened = TRUE;
@@ -751,7 +751,7 @@ gsl_data_make_fade_ramp (GslDataHandle *handle,
* according to a given threshold and optionally produce
* a fade ramp.
*/
-Bse::ErrorType
+Bse::Error
gsl_data_clip_sample (GslDataHandle *dhandle,
GslDataClipConfig *cconfig,
GslDataClipResult *result)
diff --git a/bse/gsldatautils.hh b/bse/gsldatautils.hh
index 5884558..830ecda 100644
--- a/bse/gsldatautils.hh
+++ b/bse/gsldatautils.hh
@@ -146,10 +146,10 @@ typedef struct
guint tail_detected : 1; /* found tail_samples silence */
guint clipped_head : 1;
guint clipped_tail : 1;
- Bse::ErrorType error;
+ Bse::Error error;
} GslDataClipResult;
-Bse::ErrorType gsl_data_clip_sample (GslDataHandle *dhandle,
+Bse::Error gsl_data_clip_sample (GslDataHandle *dhandle,
GslDataClipConfig *cconfig,
GslDataClipResult *result);
diff --git a/bse/gslvorbis-enc.cc b/bse/gslvorbis-enc.cc
index e33cf7b..2bad5f2 100644
--- a/bse/gslvorbis-enc.cc
+++ b/bse/gslvorbis-enc.cc
@@ -241,7 +241,7 @@ gsl_vorbis_encoder_reset (GslVorbisEncoder *self)
self->have_vblock = FALSE;
}
-Bse::ErrorType
+Bse::Error
gsl_vorbis_encoder_setup_stream (GslVorbisEncoder *self,
guint serial)
{
diff --git a/bse/gslvorbis-enc.hh b/bse/gslvorbis-enc.hh
index ecfd6bb..63f37d9 100644
--- a/bse/gslvorbis-enc.hh
+++ b/bse/gslvorbis-enc.hh
@@ -37,7 +37,7 @@ void gsl_vorbis_encoder_set_n_channels (GslVorbisEncoder
void gsl_vorbis_encoder_set_sample_freq (GslVorbisEncoder *self,
guint sample_freq);
/* start encoding */
-Bse::ErrorType gsl_vorbis_encoder_setup_stream (GslVorbisEncoder *self,
+Bse::Error gsl_vorbis_encoder_setup_stream (GslVorbisEncoder *self,
guint serial);
/* write unencoded data (must be channel aligned) */
void gsl_vorbis_encoder_write_pcm (GslVorbisEncoder *self,
diff --git a/bse/gslwavechunk.cc b/bse/gslwavechunk.cc
index dff5d7e..eab0580 100644
--- a/bse/gslwavechunk.cc
+++ b/bse/gslwavechunk.cc
@@ -661,7 +661,7 @@ gsl_wave_chunk_unref (GslWaveChunk *wchunk)
}
}
-Bse::ErrorType
+Bse::Error
gsl_wave_chunk_open (GslWaveChunk *wchunk)
{
assert_return (wchunk != NULL, Bse::Error::INTERNAL);
@@ -669,7 +669,7 @@ gsl_wave_chunk_open (GslWaveChunk *wchunk)
if (wchunk->open_count == 0)
{
- Bse::ErrorType error;
+ Bse::Error error;
error = gsl_data_handle_open (wchunk->dcache->dhandle);
if (error != Bse::Error::NONE)
diff --git a/bse/gslwavechunk.hh b/bse/gslwavechunk.hh
index 1ccef68..d3b9ba7 100644
--- a/bse/gslwavechunk.hh
+++ b/bse/gslwavechunk.hh
@@ -94,7 +94,7 @@ GslWaveChunk* gsl_wave_chunk_new (GslDataCache *dcache,
guint loop_count);
GslWaveChunk* gsl_wave_chunk_ref (GslWaveChunk *wchunk);
void gsl_wave_chunk_unref (GslWaveChunk *wchunk);
-Bse::ErrorType gsl_wave_chunk_open (GslWaveChunk *wchunk);
+Bse::Error gsl_wave_chunk_open (GslWaveChunk *wchunk);
void gsl_wave_chunk_close (GslWaveChunk *wchunk);
void gsl_wave_chunk_debug_block (GslWaveChunk *wchunk,
GslLong offset,
diff --git a/bse/tests/firhandle.cc b/bse/tests/firhandle.cc
index a4e63c3..289f878 100644
--- a/bse/tests/firhandle.cc
+++ b/bse/tests/firhandle.cc
@@ -163,7 +163,7 @@ test_with_sine_sweep (FirHandleType type)
fir_handle_cos = bse_data_handle_new_fir_lowpass (ihandle_cos, 6000.0, order);
}
- Bse::ErrorType error;
+ Bse::Error error;
error = gsl_data_handle_open (fir_handle_sin);
TASSERT (error == 0);
error = gsl_data_handle_open (fir_handle_cos);
@@ -309,7 +309,7 @@ test_multi_channel (FirHandleType type)
else
fir_handle = bse_data_handle_new_fir_lowpass (ihandle, cutoff_freq, order);
- Bse::ErrorType error;
+ Bse::Error error;
error = gsl_data_handle_open (fir_handle);
TASSERT (error == 0);
@@ -355,7 +355,7 @@ test_seek (FirHandleType type)
else
fir_handle = bse_data_handle_new_fir_lowpass (ihandle, cutoff_freq, order);
- Bse::ErrorType error;
+ Bse::Error error;
error = gsl_data_handle_open (fir_handle);
TASSERT (error == 0);
diff --git a/bse/tests/loophandle.cc b/bse/tests/loophandle.cc
index 529c875..fd28eb2 100644
--- a/bse/tests/loophandle.cc
+++ b/bse/tests/loophandle.cc
@@ -15,12 +15,12 @@ typedef struct {
GslLong loop_width;
} LoopHandleReference;
-static Bse::ErrorType
+static Bse::Error
loop_handle_reference_open (GslDataHandle *dhandle,
GslDataHandleSetup *setup)
{
LoopHandleReference *lhandle = (LoopHandleReference*) dhandle;
- Bse::ErrorType error;
+ Bse::Error error;
error = gsl_data_handle_open (lhandle->src_handle);
if (error != Bse::Error::NONE)
@@ -155,7 +155,7 @@ check_loop (GslDataHandle *src_handle,
GslDataPeekBuffer peek_buffer_reference = { +1 /* incremental direction */, 0, };
sfi_info ("check_loop<%lld,%lld>", loop_start, loop_end);
- Bse::ErrorType error;
+ Bse::Error error;
error = gsl_data_handle_open (loop_handle);
if (error)
{
diff --git a/bse/tests/resamplehandle.cc b/bse/tests/resamplehandle.cc
index 829192f..138e88d 100644
--- a/bse/tests/resamplehandle.cc
+++ b/bse/tests/resamplehandle.cc
@@ -63,7 +63,7 @@ check (const char *up_down,
}
gsl_data_handle_unref (ihandle);
- Bse::ErrorType error = gsl_data_handle_open (rhandle);
+ Bse::Error error = gsl_data_handle_open (rhandle);
TASSERT (error == 0);
double worst_diff, worst_diff_db;
@@ -367,7 +367,7 @@ test_state_length (const char *run_type)
const guint precision_bits = 16;
GslDataHandle *ihandle = gsl_data_handle_new_mem (1, 32, 44100, 440, input.size(), &input[0], NULL);
GslDataHandle *rhandle = bse_data_handle_new_upsample2 (ihandle, precision_bits);
- Bse::ErrorType open_error = gsl_data_handle_open (rhandle);
+ Bse::Error open_error = gsl_data_handle_open (rhandle);
TASSERT (open_error == 0);
TASSERT (gsl_data_handle_get_state_length (ihandle) == 0);
@@ -416,7 +416,7 @@ test_state_length (const char *run_type)
const guint precision_bits = 16;
GslDataHandle *ihandle = gsl_data_handle_new_mem (1, 32, 44100, 440, input.size(), &input[0], NULL);
GslDataHandle *rhandle = bse_data_handle_new_downsample2 (ihandle, precision_bits);
- Bse::ErrorType open_error = gsl_data_handle_open (rhandle);
+ Bse::Error open_error = gsl_data_handle_open (rhandle);
TASSERT (open_error == 0);
TASSERT (gsl_data_handle_get_state_length (ihandle) == 0);
diff --git a/drivers/bse-portaudio/bsepcmdevice-portaudio.cc b/drivers/bse-portaudio/bsepcmdevice-portaudio.cc
index a71481b..838a33f 100644
--- a/drivers/bse-portaudio/bsepcmdevice-portaudio.cc
+++ b/drivers/bse-portaudio/bsepcmdevice-portaudio.cc
@@ -46,9 +46,9 @@ bse_pcm_device_port_audio_init (BsePcmDevicePortAudio *self)
Pa_Initialize();
}
-static Bse::ErrorType
+static Bse::Error
bse_error_from_pa_error (PaError pa_error,
- Bse::ErrorType fallback)
+ Bse::Error fallback)
{
switch (pa_error)
{
@@ -159,7 +159,7 @@ bse_pcm_device_port_audio_list_devices (BseDevice *device)
return ring;
}
-static Bse::ErrorType
+static Bse::Error
bse_pcm_device_port_audio_open (BseDevice *device,
gboolean require_readable,
gboolean require_writable,
@@ -193,7 +193,7 @@ bse_pcm_device_port_audio_open (BseDevice *device,
}
}
- Bse::ErrorType error = Bse::Error::NONE;
+ Bse::Error error = Bse::Error::NONE;
PaStreamParameters inputParameters = { 0, };
inputParameters.device = Pa_GetDefaultInputDevice();
diff --git a/drivers/bsemididevice-alsa.cc b/drivers/bsemididevice-alsa.cc
index be6e104..af7e31c 100644
--- a/drivers/bsemididevice-alsa.cc
+++ b/drivers/bsemididevice-alsa.cc
@@ -175,7 +175,7 @@ silent_error_handler (const char *file,
{
}
-static Bse::ErrorType
+static Bse::Error
bse_midi_device_alsa_open (BseDevice *device,
gboolean require_readable,
gboolean require_writable,
@@ -201,7 +201,7 @@ 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::Error 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)
{
diff --git a/drivers/bsepcmdevice-alsa.cc b/drivers/bsepcmdevice-alsa.cc
index 14402df..0f5e91e 100644
--- a/drivers/bsepcmdevice-alsa.cc
+++ b/drivers/bsepcmdevice-alsa.cc
@@ -36,7 +36,7 @@ typedef struct
/* --- prototypes --- */
static void bse_pcm_device_alsa_class_init (BsePcmDeviceALSAClass *klass);
static void bse_pcm_device_alsa_init (BsePcmDeviceALSA *self);
-static Bse::ErrorType alsa_device_setup (AlsaPcmHandle *alsa,
+static Bse::Error alsa_device_setup (AlsaPcmHandle *alsa,
snd_pcm_t *phandle,
guint latency_ms,
guint *mix_freq,
@@ -199,7 +199,7 @@ silent_error_handler (const char *file,
{
}
-static Bse::ErrorType
+static Bse::Error
bse_pcm_device_alsa_open (BseDevice *device,
gboolean require_readable,
gboolean require_writable,
@@ -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::Error 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);
@@ -304,7 +304,7 @@ bse_pcm_device_alsa_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
-static Bse::ErrorType
+static Bse::Error
alsa_device_setup (AlsaPcmHandle *alsa,
snd_pcm_t *phandle,
guint latency_ms,
diff --git a/sfi/sfidl-corecxx.cc b/sfi/sfidl-corecxx.cc
index 91fd517..7485a73 100644
--- a/sfi/sfidl-corecxx.cc
+++ b/sfi/sfidl-corecxx.cc
@@ -1240,7 +1240,7 @@ public:
printf (");\n");
/* marshal */
- printf (" static Bse::ErrorType marshal (BseProcedureClass *procedure,\n"
+ printf (" static Bse::Error marshal (BseProcedureClass *procedure,\n"
" const GValue *in_values,\n"
" GValue *out_values)\n");
printf (" {\n");
diff --git a/tests/testwavechunk.cc b/tests/testwavechunk.cc
index 8cf030c..b0a4e93 100644
--- a/tests/testwavechunk.cc
+++ b/tests/testwavechunk.cc
@@ -43,7 +43,7 @@ run_loop_test (GslWaveLoopType loop_type,
GslDataCache *dcache;
GslWaveChunkBlock block = { 0, };
GslWaveChunk *wchunk;
- Bse::ErrorType error;
+ Bse::Error error;
myhandle = gsl_data_handle_new_mem (1, 32, 44100, 440, my_data_length, my_data, NULL);
dcache = gsl_data_cache_new (myhandle, 1);
gsl_data_handle_unref (myhandle);
@@ -160,7 +160,7 @@ reversed_datahandle_test (void)
GslDataHandle *myhandle;
GslDataHandle *rhandle1, *rhandle2;
GslLong o, l, i, e;
- Bse::ErrorType error;
+ Bse::Error error;
TSTART ("reversed datahandle");
myhandle = gsl_data_handle_new_mem (1, 32, 44100, 440, my_data_length, my_data, NULL);
rhandle1 = gsl_data_handle_new_reverse (myhandle);
@@ -261,7 +261,7 @@ multi_channel_test_one (int pingpong,
GslDataHandle *myhandle;
GslDataCache *dcache;
GslWaveChunk *wchunk;
- Bse::ErrorType error;
+ Bse::Error error;
const int LOOP_COUNT = 20;
const int LOOP_TYPE = pingpong ? GSL_WAVE_LOOP_PINGPONG : GSL_WAVE_LOOP_JUMP;
size_t my_data_length = channels * frames;
diff --git a/tools/bsefextract.cc b/tools/bsefextract.cc
index b7b205b..348d8e9 100644
--- a/tools/bsefextract.cc
+++ b/tools/bsefextract.cc
@@ -1521,7 +1521,7 @@ main (int argc,
}
/* open input */
- Bse::ErrorType error;
+ Bse::Error error;
BseWaveFileInfo *wave_file_info = bse_wave_file_info_load (argv[1], &error);
if (!wave_file_info)
diff --git a/tools/bsewavetool.cc b/tools/bsewavetool.cc
index 2c89c1f..8163e7a 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::Error error = Bse::Error::NONE;
if (!wave)
{
BseWaveFileInfo *winfo = bse_wave_file_info_load (input_file.c_str(), &error);
@@ -767,7 +767,7 @@ public:
gsl_vorbis_encoder_set_quality (enc, quality);
gsl_vorbis_encoder_set_n_channels (enc, wave->n_channels);
gsl_vorbis_encoder_set_sample_freq (enc, guint (gsl_data_handle_mix_freq (dhandle)));
- Bse::ErrorType error = gsl_vorbis_encoder_setup_stream (enc, gsl_vorbis_make_serialno());
+ Bse::Error error = gsl_vorbis_encoder_setup_stream (enc, gsl_vorbis_make_serialno());
if (error)
{
sfi_error ("chunk % 7.2f/%.0f: failed to encode: %s",
@@ -1043,7 +1043,7 @@ public:
}
GslDataHandle*
load_file_auto (const OptChunk &opt,
- Bse::ErrorType &error)
+ Bse::Error &error)
{
GslDataHandle *dhandle = NULL;
const char *sample_file = opt.sample_file;
@@ -1069,7 +1069,7 @@ public:
load_file_raw (const OptChunk &opt,
guint n_channels,
gfloat osc_freq,
- Bse::ErrorType &error)
+ Bse::Error &error)
{
GslDataHandle *dhandle = NULL;
const char *sample_file = opt.sample_file;
@@ -1141,7 +1141,7 @@ public:
exit (1);
}
/* add sample file */
- Bse::ErrorType error = Bse::Error::NONE;
+ Bse::Error error = Bse::Error::NONE;
GslDataHandle *dhandle;
sfi_info ("LOAD: osc-freq=%g file=%s", osc_freq, ochunk.sample_file);
if (load_raw)
@@ -1869,7 +1869,7 @@ public:
cconfig.tail_silence = tail_silence;
GslDataClipResult cresult;
GslDataHandle *dhandle = chunk->dhandle;
- Bse::ErrorType error;
+ Bse::Error error;
error = gsl_data_clip_sample (dhandle, &cconfig, &cresult);
if (error == Bse::Error::DATA_UNMATCHED && cresult.clipped_to_0length)
{
@@ -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::Error error = Bse::Error::NONE;
if (absmax > 4.6566e-10) /* 32bit threshold */
{
if (use_volume_xinfo)
@@ -2074,7 +2074,7 @@ public:
xinfos = bse_xinfos_add_value (xinfos, "loop-algorithm", loop_algorithm);
gsl_data_handle_ref (dhandle);
- Bse::ErrorType error = chunk->change_dhandle (dhandle, gsl_data_handle_osc_freq (dhandle),
xinfos);
+ Bse::Error error = chunk->change_dhandle (dhandle, gsl_data_handle_osc_freq (dhandle), xinfos);
if (error)
sfi_error ("looping failed: %s", bse_error_blurb (error));
g_strfreev (xinfos);
@@ -2501,10 +2501,10 @@ public:
}
return (m_cutoff_freq <= 0); // missing args
}
- Bse::ErrorType
+ Bse::Error
print_effective_stopband_start (GslDataHandle *fir_handle)
{
- Bse::ErrorType error = gsl_data_handle_open (fir_handle);
+ Bse::Error error = gsl_data_handle_open (fir_handle);
if (error)
return error;
int64 freq_inc = 5; // FIXME
@@ -2548,7 +2548,7 @@ public:
{
GslDataHandle *fir_handle = create_fir_handle (dhandle);
- Bse::ErrorType error = print_effective_stopband_start (fir_handle);
+ Bse::Error error = print_effective_stopband_start (fir_handle);
if (!error)
error = chunk->change_dhandle (fir_handle, 0, 0);
@@ -2656,7 +2656,7 @@ public:
sfi_info (" using resampler precision: %s\n",
bse_resampler2_precision_name (bse_resampler2_find_precision_for_bits
(m_precision_bits)));
- Bse::ErrorType error = chunk->change_dhandle (bse_data_handle_new_upsample2 (dhandle,
m_precision_bits), 0, 0);
+ Bse::Error error = chunk->change_dhandle (bse_data_handle_new_upsample2 (dhandle,
m_precision_bits), 0, 0);
if (error)
{
sfi_error ("chunk % 7.2f/%.0f: %s",
@@ -2732,7 +2732,7 @@ public:
sfi_info (" using resampler precision: %s\n",
bse_resampler2_precision_name (bse_resampler2_find_precision_for_bits
(m_precision_bits)));
- Bse::ErrorType error = chunk->change_dhandle (bse_data_handle_new_downsample2 (dhandle, 24), 0, 0);
+ Bse::Error error = chunk->change_dhandle (bse_data_handle_new_downsample2 (dhandle, 24), 0, 0);
if (error)
{
sfi_error ("chunk % 7.2f/%.0f: %s",
@@ -2918,14 +2918,14 @@ public:
int fd = open (filename.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0666);
if (fd < 0)
{
- Bse::ErrorType error = bse_error_from_errno (errno, Bse::Error::FILE_OPEN_FAILED);
+ Bse::Error 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::Error 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 93e3c46..50d6311 100644
--- a/tools/bwtwave.cc
+++ b/tools/bwtwave.cc
@@ -40,7 +40,7 @@ WaveChunk::WaveChunk (const WaveChunk &rhs)
gsl_data_handle_open (dhandle);
}
-Bse::ErrorType
+Bse::Error
WaveChunk::change_dhandle (GslDataHandle *xhandle,
gdouble osc_freq,
gchar **copy_xinfos)
@@ -55,7 +55,7 @@ WaveChunk::change_dhandle (GslDataHandle *xhandle,
gsl_data_handle_unref (xhandle);
xhandle = tmp_handle;
}
- Bse::ErrorType error = gsl_data_handle_open (xhandle);
+ Bse::Error error = gsl_data_handle_open (xhandle);
gsl_data_handle_unref (xhandle);
if (!error)
{
@@ -68,12 +68,12 @@ WaveChunk::change_dhandle (GslDataHandle *xhandle,
return error;
}
-Bse::ErrorType
+Bse::Error
WaveChunk::set_dhandle_from_file (const string &fname,
gdouble osc_freq,
gchar **xinfos)
{
- Bse::ErrorType error = Bse::Error::NONE;
+ Bse::Error error = Bse::Error::NONE;
BseWaveFileInfo *wfi = bse_wave_file_info_load (fname.c_str(), &error);
GslDataHandle *xhandle = NULL;
if (wfi)
@@ -107,7 +107,7 @@ Wave::Wave (const gchar *wave_name,
{
}
-Bse::ErrorType
+Bse::Error
Wave::add_chunk (GslDataHandle *dhandle,
gchar **xinfos)
{
@@ -122,7 +122,7 @@ Wave::add_chunk (GslDataHandle *dhandle,
else
gsl_data_handle_ref (dhandle);
- Bse::ErrorType error = gsl_data_handle_open (dhandle);
+ Bse::Error error = gsl_data_handle_open (dhandle);
if (!error)
{
WaveChunk wc;
@@ -233,7 +233,7 @@ Wave::sort ()
#endif
}
-Bse::ErrorType
+Bse::Error
Wave::store (const string file_name)
{
assert_return (file_name.c_str() != NULL, Bse::Error::INTERNAL);
@@ -397,7 +397,7 @@ 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);
+ Bse::Error 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);
diff --git a/tools/bwtwave.hh b/tools/bwtwave.hh
index 1c0246d..f550ed2 100644
--- a/tools/bwtwave.hh
+++ b/tools/bwtwave.hh
@@ -18,10 +18,10 @@ public:
/*Con*/ WaveChunk();
/*Copy*/ WaveChunk (const WaveChunk &rhs);
WaveChunk& operator= (const WaveChunk &);
- Bse::ErrorType set_dhandle_from_file (const string &fname,
+ Bse::Error set_dhandle_from_file (const string &fname,
gdouble osc_freq,
gchar **xinfos);
- Bse::ErrorType change_dhandle (GslDataHandle *xhandle,
+ Bse::Error change_dhandle (GslDataHandle *xhandle,
gdouble osc_freq,
gchar **xinfos);
/*Des*/ ~WaveChunk();
@@ -53,14 +53,14 @@ public:
{
set_chunks_xinfo (key, value, osc_freq, false);
}
- Bse::ErrorType add_chunk (GslDataHandle *dhandle,
+ Bse::Error add_chunk (GslDataHandle *dhandle,
gchar **xinfos = NULL);
GslDataHandle* lookup (gfloat osc_freq);
bool match (const WaveChunk &wchunk,
vector<float> &sorted_freqs);
void remove (list<WaveChunk>::iterator it);
void sort ();
- Bse::ErrorType store (const string file_name);
+ Bse::Error store (const string file_name);
/*Des*/ ~Wave ();
};
diff --git a/tools/magictest.cc b/tools/magictest.cc
index 13c9ed3..b4b1000 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::Error error = Bse::Error::NONE;
printout ("\n LOADER: %s\n", loader->name);
wfi = bse_wave_file_info_load (argv[i], &error);
if (wfi)
diff --git a/tools/mathtool.cc b/tools/mathtool.cc
index 18a0a24..40583c1 100644
--- a/tools/mathtool.cc
+++ b/tools/mathtool.cc
@@ -92,7 +92,7 @@ main (int argc,
while (file)
{
BseWaveFileInfo *fi;
- Bse::ErrorType error;
+ Bse::Error error;
fi = bse_wave_file_info_load (file, &error);
if (fi)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]